:root {
  --bg: #0a110e;
  --panel: rgba(13, 21, 18, 0.9);
  --panel-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef5f0;
  --muted: #93a79c;
  --accent: #7cff6b;
  --acc-rgb: 124,255,107;
  --accent-hi: #9dff8f;
  --accent-lo: #4fe03c;
  --accent-sh: #2e8f22;
  --accent-ink: #0b1a08;
  --red: #ff4d57;
  --blue: #3f8cff;
  --gold: #ffd84d;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: 'Rubik', system-ui, 'Segoe UI', sans-serif;
  overflow: hidden; user-select: none;
}
.hidden { display: none !important; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
#stage { position: relative; flex: 1; min-height: 0; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- HUD ---------- */
#hud {
  height: 64px; flex: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 16px;
  background: linear-gradient(#111c18, #0a110e);
  border-bottom: 1px solid var(--line);
}
.hud-team { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .06em; }
.hud-team.red { justify-content: flex-end; }
.hud-team .score { font-size: 38px; font-weight: 900; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.hud-team.red .score { color: var(--red); }
.hud-team.blue .score { color: var(--blue); }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #000; }
.red .swatch { background: var(--red); }
.blue .swatch { background: var(--blue); }
.hud-center { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
#hudTime { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#hudInfo { font-size: 11px; color: var(--gold); font-weight: 600; letter-spacing: .12em; min-height: 13px; }
.poss { width: 120px; height: 4px; border-radius: 2px; background: var(--blue); overflow: hidden; margin-top: 3px; }
.poss i { display: block; height: 100%; width: 50%; background: var(--red); transition: width .4s; }
.poss.big { width: 100%; max-width: 360px; height: 8px; border-radius: 4px; margin: 10px auto 4px; }
.icon-btn {
  margin-left: auto; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px;
}
.icon-btn + .icon-btn { margin-left: 0; }
.icon-btn:hover { background: rgba(255,255,255,.1); }

/* ---------- Banner de gol ---------- */
.banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
  text-shadow: 0 4px 24px rgba(0,0,0,.6), 0 2px 0 rgba(0,0,0,.5);
}
.banner.show { animation: pop 2.2s cubic-bezier(.2,.9,.3,1.2) both; }
.banner-title { font-size: clamp(40px, 9vw, 110px); font-weight: 900; font-style: italic; letter-spacing: .02em; }
.banner-sub { font-size: clamp(14px, 2vw, 22px); font-weight: 600; margin-top: 4px; }
@keyframes pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-6deg); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(0); }
  25% { transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

/* ---------- Pantallas ---------- */
.screen {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: auto;
  background: radial-gradient(ellipse at center, rgba(4,9,7,.45), rgba(4,9,7,.85));
  backdrop-filter: blur(2px);
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  margin: auto;
}
.menu-card { width: min(980px, 100%); display: flex; flex-direction: column; gap: 22px; }
.small-card { width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.end-card { width: min(760px, 100%); text-align: center; }

.brand h1 {
  margin: 0; font-size: clamp(52px, 9vw, 88px); font-weight: 900; font-style: italic; line-height: .9;
  letter-spacing: -.02em;
}
.brand h1 span { color: var(--accent); }
.brand p { margin: 8px 0 0; color: var(--muted); }
h2 { margin: 0 0 12px; font-size: 34px; font-weight: 900; font-style: italic; }
h3 { margin: 18px 0 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.menu-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
@media (max-width: 760px) { .menu-grid { grid-template-columns: 1fr; } }
.panel { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }

.opt { margin-bottom: 14px; }
.opt:last-child { margin-bottom: 0; }
.opt-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  flex: 1 1 auto; min-width: 64px;
  background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--line);
  padding: 9px 10px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
  transition: background .15s, border-color .15s, transform .1s;
}
.seg button:hover { background: rgba(255,255,255,.1); }
.seg button:active { transform: scale(.97); }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

.names { display: grid; gap: 10px; }
.names label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.names input {
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 15px; outline: none; text-transform: none;
}
.names input:focus { border-color: var(--accent); }

.controls { width: 100%; border-collapse: collapse; font-size: 13px; }
.controls th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px; }
.controls td { padding: 5px 4px; border-top: 1px solid var(--line); }
kbd {
  display: inline-block; min-width: 22px; padding: 2px 6px; margin: 1px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-bottom-width: 3px;
  border-radius: 6px; font: 600 11px/1.4 'Rubik', system-ui, sans-serif; text-align: center; color: var(--text);
}
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 12px 0 0; }
.foot { text-align: center; font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); margin: 0 0 12px; font-size: 13px; }

.btn {
  background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.2); filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.big { font-size: 22px; font-weight: 900; letter-spacing: .12em; padding: 16px; font-style: italic; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.final { font-size: 64px; font-weight: 900; display: flex; justify-content: center; gap: 18px; line-height: 1; }
.final .r { color: var(--red); }
.final .b { color: var(--blue); }
.final .dash { color: var(--muted); }

.table-wrap { overflow-x: auto; }
.stats { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats th { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 8px; text-align: center; }
.stats th:first-child, .stats td:first-child { text-align: left; }
.stats td { padding: 7px 8px; border-top: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.stats .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; border: 1.5px solid #000; vertical-align: -1px; }
.stats .mvp { color: var(--gold); font-size: 11px; font-weight: 800; margin-left: 6px; letter-spacing: .1em; }

/* ---------- Online ---------- */
.play-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.online-btn { background: rgba(63,140,255,.18); border-color: rgba(63,140,255,.6); }
.online-btn:hover { background: rgba(63,140,255,.3); }
.online-card { width: min(520px, 100%); }
.lobby-card { width: min(860px, 100%); display: flex; flex-direction: column; gap: 16px; }
.join-row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.join-row input {
  width: 140px; text-align: center; text-transform: uppercase; letter-spacing: .3em; font: inherit; font-weight: 800; font-size: 18px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--text); padding: 10px; border-radius: 10px; outline: none;
}
.join-row input:focus { border-color: var(--accent); }
.status { min-height: 18px; margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--gold); }
.status.err { color: #ff7a7a; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; }
.room-code { font-size: 42px; font-weight: 900; letter-spacing: .2em; color: var(--accent); user-select: text; }
.teams { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .teams { grid-template-columns: 1fr; } }
.team-col { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.team-col h3 { margin: 0 0 8px; }
.team-col.red h3 { color: var(--red); }
.team-col.blue h3 { color: var(--blue); }
.team-col ul { list-style: none; margin: 0 0 10px; padding: 0; flex: 1; min-height: 60px; }
.team-col li { padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.05); margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.team-col li.me { outline: 1.5px solid var(--accent); }
.team-col li .tag { font-size: 10px; color: var(--gold); margin-left: 6px; letter-spacing: .08em; }

@media (max-width: 560px) {
  #hud { gap: 6px; padding: 0 8px; }
  .hud-team .tname { display: none; }
  .hud-team .score { font-size: 30px; }
  .card { padding: 18px; }
}

/* =====================================================================
   Menú estilo garaje, modos, tienda, repetición
   ===================================================================== */
.coin-ico {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c2, #ffd23f 45%, #c99400);
  border: 2px solid #8a6400; box-shadow: 0 0 10px rgba(255,210,63,.45); flex: none;
}
.coins {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(10,17,14,.75); border: 1px solid rgba(255,210,63,.35); font-variant-numeric: tabular-nums;
}
.coins b { font-size: 18px; color: #ffd84d; }
.coins small { color: var(--muted); font-size: 11px; letter-spacing: .1em; }

/* ---------- Inicio ---------- */
.home-screen {
  display: grid; grid-template-rows: auto 1fr auto; align-items: stretch; justify-content: stretch;
  padding: 22px 28px; backdrop-filter: blur(3px);
  background: radial-gradient(ellipse at 50% 55%, rgba(4,9,7,.15), rgba(4,9,7,.82) 70%);
}
.home-screen.hidden { display: none !important; }
.home-top { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 54px; font-weight: 900; font-style: italic; letter-spacing: -.02em; line-height: 1;
  text-shadow: 0 4px 0 rgba(0,0,0,.35), 0 12px 30px rgba(0,0,0,.5); }
.logo span { color: var(--accent); }
.top-right { display: flex; gap: 10px; align-items: center; }
.top-right .icon-btn { margin-left: 0; }
.home-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
#showcase { width: min(560px, 80vw); height: min(400px, 46vh); display: block; }
.name-plate { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -10px; }
.name-plate input {
  font: 900 italic 34px Rubik, system-ui, sans-serif; text-align: center; color: #fff; width: min(420px, 80vw);
  background: transparent; border: 2px solid transparent; border-radius: 14px; padding: 6px 12px; outline: none;
  text-shadow: 0 4px 16px rgba(0,0,0,.7); transition: border-color .15s, background .15s;
}
.name-plate input:hover { border-color: rgba(255,255,255,.18); }
.name-plate input:focus { border-color: var(--accent); background: rgba(0,0,0,.35); }
.name-plate small { color: var(--muted); font-size: 12px; }
.home-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.side-btns { display: flex; gap: 12px; }
.btn.tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 128px; padding: 16px 18px;
  font-weight: 900; letter-spacing: .1em; font-size: 14px; background: rgba(10,17,14,.78); border-radius: 16px;
}
.btn.tile span { font-size: 28px; }
.btn.tile:hover { background: rgba(var(--acc-rgb),.14); border-color: rgba(var(--acc-rgb),.5); }
.play-big {
  font: 900 italic 46px Rubik, system-ui, sans-serif; letter-spacing: .04em; padding: 18px 46px 20px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-lo)); color: #0b1a08; border: none; border-radius: 18px;
  box-shadow: 0 10px 0 var(--accent-sh), 0 22px 50px rgba(var(--acc-rgb),.35); transform: skewX(-6deg);
}
.play-big span { font-size: 30px; margin-left: 6px; }
.play-big:hover { filter: brightness(1.1); }
.play-big:active { transform: skewX(-6deg) translateY(6px); box-shadow: 0 4px 0 var(--accent-sh), 0 12px 30px rgba(var(--acc-rgb),.3); }

/* ---------- Cabecera de pantallas ---------- */
.wide-wrap { width: min(1100px, 100%); margin: auto; display: flex; flex-direction: column; gap: 18px; }
.screen-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 4px; }
.screen-head h2 { margin: 0; text-align: center; }
.screen-head > :last-child { justify-self: end; }
.btn.back { justify-self: start; padding: 10px 14px; }
.center { text-align: center; }

/* ---------- Modos ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .mode-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mode-grid { grid-template-columns: 1fr; } }
.mode-card {
  text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 22px; min-height: 170px; cursor: pointer;
  background: linear-gradient(160deg, rgba(25,40,33,.95), rgba(12,20,17,.95)); color: var(--text);
  border: 1px solid var(--line); border-radius: 20px; font: inherit; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(var(--acc-rgb),.3); }
.mode-card .mi { font-size: 42px; }
.mode-card b { font-size: 22px; font-weight: 900; font-style: italic; }
.mode-card small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.mode-card.online { background: linear-gradient(160deg, rgba(22,40,70,.95), rgba(12,20,30,.95)); }
.mode-card.online:hover { border-color: var(--blue); }

/* ---------- Ajustes del partido ---------- */
.setup-card { width: min(760px, 100%); display: flex; flex-direction: column; gap: 16px; }
.p2-panel.hidden { display: none; }

/* ---------- Tienda ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tabs button {
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); border-radius: 999px;
  padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer;
}
.tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.item {
  background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.item.equipped { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--acc-rgb),.35), 0 10px 30px rgba(var(--acc-rgb),.12); }
.item canvas { width: 100%; height: 120px; border-radius: 12px; background: radial-gradient(circle at 50% 60%, #1f3a2a, #0b140f); display: block; }
.item h4 { margin: 2px 0 0; font-size: 16px; font-weight: 900; }
.item p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.35; min-height: 32px; }
.item .buy { margin-top: auto; padding: 10px; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.item .buy .coin-ico { width: 14px; height: 14px; }
.item .buy.cant { opacity: .5; }
.item .tag-own { position: absolute; top: 18px; right: 18px; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 999px; color: var(--accent); }

/* ---------- Controles ---------- */
.controls-card { width: min(640px, 100%); }

/* ---------- Repetición ---------- */
.replay-tag {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  background: rgba(10,17,14,.85); border: 1px solid rgba(255,255,255,.18);
  font-weight: 900; font-style: italic; letter-spacing: .14em; font-size: 18px; pointer-events: none;
}
.replay-tag small { font-style: normal; font-weight: 600; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 10px #ff3b30; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Recompensa y aviso ---------- */
.reward { display: inline-flex; align-items: center; gap: 8px; margin: 4px auto 14px; padding: 10px 18px; border-radius: 999px;
  background: rgba(255,210,63,.12); border: 1px solid rgba(255,210,63,.4); font-weight: 700; }
.reward b { color: #ffd84d; font-size: 20px; }
.reward small { color: var(--muted); font-weight: 500; }
.reward.hidden { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 14px;
  background: rgba(10,17,14,.95); border: 1px solid var(--line); font-weight: 700; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
@media (max-width: 640px) {
  .logo { font-size: 38px; }
  .play-big { font-size: 32px; padding: 14px 26px; }
  .btn.tile { min-width: 92px; padding: 12px; }
}

/* El escaparate y las vistas previas no son el canvas del campo. */
#showcase, .item canvas { position: relative; inset: auto; }

/* ---------- Identidad de la XCoin: negra, borde verde y X en el centro ---------- */
.coin-ico {
  position: relative; display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #2b322e, #0b0f0d 68%);
  border: 2px solid #7cff6b;
  box-shadow: 0 0 10px rgba(124,255,107,.45), inset 0 0 0 2px #0b0f0d, inset 0 0 0 3px rgba(124,255,107,.3);
}
.coin-ico::after {
  content: 'X'; font: 900 italic 12px/1 Rubik, system-ui, sans-serif; color: #7cff6b;
  text-shadow: 0 0 6px rgba(124,255,107,.7); transform: translateX(-0.5px);
}
.item .buy .coin-ico { width: 16px; height: 16px; border-width: 1.5px; }
.item .buy .coin-ico::after { font-size: 9px; }
.coins { border-color: rgba(124,255,107,.4); }
.coins b { color: #7cff6b; }
.reward { background: rgba(124,255,107,.1); border-color: rgba(124,255,107,.45); }
.reward b { color: #7cff6b; }
#showcase { width: min(620px, 86vw); height: min(440px, 50vh); }

/* =====================================================================
   v3: iconos, marcador nuevo, dorsal, ruleta
   ===================================================================== */
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.ico-svg { width: 1.15em; height: 1.15em; display: block; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.icon-btn .ico-svg { width: 18px; height: 18px; }
.btn.tile .ico-svg { width: 30px; height: 30px; }
.btn.tile .ico { color: var(--accent); }
.btn.tile { position: relative; }
.btn.tile .dot { position: absolute; top: 10px; right: 12px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 12px var(--accent); animation: blink 1.4s infinite; }
.btn.tile .dot.hidden { display: none; }
.play-big .ico-svg { width: 30px; height: 30px; margin-left: 6px; }
.btn.back .ico-svg { width: 16px; height: 16px; }
.btn.back { display: inline-flex; align-items: center; gap: 4px; }
.mode-card .mi { color: var(--accent); width: 46px; height: 46px; }
.mode-card .mi .ico-svg { width: 46px; height: 46px; stroke-width: 1.7; }
.mode-card.online .mi { color: #6fb0ff; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; }
.tabs button .ico-svg { width: 18px; height: 18px; }
.item .buy .ico-svg { width: 16px; height: 16px; }

/* ---------- Marcador ---------- */
#hud {
  height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 16px; background: linear-gradient(#0d1512, #08100c); border-bottom: 1px solid rgba(var(--acc-rgb),.18);
}
.hud-side { display: flex; gap: 8px; }
.hud-side.right { justify-content: flex-end; }
.hud-side .icon-btn { margin-left: 0; }
.sb { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.sb-row { display: flex; align-items: stretch; height: 46px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.sb-team {
  display: flex; align-items: center; padding: 0 22px; font-weight: 900; font-style: italic; letter-spacing: .14em; font-size: 15px;
  color: #fff; min-width: 108px;
}
.sb-team.red { background: linear-gradient(90deg, #8f1d24, #ff4d57); clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); justify-content: flex-end; }
.sb-team.blue { background: linear-gradient(270deg, #123f84, #3f8cff); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%); }
.sb-score {
  width: 64px; display: grid; place-items: center; font-size: 36px; font-weight: 900; font-variant-numeric: tabular-nums;
  background: #0b0f0d; color: #fff; border-top: 3px solid; transition: transform .15s;
}
.sb-score.red { border-color: #ff4d57; }
.sb-score.blue { border-color: #3f8cff; }
.sb-score.bump { animation: bump .6s cubic-bezier(.2,.9,.3,1.4); }
@keyframes bump { 0% { transform: scale(1); color: #fff; } 30% { transform: scale(1.45); color: var(--accent); } 100% { transform: scale(1); } }
.sb-clock {
  min-width: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#141c18, #0b0f0d); border-top: 3px solid var(--accent); padding: 0 12px;
}
.sb-clock #hudTime { font-size: 25px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.sb-clock #hudInfo { font-size: 9.5px; font-weight: 800; letter-spacing: .16em; color: var(--accent); margin-top: 3px; min-height: 11px; }
.sb-poss { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; padding: 0 6px; }
.sb-poss b { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sb-poss b.r { color: #ff7a82; text-align: right; }
.sb-poss b.b { color: #7fb1ff; }
.poss-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2a6fe0, #3f8cff); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.poss-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: linear-gradient(90deg, #ff4d57, #ff6b73);
  transition: width .5s; box-shadow: 2px 0 0 #fff; }
.poss-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 7px; font-weight: 900;
  letter-spacing: .3em; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.7); }
@media (max-width: 640px) {
  .sb-team { display: none; }
  .sb-score { width: 50px; font-size: 28px; }
}

/* ---------- Dorsal ---------- */
.tag-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.tag-row label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tag-row input {
  width: 64px; height: 42px; text-align: center; font: 900 24px Rubik, system-ui, sans-serif; color: #fff; text-transform: uppercase;
  background: #0b0f0d; border: 2px solid rgba(var(--acc-rgb),.45); border-radius: 12px; outline: none;
}
.tag-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.15); }

/* ---------- Ruleta ---------- */
.wheel-card { width: min(680px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wheel-card .screen-head { width: 100%; }
.wheel-wrap { width: min(520px, 86vw, 62vh); aspect-ratio: 1; }
#wheelCanvas { position: relative; inset: auto; width: 100%; height: 100%; display: block; }
.wheel-msg { margin: 0; font-weight: 800; font-size: 18px; text-align: center; min-height: 24px; }
.wheel-msg.win { color: var(--accent); }
#spinBtn { width: min(320px, 100%); }
#spinBtn:disabled { opacity: .45; cursor: not-allowed; }

/* Mini ficha de cada jugador en la sala online */
.mini-av { position: static; inset: auto; width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; display: inline-block; }
.team-col li { display: flex; align-items: center; }

/* ---------- Rarezas: común (verde), raro (azul), Xpecial (rosa-lila), cósmico (galaxia/arcoíris) ---------- */
.item { --rc: #7cff6b; border-color: color-mix(in srgb, var(--rc) 45%, transparent); }
.item.r-common { --rc: #7cff6b; }
.item.r-rare { --rc: #3f9bff; }
.item.r-xpecial { --rc: #e46bff; }
.item.r-cosmic { --rc: #b98cff; }
.item canvas { box-shadow: inset 0 -26px 30px -18px color-mix(in srgb, var(--rc) 45%, transparent); }
.item .rarity {
  position: absolute; top: 18px; left: 18px; z-index: 1; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: #0b0f0d; background: var(--rc);
}
.item.r-xpecial { box-shadow: 0 0 0 1px rgba(228,107,255,.25), 0 10px 30px rgba(228,107,255,.12); }
.item.r-xpecial .rarity { background: linear-gradient(90deg, #ff7ad9, #c58bff); }
.item.r-cosmic {
  border-color: transparent;
  background:
    linear-gradient(170deg, rgba(25,22,40,.97), rgba(12,10,22,.97)) padding-box,
    conic-gradient(from var(--cang, 0deg), #ff3b3b, #ffb02e, #ffe14d, #3dff6b, #2ec5ff, #7a5cff, #ff4fd8, #ff3b3b) border-box;
  border: 2px solid transparent;
  animation: cosmicSpin 4s linear infinite;
  box-shadow: 0 0 22px rgba(160,110,255,.3);
}
.item.r-cosmic .rarity {
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6);
  background: linear-gradient(90deg, #6a2cff, #ff4fd8, #2ec5ff, #6a2cff); background-size: 200% 100%; animation: cosmicSlide 3s linear infinite;
}
@property --cang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes cosmicSpin { to { --cang: 360deg; } }
@keyframes cosmicSlide { to { background-position: 200% 0; } }
.item.equipped { outline: 2px solid var(--accent); outline-offset: 2px; }
.item .tag-own { top: 18px; right: 18px; }

/* ---------- v5: placa del inicio, personalizar, torneos y chat ---------- */
#showcase { cursor: pointer; }
.plate-btn {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 18px; border-radius: 14px; cursor: pointer;
  background: rgba(0,0,0,.35); border: 1px solid rgba(var(--acc-rgb),.35); color: var(--text); font: inherit;
}
.plate-btn:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.15); }
.plate-btn b { font-size: 26px; font-weight: 900; font-style: italic; }
.plate-btn span {
  min-width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; padding: 0 6px;
  background: #0b0f0d; border: 2px solid var(--accent); color: var(--accent); font-weight: 900; font-size: 17px;
}

.custom-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .custom-layout { grid-template-columns: 1fr; } }
.custom-left {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0;
}
#customShow { width: 100%; height: 230px; display: block; position: relative; border-radius: 14px;
  background: radial-gradient(circle at 50% 65%, #1b3324, #0b140f); }
.custom-left .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.custom-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cust-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); max-height: calc(100vh - 230px); overflow-y: auto; padding: 4px; }
.item.mine { font: inherit; color: inherit; text-align: center; cursor: pointer; align-items: stretch; }
.item.mine:hover { transform: translateY(-2px); border-color: var(--rc); }
.item.mine canvas { height: 100px; }
.item.mine h4 { font-size: 15px; }
.eq-state { color: var(--muted); font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.item.equipped .eq-state { color: var(--accent); font-weight: 800; }
.eq-state .ico-svg { width: 14px; height: 14px; }
.cust-more { grid-column: 1 / -1; margin: 4px 0; }

.mode-card.tour { background: linear-gradient(160deg, rgba(70,55,12,.95), rgba(25,20,8,.95)); }
.mode-card.tour:hover { border-color: #ffcc33; }
.cup-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 820px) { .cup-grid { grid-template-columns: 1fr 1fr; } }
.cup-card {
  --cup: #ffcc33; font: inherit; color: var(--text); cursor: pointer; text-align: left;
  background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.cup-card .ico-svg { width: 34px; height: 34px; color: var(--cup); }
.cup-card b { font-size: 19px; font-weight: 900; font-style: italic; color: var(--cup); }
.cup-card small { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.cup-card .cup-prize { display: flex; align-items: center; gap: 6px; font-weight: 900; color: #ffd84d; margin-top: auto; }
.cup-card .cup-prize .coin-ico { width: 15px; height: 15px; }
.cup-card.on { border-color: var(--cup); box-shadow: 0 0 0 2px var(--cup), 0 10px 30px rgba(0,0,0,.35); }
.cup-card:disabled { opacity: .35; cursor: not-allowed; }
.tour-opts { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.tour-opts .hint { margin: 0; }
.bracket { display: grid; grid-template-columns: repeat(3, 1fr) 140px; gap: 14px; }
@media (max-width: 820px) { .bracket { grid-template-columns: 1fr 1fr; } }
.br-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.br-col h4 { margin: 0; text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.br-match { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.br-team { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.br-team + .br-team { border-top: 1px solid var(--line); }
.br-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-team.me { color: var(--accent); font-weight: 900; }
.br-team.win b { color: var(--accent); }
.br-team.lose { opacity: .45; }
.br-champ { align-items: center; justify-content: center; text-align: center; font-weight: 900; color: var(--cup); }
.br-champ .ico-svg { width: 64px; height: 64px; filter: drop-shadow(0 0 12px var(--cup)); }
#tourPlayBtn { align-self: center; min-width: 320px; }
.tour-res { margin: 10px auto 0; padding: 10px 16px; border-radius: 12px; font-weight: 900; font-size: 18px; font-style: italic;
  background: rgba(var(--acc-rgb),.12); color: var(--accent); border: 1px solid rgba(var(--acc-rgb),.4); display: inline-block; }
.tour-res.out { background: rgba(255,77,87,.12); color: #ff8a92; border-color: rgba(255,77,87,.4); }
.tour-res.champ { background: linear-gradient(90deg, rgba(255,204,51,.25), rgba(255,204,51,.08)); color: #ffd84d; border-color: #ffcc33; font-size: 22px; }

.chat { position: fixed; left: 14px; bottom: 14px; width: min(400px, 60vw); z-index: 40; pointer-events: none;
  display: flex; flex-direction: column; gap: 6px; }
.chat ul { list-style: none; margin: 0; padding: 0; max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.chat li { align-self: flex-start; background: rgba(0,0,0,.45); border-radius: 8px; padding: 4px 9px; font-size: 13px;
  color: #eef5f0; transition: opacity .8s; max-width: 100%; overflow-wrap: anywhere; }
.chat li.old { opacity: 0; }
.chat.open li.old, .chat.lobby li.old { opacity: .85; }
.chat input { pointer-events: auto; background: rgba(0,0,0,.7); border: 1px solid rgba(var(--acc-rgb),.5); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; outline: none; }
.chat input:focus { border-color: var(--accent); }
.chat small { color: rgba(255,255,255,.4); font-size: 11px; }
.chat.open small, .chat.lobby small { display: none; }
.chat.lobby { pointer-events: auto; }
.chat.lobby ul { max-height: 120px; }

/* ---------- v6: ajustes, detalle de objetos y confirmación ---------- */
.settings-card { width: min(860px, 100%); display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; }
.set-sec { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.set-sec h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-size: 18px; font-style: italic; font-weight: 900; }
.set-sec h3 .ico-svg { width: 20px; height: 20px; color: var(--accent); }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys th { text-align: left; color: var(--muted); font-weight: 700; padding: 4px 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.keys td { padding: 4px 6px; border-top: 1px solid var(--line); }
.keys td:first-child { font-weight: 700; }
.keybtn { min-width: 120px; padding: 7px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: #0b0f0d; color: var(--text);
  font: 800 13px Rubik, system-ui, sans-serif; cursor: pointer; }
.keybtn:hover { border-color: var(--accent); }
.keybtn.wait { border-color: var(--accent); color: var(--accent); animation: blink 1s infinite; }
.keybtn.empty { color: #ff8a92; }
.themes { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-sw { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text); font: 700 14px Rubik, system-ui, sans-serif; cursor: pointer; }
.theme-sw i { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.theme-sw.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.note { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }
.setup-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(255,216,77,.08); border: 1px solid rgba(255,216,77,.35); color: #ffe38a; font-size: 13.5px; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(3,6,5,.72); backdrop-filter: blur(6px); }
.modal.hidden { display: none; }
.modal-card { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 22px; padding: 20px;
  background: linear-gradient(170deg, rgba(25,38,32,.98), rgba(12,19,16,.98)); border: 1px solid var(--line); box-shadow: 0 40px 120px rgba(0,0,0,.7);
  animation: modalIn .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes modalIn { from { transform: scale(.92); opacity: 0; } }
.modal-card.r-common { box-shadow: 0 0 0 2px #7cff6b, 0 40px 120px rgba(0,0,0,.7); }
.modal-card.r-rare { box-shadow: 0 0 0 2px #3f9bff, 0 40px 120px rgba(0,0,0,.7); }
.modal-card.r-xpecial { box-shadow: 0 0 0 2px #e46bff, 0 40px 120px rgba(0,0,0,.7); }
.modal-card.r-cosmic { box-shadow: 0 0 0 2px #b98cff, 0 0 40px rgba(160,110,255,.45), 0 40px 120px rgba(0,0,0,.7); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
#detailCanvas { width: 100%; height: 340px; display: block; position: relative; border-radius: 16px; background: radial-gradient(circle at 50% 60%, #1f3a2a, #0b140f); }
.detail-info { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; margin-top: 16px; }
.detail-info h3 { margin: 0; font-size: 34px; font-weight: 900; font-style: italic; }
.detail-info .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail-info .rarity { position: static; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; color: #0b0f0d; }
.detail-info .cat { font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.detail-info p { grid-column: 1 / -1; margin: 4px 0 0; color: #cfd9d3; font-size: 15px; line-height: 1.45; }
.detail-info .btn { grid-row: 1 / span 2; grid-column: 2; min-width: 200px; padding: 14px 20px; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.detail-hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.confirm-card { width: min(420px, 100%); text-align: center; }
.confirm-card h3 { margin: 0 0 8px; font-size: 24px; font-style: italic; font-weight: 900; }
.confirm-card p { margin: 0 0 16px; color: #cfd9d3; line-height: 1.5; }
.confirm-card .row { margin-top: 0; }
.item { cursor: pointer; }
.item .buy { cursor: pointer; }
.detail-info h3, .confirm-card h3, .set-sec h3 { color: #fff; text-transform: none; letter-spacing: 0; }
.detail-info h3 { text-transform: uppercase; letter-spacing: .02em; }

/* ---------- v7: cuentas ---------- */
.acct-btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; cursor: pointer;
  background: rgba(10,17,14,.78); border: 1px solid rgba(255,255,255,.14); color: var(--text); font: 800 14px Rubik, system-ui, sans-serif; }
.acct-btn:hover { border-color: var(--accent); }
.acct-btn .ico-svg { width: 20px; height: 20px; color: var(--accent); }
.acct-btn.on { border-color: rgba(var(--acc-rgb),.6); }
.login-card { width: min(440px, 100%); display: flex; flex-direction: column; }
.login-card h3 { margin: 0 0 14px; color: #fff; font-size: 24px; font-style: italic; font-weight: 900; letter-spacing: .02em; }
.login-tabs { margin-bottom: 14px; }
.login-tabs button { flex: 1; }
.login-card .btn.big { width: 100%; margin-top: 4px; }
.login-card .status { min-height: 20px; margin: 10px 0; }
.acct-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 4px; }
.acct-card .ico-svg { width: 38px; height: 38px; color: var(--accent); }
.acct-card b { display: block; font-size: 22px; font-style: italic; }
.acct-card small { color: var(--muted); font-size: 12.5px; }
#logoutBtn { margin-top: 14px; width: 100%; }
@media (max-width: 640px) { .acct-btn #acctName { display: none; } }

/* =====================================================================
   v8 (versión 3): bola misteriosa, entrenamiento, ruletas, pase, ajustes
   con pestañas, pausa con ajustes, mando y móvil
   ===================================================================== */
/* ---------- Bola misteriosa: aviso arriba del campo ---------- */
.myst-chip { --mc: #ffd84d; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; pointer-events: none;
  display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 4px 10px; padding: 7px 14px 9px; border-radius: 14px;
  background: rgba(10,17,14,.82); border: 1.5px solid var(--mc); box-shadow: 0 0 18px color-mix(in srgb, var(--mc) 45%, transparent); }
.myst-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 10px var(--mc); }
.myst-chip b { font-weight: 900; font-style: italic; letter-spacing: .1em; font-size: 14px; color: var(--mc); }
.myst-chip span { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; color: #fff; min-width: 34px; text-align: right; }
.myst-chip em { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.myst-chip em u { display: block; height: 100%; width: 100%; background: var(--mc); transition: width .25s linear; }
.myst-chip.flash { animation: mystFlash .9s cubic-bezier(.2,.9,.3,1.3); }
@keyframes mystFlash { 0% { transform: translateX(-50%) scale(.6); opacity: 0; } 40% { transform: translateX(-50%) scale(1.18); opacity: 1; } 100% { transform: translateX(-50%) scale(1); } }
.mode-card.mystery { background: linear-gradient(160deg, rgba(60,30,75,.95), rgba(20,12,28,.95)); }
.mode-card.mystery:hover { border-color: #e46bff; }
.mode-card.mystery .mi { color: #ffd84d; }
.mode-card.train { background: linear-gradient(160deg, rgba(20,55,60,.95), rgba(10,22,24,.95)); }
.mode-card.train:hover { border-color: #4fd2ff; }
.mode-card.train .mi { color: #4fd2ff; }
.mode-card.online { grid-column: span 2; }
@media (max-width: 560px) { .mode-card.online { grid-column: auto; } }
#hud.train .sb-poss { visibility: hidden; }

/* ---------- Inicio: 5 botones ---------- */
.side-btns { flex-wrap: wrap; }
.btn.tile { min-width: 112px; }

/* ---------- Ruletas ---------- */
.wheels-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .wheels-layout { grid-template-columns: 1fr; } }
.wheel-list { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 820px) { .wheel-list { flex-direction: row; flex-wrap: wrap; } .wheel-pick { flex: 1 1 140px; } }
.wheel-pick { --wc: #7cff6b; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 10px 14px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--text);
  background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line); transition: border-color .15s, transform .1s; }
.wheel-pick:hover { border-color: var(--wc); }
.wheel-pick:active { transform: scale(.98); }
.wheel-pick .wp-dot { grid-row: 1 / span 2; width: 14px; height: 14px; border-radius: 50%; background: var(--wc); box-shadow: 0 0 10px var(--wc); }
.wheel-pick b { font-weight: 900; font-style: italic; font-size: 16px; }
.wheel-pick small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 800; font-size: 12px; }
.wheel-pick small .coin-ico { width: 14px; height: 14px; border-width: 1.5px; }
.wheel-pick small .coin-ico::after { font-size: 8px; }
.wheel-pick.on { border-color: var(--wc); box-shadow: 0 0 0 2px var(--wc), 0 10px 30px rgba(0,0,0,.35); }
.wheel-pick:disabled { opacity: .4; cursor: not-allowed; }
.wheel-pick.xclusive { background: linear-gradient(160deg, #2b2008, #0d0a03); border-color: rgba(255,216,77,.55); }
.wheel-pick.xclusive b { color: #ffd84d; text-shadow: 0 0 12px rgba(255,216,77,.5); }
.wheel-main { --wc: #7cff6b; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: 20px;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--wc) 40%, transparent); }
.wheel-main.xclusive { background: radial-gradient(ellipse at 50% 40%, rgba(70,52,10,.95), rgba(12,10,4,.97)); box-shadow: 0 0 40px rgba(255,216,77,.18); }
.wheel-title { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.wheel-title b { font-size: 26px; font-weight: 900; font-style: italic; color: var(--wc); }
.wheel-title small { color: var(--muted); font-size: 13px; }
.wheel-main .wheel-wrap { width: min(470px, 84vw, 54vh); }
#spinBtn { display: flex; align-items: center; justify-content: center; gap: 8px; }
#spinBtn.cant { opacity: .55; }
.wheel-main.xclusive #spinBtn { background: linear-gradient(135deg, #fff1a8, #ffb800); border-color: #ffd84d; color: #241a00; }

/* ---------- Pase XBALL ---------- */
.pass-top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(var(--acc-rgb),.16), rgba(12,19,16,.95) 55%); border: 1px solid rgba(var(--acc-rgb),.4); }
@media (max-width: 640px) { .pass-top { grid-template-columns: auto 1fr; } .pass-top .btn { grid-column: 1 / -1; } }
.pass-lv { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: #0b0f0d;
  border: 3px solid var(--accent); box-shadow: 0 0 22px rgba(var(--acc-rgb),.4); }
.pass-lv small { font-size: 9px; font-weight: 900; letter-spacing: .2em; color: var(--muted); }
.pass-lv b { font-size: 32px; font-weight: 900; font-style: italic; line-height: 1; color: var(--accent); }
.pass-season { font-weight: 900; font-style: italic; font-size: 18px; margin-bottom: 8px; }
.pass-xp small { display: block; margin-top: 6px; color: var(--muted); font-weight: 700; font-size: 13px; }
.xp-bar { height: 12px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.xp-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); box-shadow: 0 0 12px rgba(var(--acc-rgb),.6); transition: width .6s; }
#passClaim:disabled { opacity: .45; cursor: default; }
.pass-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pass-tier { --rc: var(--accent); position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 8px 10px; border-radius: 14px; text-align: center;
  background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line); min-height: 128px; }
.pass-tier.big { grid-column: span 2; border-color: color-mix(in srgb, var(--rc) 60%, transparent); cursor: pointer; }
.pass-tier.r-rare { --rc: #3f9bff; } .pass-tier.r-xpecial { --rc: #e46bff; } .pass-tier.r-cosmic { --rc: #b98cff; }
.pass-tier .pt-lv { position: absolute; top: 7px; left: 9px; font-size: 12px; font-weight: 900; font-style: italic; color: var(--muted); }
.pass-tier canvas { position: relative; inset: auto; width: 100%; height: 74px; border-radius: 10px; background: radial-gradient(circle at 50% 60%, #1f3a2a, #0b140f); }
.pass-tier b { font-weight: 900; font-size: 14px; }
.pass-tier small { color: var(--muted); font-size: 11px; }
.pt-coins { display: flex; align-items: center; gap: 6px; margin: 14px 0 8px; }
.pt-coins b { font-size: 20px; color: #7cff6b; }
.pt-btn { padding: 7px 12px; font-size: 13px; margin-top: auto; }
.pt-state { display: flex; align-items: center; gap: 4px; margin-top: auto; font-weight: 800; }
.pt-state .ico-svg { width: 13px; height: 13px; }
.pass-tier.locked > * { opacity: .5; }
.pass-tier.locked { background: linear-gradient(170deg, rgba(20,26,23,.98), rgba(10,14,12,.98)); }
.pass-tier.open { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--acc-rgb),.4), 0 0 22px rgba(var(--acc-rgb),.2); }
.pass-tier.got .pt-state { color: var(--accent); }
.xp-res { margin: 10px auto 4px; max-width: 420px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.xp-res .xp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.xp-res b { color: var(--accent); font-weight: 900; font-style: italic; font-size: 18px; }
.xp-res small { color: var(--muted); font-weight: 700; font-size: 12.5px; text-align: right; }
.xp-res.up { border-color: var(--accent); box-shadow: 0 0 24px rgba(var(--acc-rgb),.25); }
.xp-res.up small { color: #fff; }

/* ---------- Xclusivos (oro y negro) ---------- */
.item.r-exclusive { --rc: #ffd84d; background: linear-gradient(170deg, rgba(48,36,8,.97), rgba(14,11,4,.97)); box-shadow: 0 0 22px rgba(255,216,77,.25); }
.item.r-exclusive .rarity { background: linear-gradient(90deg, #fff1a8, #ffb800, #fff1a8); background-size: 200% 100%; animation: cosmicSlide 2.5s linear infinite; }
.modal-card.r-exclusive { box-shadow: 0 0 0 2px #ffd84d, 0 0 50px rgba(255,216,77,.4), 0 40px 120px rgba(0,0,0,.7); }

/* ---------- Ajustes con pestañas (sin desplazarse) ---------- */
.settings-card { height: min(640px, calc(100vh - 32px)); max-height: none; overflow: hidden; }
.set-tabs { justify-content: flex-start; }
.set-pane { flex: 1; min-height: 0; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.vol-row { display: flex; align-items: center; gap: 12px; }
.vol-row .ico-svg { width: 22px; height: 22px; color: var(--muted); }
.vol-row b { min-width: 48px; text-align: right; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--accent); }
#volRange { --v: 80%; flex: 1; height: 10px; -webkit-appearance: none; appearance: none; border-radius: 5px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) var(--v), rgba(255,255,255,.12) var(--v)); }
#volRange::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 12px rgba(var(--acc-rgb),.6); }
#volRange::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.pad-status { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.05); color: var(--muted); font-weight: 700; font-size: 14px; }
.pad-status.on { color: var(--accent); background: rgba(var(--acc-rgb),.1); }
.pad-table td { font-size: 13.5px; }
.pb { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 50%; font-weight: 900; font-size: 12px; background: #1b2420; border: 1.5px solid currentColor; }
.pb.x { color: #7fa8ff; } .pb.ci { color: #ff7a82; } .pb.sq { color: #ff8fd8; } .pb.tr { color: #5fe0b0; }
.pb.a { color: #6fdc5f; } .pb.b { color: #ff6b6b; } .pb.xx { color: #5fa8ff; } .pb.y { color: #ffd84d; }
.mobile-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); }
.mobile-note .ico-svg { width: 26px; height: 26px; color: var(--accent); }
.mobile-note p { margin: 0; font-size: 13px; color: #cfd9d3; line-height: 1.45; }

/* ---------- Pausa con ajustes ---------- */
.pause-card.wide { width: min(980px, 100%); display: grid; grid-template-columns: 300px 1fr; gap: 22px; text-align: left; align-items: start; }
@media (max-width: 760px) { .pause-card.wide { grid-template-columns: 1fr; } }
.pause-main { display: flex; flex-direction: column; gap: 10px; }
.pause-card.wide .pause-main { text-align: center; }
.pause-opts h3 { margin: 0 0 10px; color: #fff; font-size: 18px; font-style: italic; letter-spacing: 0; text-transform: none; }
.pause-opts .panel { max-height: calc(100vh - 230px); overflow-y: auto; padding: 14px; }
.pause-opts .seg button { padding: 7px 8px; font-size: 13px; min-width: 54px; }
.pause-opts .opt { margin-bottom: 10px; }
#pauseApply { margin-top: 10px; width: 100%; }
#pauseApply:disabled { opacity: .4; cursor: default; }

/* ---------- Mando: botón con el foco ---------- */
body.pad-mode button:focus, body.pad-mode [tabindex="0"]:focus, body.pad-mode input:focus { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(var(--acc-rgb),.25); }

/* ---------- Móvil: controles táctiles ---------- */
.touch { position: absolute; inset: 0; z-index: 4; pointer-events: none; touch-action: none; }
.t-zone { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; pointer-events: auto; touch-action: none; }
.t-zone small { position: absolute; left: 22px; bottom: 26px; color: rgba(255,255,255,.45); font-size: 12px; font-weight: 700; }
.t-stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.3); }
.t-stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(var(--acc-rgb),.75); box-shadow: 0 0 18px rgba(var(--acc-rgb),.6); }
.t-btns { position: absolute; right: 14px; bottom: 16px; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 12px; align-items: end; pointer-events: auto; }
.t-btn { width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); color: #fff; font: 900 11px Rubik, system-ui, sans-serif;
  letter-spacing: .06em; background: rgba(10,17,14,.55); touch-action: none; user-select: none; -webkit-user-select: none; }
.t-btn.kick { grid-row: 1 / span 2; grid-column: 2; width: 96px; height: 96px; font-size: 14px; border-color: var(--accent); background: rgba(var(--acc-rgb),.28); }
.t-btn.sprint { grid-row: 2; grid-column: 1; border-color: #ffd84d; }
.t-btn.power { grid-row: 1; grid-column: 1; border-color: #ff7a1a; }
.t-btn.on { transform: scale(.92); background: rgba(255,255,255,.3); }
.rotate { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(5,10,8,.96); text-align: center; }
.rotate .ico-svg { width: 64px; height: 64px; color: var(--accent); animation: rot 1.6s ease-in-out infinite; }
.rotate b { font-size: 26px; font-weight: 900; font-style: italic; }
.rotate small { color: var(--muted); }
@keyframes rot { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* ---------- Pantallas pequeñas y móviles en horizontal ---------- */
@media (max-width: 900px) {
  .btn.tile { min-width: 84px; padding: 10px 12px; font-size: 12px; }
  .btn.tile .ico-svg { width: 24px; height: 24px; }
  .home-screen { padding: 14px 16px; }
}
@media (max-height: 520px) {
  #hud { height: 54px; }
  .sb-row { height: 34px; }
  .sb-score { width: 46px; font-size: 24px; }
  .sb-team { min-width: 80px; font-size: 12px; padding: 0 14px; }
  .sb-clock { min-width: 84px; }
  .sb-clock #hudTime { font-size: 18px; }
  .sb-poss { display: none; }
  .logo { font-size: 34px; }
  #showcase { height: 34vh; }
  .play-big { font-size: 28px; padding: 10px 24px 12px; }
  .screen { padding: 10px; }
  .card { padding: 16px; }
  h2 { font-size: 24px; }
  .mode-card { min-height: 0; padding: 14px; }
  .mode-card .mi, .mode-card .mi .ico-svg { width: 30px; height: 30px; }
  .mode-card b { font-size: 17px; }
  .mode-card small { font-size: 12px; }
  .settings-card { height: calc(100vh - 20px); }
  .myst-chip { top: 6px; padding: 4px 10px 6px; }
  .myst-chip b { font-size: 12px; }
  .t-btn { width: 60px; height: 60px; }
  .t-btn.kick { width: 82px; height: 82px; }
}
@media (pointer: coarse) {
  .btn, .seg button, .tabs button { min-height: 40px; }
  #stage { touch-action: none; }
}
@media (max-width: 640px) {
  .home-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
  .side-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .btn.tile { min-width: 0; padding: 9px 2px; font-size: 9px; letter-spacing: .03em; }
  .btn.tile .ico-svg { width: 22px; height: 22px; }
  .play-big { transform: none; text-align: center; font-size: 30px; }
  .play-big:active { transform: translateY(6px); }
  .top-right { gap: 6px; }
  .coins small { display: none; }
  .coins { padding: 6px 10px; }
}

/* ---------- v9: ruletas más espaciadas y premio con animación ---------- */
.wheels-layout { gap: 28px; }
@media (min-width: 821px) { .wheels-layout { grid-template-columns: 240px minmax(0, 1fr); } }
.wheel-list { gap: 10px; }
.wheel-pick { padding: 12px 16px; row-gap: 3px; }
.wheel-main { gap: 16px; padding: 26px 22px 22px; }
.wheel-title { gap: 4px; margin-bottom: 4px; }
.wheel-main { min-width: 0; }
.wheel-main .wheel-wrap { width: min(540px, 100%, 52vh); }
.wheel-msg { margin: 2px 0 0; }
#spinBtn { width: min(340px, 100%); margin-top: 2px; }
.wheel-main .hint { margin: 0; }

.prize-burst { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%); animation: burst .7s ease-out both; }
@keyframes burst { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }
.prize-card { --pc: #7cff6b; width: min(460px, 100%); text-align: center; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 24px 22px; border-color: var(--pc); box-shadow: 0 0 0 2px var(--pc), 0 0 70px color-mix(in srgb, var(--pc) 45%, transparent), 0 40px 120px rgba(0,0,0,.7);
  animation: prizeIn .7s cubic-bezier(.2,1.4,.3,1) both; }
@keyframes prizeIn { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.06) rotate(1deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.prize-card > * { position: relative; z-index: 1; }
.prize-rays { position: absolute !important; z-index: 0 !important; left: 50%; top: 38%; width: 900px; height: 900px; margin: -450px 0 0 -450px; pointer-events: none;
  background: repeating-conic-gradient(color-mix(in srgb, var(--pc) 22%, transparent) 0deg 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 55%); mask: radial-gradient(circle, #000 15%, transparent 55%);
  animation: raysSpin 14s linear infinite; }
@keyframes raysSpin { to { transform: rotate(360deg); } }
.prize-kicker { font-weight: 900; font-style: italic; letter-spacing: .2em; font-size: 15px; color: var(--pc); text-shadow: 0 0 14px var(--pc);
  animation: kicker 1.2s ease-in-out infinite alternate; }
@keyframes kicker { from { transform: scale(1); } to { transform: scale(1.08); } }
#prizeCanvas { position: relative; inset: auto; width: 100%; height: 210px; border-radius: 16px; background: radial-gradient(circle at 50% 60%, #1f3a2a, #0b140f);
  animation: floaty 2.4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-5px); } }
.prize-coins { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 6px; animation: floaty 2.4s ease-in-out infinite; }
.prize-coins .coin-ico { width: 72px; height: 72px; border-width: 4px; animation: coinSpin 1.6s ease-in-out infinite; }
.prize-coins .coin-ico::after { font-size: 38px; }
@keyframes coinSpin { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
.prize-coins b { font-size: 54px; font-weight: 900; font-style: italic; color: #7cff6b; text-shadow: 0 0 22px rgba(124,255,107,.6); }
.prize-card .rarity { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.prize-card h3 { margin: 2px 0 0; font-size: 32px; font-weight: 900; font-style: italic; color: #fff; text-transform: uppercase; letter-spacing: .02em; }
.prize-card p { margin: 0; color: #cfd9d3; font-size: 14.5px; }
.prize-card .row { margin-top: 10px; width: 100%; }
#prizeClaim { min-width: 220px; animation: claimPulse 1.4s ease-in-out infinite; }
@keyframes claimPulse { 50% { box-shadow: 0 0 0 8px rgba(var(--acc-rgb),.18), 0 0 30px rgba(var(--acc-rgb),.5); } }
.prize-card.r-exclusive { background: radial-gradient(ellipse at 50% 30%, rgba(80,60,10,.98), rgba(14,11,4,.98)); }
.prize-card.r-exclusive h3 { color: #ffd84d; text-shadow: 0 0 20px rgba(255,216,77,.6); }
.prize-card.empty .prize-rays { display: none; }
#prize.claimed .prize-card { animation: prizeOut .38s ease-in both; }
@keyframes prizeOut { to { transform: scale(.6) translateY(-60px); opacity: 0; } }
.coins.bump { animation: coinsBump .6s cubic-bezier(.2,1.4,.3,1); }
@keyframes coinsBump { 40% { transform: scale(1.18); box-shadow: 0 0 24px rgba(124,255,107,.6); } }
@media (max-height: 520px) { #prizeCanvas { height: 130px; } .prize-coins .coin-ico { width: 52px; height: 52px; } .prize-coins b { font-size: 40px; } }

/* ---------- v10 ---------- */
/* Chat sin barra de desplazamiento (se sigue pudiendo bajar con la rueda). */
.chat ul { scrollbar-width: none; -ms-overflow-style: none; overflow-x: hidden; }
.chat ul::-webkit-scrollbar { display: none; }

/* Pase en el inicio: barra de nivel junto al logo. */
.top-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.pass-mini { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 16px; cursor: pointer;
  background: rgba(10,17,14,.8); border: 1px solid rgba(var(--acc-rgb),.45); color: var(--text); font: inherit; min-width: 230px;
  transition: border-color .15s, box-shadow .15s, transform .1s; }
.pass-mini:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.15); }
.pass-mini:active { transform: scale(.98); }
.pm-lv { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: #0b0f0d; border: 2px solid var(--accent); flex: none; }
.pm-lv small { font-size: 7px; font-weight: 900; letter-spacing: .18em; color: var(--muted); }
.pm-lv b { font-size: 20px; font-weight: 900; font-style: italic; line-height: 1; color: var(--accent); }
.pm-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pm-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pm-top b { font-size: 12px; font-weight: 900; font-style: italic; letter-spacing: .1em; }
.pm-top small { font-size: 11px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pass-mini .xp-bar { height: 9px; }
.pass-mini .dot { position: absolute; top: -4px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 12px var(--accent); animation: blink 1.4s infinite; }
.pass-mini .dot.hidden { display: none; }
@media (max-width: 900px) { .pass-mini { min-width: 0; } .pm-top b { display: none; } }
@media (max-width: 640px) { .top-left { gap: 8px; } .pass-mini { padding: 4px 8px 4px 4px; } .pm-lv { width: 36px; height: 36px; } .pm-lv b { font-size: 16px; } .pm-body { width: 70px; } .pm-top small { font-size: 9px; } }

/* Últimos 30 segundos: reloj en rojo que late. */
.sb-clock.hurry { border-top-color: #ff4d57; background: linear-gradient(#3a0e12, #160609); }
.sb-clock.hurry #hudTime { color: #ff4d57; animation: hurry 1s ease-in-out infinite; text-shadow: 0 0 12px rgba(255,77,87,.7); }
.sb-clock.hurry #hudInfo { color: #ff8a92; }
@keyframes hurry { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.16); } }
.banner.small .banner-title { font-size: clamp(26px, 5vw, 56px); }

/* Botón de sala online en cada modo. */
.start-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: stretch; }
@media (max-width: 640px) { .start-row { grid-template-columns: 1fr; } }
.btn.online-room { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 16px;
  background: rgba(63,140,255,.16); border-color: rgba(63,140,255,.6); }
.btn.online-room:hover { background: rgba(63,140,255,.28); }
.btn.online-room .ico-svg { width: 26px; height: 26px; color: #6fb0ff; }
.btn.online-room > span:last-child { display: flex; flex-direction: column; font-weight: 900; font-size: 15px; }
.btn.online-room small { font-weight: 600; font-size: 11px; color: var(--muted); max-width: 210px; }
#tour .start-row { align-self: center; width: min(720px, 100%); }
#tourPlayBtn { min-width: 0; }
.cup-card .cup-prize em { font-style: normal; margin-left: auto; color: var(--accent); font-size: 12px; }

/* Pausa: gráficos y cámara. */
.pause-gfx { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.pause-gfx .seg button { padding: 6px 4px; font-size: 12px; min-width: 0; }
.padbtn { min-width: 220px; }

/* ---------- v11: perfil, misiones diarias, estadísticas y logros ---------- */
.prof-top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 14px 20px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(var(--acc-rgb),.14), rgba(12,19,16,.95) 55%); border: 1px solid rgba(var(--acc-rgb),.35); }
#profAvatar { position: relative; inset: auto; width: 96px; height: 96px; }
.prof-name b { display: block; font-size: 30px; font-weight: 900; font-style: italic; }
.prof-name small { color: var(--muted); font-size: 13px; }
.prof-quick { display: flex; gap: 10px; }
.prof-quick div { min-width: 96px; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); text-align: center; }
.prof-quick b { display: block; font-size: 24px; font-weight: 900; font-style: italic; color: var(--accent); }
.prof-quick small { color: var(--muted); font-size: 11px; font-weight: 700; }
@media (max-width: 760px) { .prof-top { grid-template-columns: auto 1fr; } .prof-quick { grid-column: 1 / -1; } .prof-quick div { flex: 1; min-width: 0; } }
#profTabs button { position: relative; }
.tdot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 10px var(--accent); animation: blink 1.4s infinite; }
.prof-pane { min-height: 0; }

.mission-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; width: 100%; }
.mission { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 16px;
  background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line); }
.mission .m-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: var(--muted); }
.mission .m-ico .ico-svg { width: 24px; height: 24px; }
.m-body b { display: block; font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.m-body small { display: block; margin-top: 5px; color: var(--muted); font-weight: 700; font-size: 12px; }
.m-reward { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-weight: 900; }
.m-reward span { display: flex; align-items: center; gap: 6px; color: #7cff6b; }
.m-reward .coin-ico { width: 16px; height: 16px; border-width: 1.5px; }
.m-reward .coin-ico::after { font-size: 9px; }
.m-reward em { font-style: normal; font-size: 17px; font-weight: 900; color: var(--accent); white-space: nowrap; }
.m-act { min-width: 110px; display: flex; justify-content: flex-end; }
.m-act .btn { padding: 9px 16px; }
.m-reroll { font-size: 13px; color: var(--muted); }
.m-ok { display: flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 800; }
.m-ok .ico-svg { width: 14px; height: 14px; }
.mission.done { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--acc-rgb),.4), 0 0 26px rgba(var(--acc-rgb),.18); }
.mission.done .m-ico, .mission.claimed .m-ico { background: rgba(var(--acc-rgb),.15); color: var(--accent); }
.mission.claimed { opacity: .6; }
@media (max-width: 640px) { .mission { grid-template-columns: auto 1fr; } .m-reward { align-items: flex-start; } .m-act { justify-content: flex-start; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 14px; background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat.big { border-color: rgba(var(--acc-rgb),.45); }
.stat.big b { font-size: 34px; font-style: italic; color: var(--accent); }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ach { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(170deg, rgba(25,38,32,.96), rgba(12,19,16,.96)); border: 1px solid var(--line); }
.ach .ach-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--muted); }
.ach .ach-ico .ico-svg { width: 22px; height: 22px; }
.ach-body b { display: block; font-weight: 900; font-size: 15px; }
.ach-body small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.ach-body .xp-bar { height: 6px; }
.ach-body em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; }
.ach-rw { display: flex; align-items: center; gap: 5px; font-weight: 900; color: #7cff6b; font-size: 13px; }
.ach-rw .coin-ico { width: 15px; height: 15px; border-width: 1.5px; }
.ach-rw .coin-ico::after { font-size: 8px; }
.ach.got { border-color: rgba(255,216,77,.55); background: linear-gradient(160deg, rgba(48,38,10,.96), rgba(14,12,5,.96)); }
.ach.got .ach-ico { background: radial-gradient(circle, #ffe680, #c98f00); color: #241a00; box-shadow: 0 0 16px rgba(255,216,77,.5); }
.ach:not(.got) { opacity: .75; }

/* Aviso de logro o misión completada (arriba, sin tapar el juego). */
.ach-pop { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 80; pointer-events: none;
  display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(48,38,10,.97), rgba(14,12,5,.97)); border: 1.5px solid #ffd84d; box-shadow: 0 0 30px rgba(255,216,77,.35), 0 18px 40px rgba(0,0,0,.5); }
.ach-pop.show { animation: achIn 2.9s cubic-bezier(.2,1.3,.3,1) both; }
@keyframes achIn { 0% { transform: translate(-50%, -120%); opacity: 0; } 10% { transform: translate(-50%, 0); opacity: 1; } 88% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(-50%, -120%); opacity: 0; } }
.ach-pop .ach-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #ffe680, #c98f00); color: #241a00; }
.ach-pop .ach-ico .ico-svg { width: 22px; height: 22px; }
.ach-pop small { display: block; font-size: 10px; font-weight: 900; letter-spacing: .18em; color: #ffd84d; }
.ach-pop b { font-size: 17px; font-weight: 900; font-style: italic; }
.ach-pop em { display: flex; align-items: center; gap: 5px; font-style: normal; font-weight: 900; color: #7cff6b; margin-left: 6px; }
.ach-pop em:empty { display: none; }

/* Inicio: 6 botones. */
@media (max-width: 640px) { .side-btns { grid-template-columns: repeat(3, 1fr); } }
.acct-btn { position: relative; }
.acct-btn .dot { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 12px var(--accent); animation: blink 1.4s infinite; }
.acct-btn .dot.hidden { display: none; }
.prof-acct { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; font-size: 13px; }
.prof-acct .ico-svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- XCoin: la X es un dibujo (no una letra), así queda centrada y nítida a cualquier tamaño ---------- */
.coin-ico::after { content: none !important; }
.coin-ico {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.3 6.6l5.6 10.8M16.5 6.6l-8.6 10.8' stroke='%237cff6b' stroke-width='3.3' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
    radial-gradient(circle at 35% 28%, #2b322e, #0b0f0d 68%);
  vertical-align: middle;
}
.coin-ico, .item .buy .coin-ico, .cup-card .cup-prize .coin-ico, .wheel-pick small .coin-ico, .m-reward .coin-ico, .ach-rw .coin-ico { flex: none; }
.item .buy .coin-ico, .wheel-pick small .coin-ico, .m-reward .coin-ico, .ach-rw .coin-ico, .cup-card .cup-prize .coin-ico {
  width: 16px; height: 16px; border-width: 1.5px; box-shadow: 0 0 6px rgba(124,255,107,.45);
}

/* ---------- XCoin definitiva: doble aro verde y X en cursiva gruesa (dibujo, no letra) ---------- */
.coin-ico, .item .buy .coin-ico, .cup-card .cup-prize .coin-ico, .wheel-pick small .coin-ico, .m-reward .coin-ico, .ach-rw .coin-ico, .prize-coins .coin-ico {
  border: none !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='22' fill='%230b0f0d' stroke='%237cff6b' stroke-width='2'/%3E%3Ccircle cx='24' cy='24' r='17.5' fill='none' stroke='%237cff6b' stroke-width='2'/%3E%3Cpath d='M18.6 15.5h5l7.6 17h-5zM27.5 15.5h5L19.2 32.5h-5z' fill='%237cff6b'/%3E%3C/svg%3E") center / 100% 100% no-repeat !important;
  box-shadow: 0 0 8px rgba(124,255,107,.35) !important;
  border-radius: 50%;
}

/* ---------- v12: tutorial ---------- */
#hud.tut .sb { visibility: hidden; }
.tut { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; width: min(560px, calc(100% - 32px));
  padding: 14px 18px 16px; border-radius: 18px; background: rgba(10,17,14,.92); border: 1.5px solid rgba(var(--acc-rgb),.55);
  box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 0 4px rgba(var(--acc-rgb),.08); transition: border-color .2s, box-shadow .2s; }
.tut.done { border-color: var(--accent); box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 30px rgba(var(--acc-rgb),.35); }
.tut-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.tut-top small { font-size: 11px; font-weight: 900; letter-spacing: .18em; color: var(--accent); }
.tut-top .btn { padding: 5px 12px; font-size: 12px; }
.tut b { display: block; font-size: 26px; font-weight: 900; font-style: italic; }
.tut p { margin: 4px 0 10px; color: #dfe8e2; font-weight: 600; font-size: 15px; line-height: 1.35; }
.tut-prog { display: flex; align-items: center; gap: 10px; }
.tut-prog .xp-bar { flex: 1; height: 9px; }
.tut-prog .xp-bar i { transition: width .15s; }
.tut-prog em { font-style: normal; font-weight: 900; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tut-prog em:empty { display: none; }
.set-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .tut { top: 8px; padding: 10px 12px 12px; } .tut b { font-size: 20px; } .tut p { font-size: 13px; margin-bottom: 8px; } }

/* Logros conseguidos: las XCoins se cobran solas. */
.ach-body em.ach-paid { display: flex; align-items: center; gap: 4px; color: #ffd84d; }
.ach-body em.ach-paid .ico-svg, .ach-body em.ach-paid svg { width: 12px; height: 12px; }

/* Tienda: objetos que no se venden (botón que lleva a la ruleta o al pase). */
.item .buy.get { font-size: 12px; font-weight: 900; }
.item .buy.get svg { width: 14px; height: 14px; flex: none; }
.item .buy.get.wheel { background: rgba(255,216,77,.14); border-color: rgba(255,216,77,.6); color: #ffd84d; }
.item .buy.get.wheel:hover { background: rgba(255,216,77,.26); }
.item .buy.get.pass { background: rgba(var(--acc-rgb),.12); border-color: rgba(var(--acc-rgb),.55); color: var(--accent); }
.item .buy.get.pass:hover { background: rgba(var(--acc-rgb),.24); }

/* ---------- Pantalla de carga ---------- */
.loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; color: #fff;
  font-family: Rubik, system-ui, sans-serif; background: radial-gradient(ellipse at 50% 40%, #173a24 0%, #0a110e 62%, #050806 100%);
  transition: opacity .65s ease, transform .65s cubic-bezier(.6,0,.4,1); }
.loader.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
.ld-pitch { position: absolute; left: -20%; right: -20%; bottom: -30%; height: 75%; opacity: .55;
  background: repeating-linear-gradient(90deg, rgba(124,255,107,.07) 0 80px, rgba(124,255,107,.02) 80px 160px),
    linear-gradient(rgba(124,255,107,.16) 2px, transparent 2px) 0 0 / 100% 120px;
  transform: perspective(600px) rotateX(62deg); transform-origin: 50% 0; animation: ldPitch 3s linear infinite;
  mask-image: linear-gradient(transparent, #000 40%); -webkit-mask-image: linear-gradient(transparent, #000 40%); }
@keyframes ldPitch { to { background-position: 0 0, 0 120px; } }
.ld-glow { position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%; background: radial-gradient(circle, rgba(124,255,107,.22), transparent 65%);
  animation: ldGlow 2.4s ease-in-out infinite; }
@keyframes ldGlow { 0%, 100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
.ld-center { position: relative; display: flex; flex-direction: column; align-items: center; width: min(560px, 84vw); }
.ld-logo { display: flex; font: 900 italic clamp(72px, 15vw, 170px)/1 Rubik, sans-serif; letter-spacing: -.02em; }
.ld-logo span { display: inline-block; color: #7cff6b; text-shadow: 0 8px 0 rgba(0,0,0,.35), 0 0 40px rgba(124,255,107,.45);
  opacity: 0; transform: translateY(-60px) scale(1.4); animation: ldDrop .55s cubic-bezier(.2,1.5,.4,1) forwards; }
.ld-logo span:first-child { color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,.35), 0 0 30px rgba(255,255,255,.35); }
.ld-logo span:nth-child(2) { animation-delay: .12s; } .ld-logo span:nth-child(3) { animation-delay: .19s; }
.ld-logo span:nth-child(4) { animation-delay: .26s; } .ld-logo span:nth-child(5) { animation-delay: .33s; }
@keyframes ldDrop { to { opacity: 1; transform: none; } }
.ld-sub { margin-top: 6px; font: 900 italic clamp(14px, 2.4vw, 22px) Rubik; letter-spacing: .5em; color: #b9c8bf; opacity: 0; animation: ldFade .5s .5s forwards; }
@keyframes ldFade { to { opacity: 1; } }
.ld-track { position: relative; width: 100%; margin-top: 48px; height: 14px; opacity: 0; animation: ldFade .4s .6s forwards; }
.ld-bar { position: absolute; inset: 0; border-radius: 7px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, #2e8f22, #7cff6b); box-shadow: 0 0 18px rgba(124,255,107,.7); }
#ldBall { position: absolute; left: 0; top: 50%; width: 48px; height: 48px; z-index: 2; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.ld-row { width: 100%; display: flex; justify-content: space-between; margin-top: 26px; font-weight: 800; font-size: 15px; color: #c9d6cf;
  opacity: 0; animation: ldFade .4s .7s forwards; }
.ld-row b { color: #7cff6b; font-variant-numeric: tabular-nums; }
.ld-tip { position: absolute; bottom: max(28px, 5vh); left: 16px; right: 16px; margin: 0 auto; max-width: 620px; text-align: center; color: #dfe8e2;
  font-weight: 600; font-size: 15px; opacity: 0; animation: ldFade .5s .9s forwards; }
.ld-tip b { display: block; font: 900 italic 12px Rubik; letter-spacing: .3em; color: #ffd84d; margin-bottom: 6px; }
/* Al llegar al 100 %: destello del logo antes de irse. */
.loader.done .ld-logo span { animation: ldFlash .45s ease-out forwards; opacity: 1; transform: none; }
@keyframes ldFlash { 0% { filter: brightness(1); } 35% { filter: brightness(2.2); transform: scale(1.08); } 100% { filter: brightness(1); transform: scale(1); } }

/* =====================================================================
   v13: móvil — joystick y botones nuevos, menús compactos en pantallas bajas
   ===================================================================== */
.t-zone { width: 52%; }
.t-zone small { left: 50%; transform: translateX(-50%); bottom: 10px; white-space: nowrap; background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 999px; }
.t-stick { --r: 54px; width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  background: radial-gradient(circle, rgba(255,255,255,.04) 55%, rgba(255,255,255,.1)); border: 2px solid rgba(255,255,255,.35);
  transition: opacity .2s, border-color .15s, box-shadow .15s; }
.t-stick::after { content: ''; position: absolute; inset: calc(var(--r) * -0.2); border-radius: 50%; border: 2px dashed rgba(255,216,77,.0); transition: border-color .15s; }
.t-stick i { width: calc(var(--r) * 0.9); height: calc(var(--r) * 0.9); margin: calc(var(--r) * -0.45) 0 0 calc(var(--r) * -0.45); }
.t-stick.idle { opacity: .35; }
.t-stick.idle i { box-shadow: none; }
.t-stick.sprint { border-color: #ffd84d; box-shadow: 0 0 24px rgba(255,216,77,.45); }
.t-stick.sprint::after { border-color: rgba(255,216,77,.6); }
.t-stick.sprint i { background: rgba(255,216,77,.85); box-shadow: 0 0 18px rgba(255,216,77,.7); }
.t-bzone { position: absolute; right: 0; bottom: 0; width: 48%; top: 64px; pointer-events: auto; touch-action: none; }
.t-btns { --kb: clamp(70px, 24vh, 116px); position: absolute; inset: 0; display: block; pointer-events: none; }
.t-btn { position: absolute; display: grid; place-items: center; pointer-events: none; width: calc(var(--kb) * 0.7); height: calc(var(--kb) * 0.7);
  font-size: calc(var(--kb) * 0.12); background: rgba(10,17,14,.42); border-width: 2.5px; transition: transform .08s, background .08s; }
.t-btn.kick { width: var(--kb); height: var(--kb); right: max(14px, 3.5vw); bottom: max(14px, 6vh); font-size: calc(var(--kb) * 0.18); background: rgba(var(--acc-rgb),.22); }
.t-btn.sprint { right: calc(max(14px, 3.5vw) + var(--kb) + 12px); bottom: max(10px, 4vh); color: #ffd84d; }
.t-btn.power { right: calc(max(14px, 3.5vw) + var(--kb) * 0.15); bottom: calc(max(14px, 6vh) + var(--kb) + 12px); color: #ffb36b; }
.t-btn.on { transform: scale(.9); background: rgba(255,255,255,.32); }
.t-btn.kick.on { background: rgba(var(--acc-rgb),.6); }
@media (max-height: 520px) { .t-btn { width: calc(var(--kb) * 0.7); height: calc(var(--kb) * 0.7); } .t-btn.kick { width: var(--kb); height: var(--kb); } }

/* Menús en pantallas bajas (móvil en horizontal): todo más compacto y el botón de empezar siempre a mano. */
@media (max-height: 520px) {
  .screen-head { margin-bottom: 0; }
  .screen-head .btn { padding: 6px 12px; min-height: 34px; }
  .card, .wide-wrap { gap: 10px; }
  .mode-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mode-card.online { grid-column: span 1; }
  .mode-card { flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; }
  .mode-card small { font-size: 11px; line-height: 1.3; }
  #options { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .opt { margin-bottom: 8px; }
  .opt-label { font-size: 10px; margin-bottom: 4px; }
  .seg { gap: 4px; }
  .seg button { padding: 5px 6px; font-size: 12px; min-width: 0; min-height: 32px; border-radius: 8px; }
  .setup-card { gap: 8px; }
  .setup-note { font-size: 12px; margin: 0; }
  .setup-card .start-row, #tour .start-row { position: sticky; bottom: -16px; z-index: 2; padding: 8px 0 6px; background: linear-gradient(transparent, var(--panel) 30%); }
  #tour .start-row { bottom: -10px; background: linear-gradient(transparent, rgba(8,14,11,.96) 30%); }
  .btn.primary.big { padding: 10px 18px; font-size: 18px; }
  .btn.online-room { padding: 6px 12px; }
  .btn.online-room small { display: none; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .item { padding: 10px; }
  .item canvas { height: 84px; }
  .item p { display: none; }
  .tabs button { padding: 6px 12px; font-size: 13px; }
  .cup-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cup-card { padding: 10px; }
  .cup-card p, .cup-card small { font-size: 11px; }
  .bracket { grid-template-columns: repeat(3, 1fr) 110px; gap: 8px; font-size: 12px; }
  .prof-top { padding: 8px 14px; gap: 12px; }
  #profAvatar { width: 64px; height: 64px; }
  .prof-name b { font-size: 22px; }
  .prof-quick div { min-width: 74px; padding: 6px 8px; }
  .prof-quick b { font-size: 18px; }
  .mission { padding: 10px 14px; gap: 12px; }
  .wheel-main { padding: 12px; gap: 8px; }
  .wheel-main .wheel-wrap { width: min(100%, 50vh); }
  .wheel-main .hint, #wheelDesc { display: none; }
  .wheel-pick { padding: 6px 10px; }
  .pass-top { padding: 8px 12px; }
  .ld-logo { font-size: min(15vw, 24vh); }
  .ld-track { margin-top: 24px; }
  .ld-row { margin-top: 14px; }
  .ld-tip { bottom: 12px; font-size: 13px; }
  .tut { top: 6px; padding: 8px 12px 10px; width: min(460px, 60vw); }
  .tut b { font-size: 18px; }
  .tut p { font-size: 12px; margin: 2px 0 6px; }
}

/* Móviles pequeños en horizontal: botones del inicio en una fila y ruletas en dos columnas. */
@media (max-height: 520px) {
  .side-btns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; flex-wrap: nowrap; }
  .btn.tile { min-width: 0; padding: 8px 4px; font-size: 10px; letter-spacing: .03em; }
  .btn.tile .ico-svg { width: 20px; height: 20px; }
  .play-big { font-size: 26px; padding: 8px 20px 10px; white-space: nowrap; }
  .play-big .ico-svg { width: 24px; height: 24px; }
  .wheels-layout { grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 12px; }
  .wheel-list { flex-direction: column; flex-wrap: nowrap; }
  .wheel-pick { flex: none; }
}

/* ---------- v13: misiones diarias/semanales/mensuales y logros que se reclaman ---------- */
.mis-seg { max-width: 860px; margin: 0 auto 12px; width: 100%; }
.mis-seg button { position: relative; flex: 1; padding: 10px 12px; font-weight: 800; }
.mis-seg .tdot { top: 4px; right: 6px; }
.m-reward span { gap: 6px; }
.ach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 40px; }
.ach-head span { color: var(--muted); font-weight: 700; }
.ach-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ach-act .btn { padding: 7px 14px; font-size: 13px; }
.ach.ready { border-color: var(--accent); background: linear-gradient(160deg, rgba(25,52,32,.98), rgba(12,22,16,.98)); box-shadow: 0 0 0 1px rgba(var(--acc-rgb),.4), 0 0 24px rgba(var(--acc-rgb),.2); opacity: 1; }
.ach.ready .ach-ico { background: rgba(var(--acc-rgb),.18); color: var(--accent); box-shadow: 0 0 14px rgba(var(--acc-rgb),.4); }
.ach.ready .ach-body small { margin-bottom: 0; }
.ach-body em.ach-paid { color: #ffd84d; }

/* =====================================================================
   v13: amigos, sala en el inicio (el grupo) e invitaciones
   ===================================================================== */
/* Botón de amigos, a la derecha del pase */
.friends-btn { position: relative; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 16px 0 12px; border-radius: 16px; cursor: pointer;
  background: rgba(10,17,14,.8); border: 1px solid rgba(var(--acc-rgb),.45); color: var(--text); font: 900 italic 13px Rubik, system-ui, sans-serif; letter-spacing: .1em;
  transition: border-color .15s, box-shadow .15s, transform .1s; }
.friends-btn:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.15); }
.friends-btn:active { transform: scale(.97); }
.friends-btn .ico-svg { width: 26px; height: 26px; color: var(--accent); }
.friends-btn b { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink, #0b1a08); font-size: 12px; font-style: normal; }
.friends-btn b.hidden { display: none; }
.friends-btn .dot { position: absolute; top: -4px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: #ffd84d;
  box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 12px #ffd84d; animation: blink 1.4s infinite; }
.friends-btn .dot.hidden { display: none; }

/* Barra de la sala: crear sala o el código arriba */
.room-bar { min-height: 46px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.room-create { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-weight: 900; letter-spacing: .08em; font-size: 14px;
  background: rgba(10,17,14,.8); border: 1.5px dashed rgba(var(--acc-rgb),.7); color: var(--accent); }
.room-create:hover { background: rgba(var(--acc-rgb),.14); }
.room-create .ico-svg { width: 18px; height: 18px; }
.room-pill { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 18px; border-radius: 999px; background: rgba(10,17,14,.88); border: 1.5px solid var(--accent);
  box-shadow: 0 0 22px rgba(var(--acc-rgb),.25); }
.room-pill.hidden { display: none; }
.room-pill small { font-weight: 900; letter-spacing: .2em; font-size: 11px; color: var(--muted); }
.room-pill b { font: 900 italic 28px/1 Rubik, system-ui, sans-serif; letter-spacing: .2em; color: var(--accent); user-select: text; }
.room-pill button { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.08); color: var(--text); }
.room-pill button:hover { background: rgba(255,255,255,.18); }
.room-pill button .ico-svg { width: 16px; height: 16px; }
.room-pill em { font-style: normal; font-weight: 900; font-size: 12px; color: var(--muted); padding-right: 8px; }
.room-pill em.hidden { display: none; }

/* El grupo: tu ficha en medio, los de tu sala a los lados y el + */
.party { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 0; }
.party-side { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.party.has-others #showcase { width: min(430px, 36vw); height: min(380px, 42vh); }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 0; width: 140px; animation: pcIn .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes pcIn { from { opacity: 0; transform: translateY(14px) scale(.85); } }
.pcard canvas { width: 118px; height: 118px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); }
.pcard b { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 italic 17px Rubik, system-ui, sans-serif; }
.pcard small { color: var(--accent); font-weight: 900; letter-spacing: .14em; font-size: 10px; min-height: 12px; }
.party-plus { width: 96px; height: 96px; border-radius: 50%; border: 2.5px dashed rgba(var(--acc-rgb),.65); background: rgba(var(--acc-rgb),.07); color: var(--accent); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: transform .12s, background .12s, box-shadow .12s; font-family: inherit; }
.party-plus:hover { background: rgba(var(--acc-rgb),.18); box-shadow: 0 0 0 5px rgba(var(--acc-rgb),.12); transform: scale(1.05); }
.party-plus .ico { display: block; }
.party-plus .ico-svg { width: 38px; height: 38px; stroke-width: 2.2; }
.party-plus small { font-weight: 900; letter-spacing: .14em; font-size: 9px; }
.play-big.waiting { font-size: 15px; letter-spacing: .06em; line-height: 1.15; max-width: 190px; text-align: center; background: linear-gradient(#3a443f, #232a27); color: #b9c8bf; box-shadow: none; cursor: default; }

/* Modos: tira para unirse con código */
.join-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: linear-gradient(120deg, rgba(22,40,70,.9), rgba(12,20,30,.9)); border: 1px solid rgba(63,140,255,.5); }
.join-strip .ico-svg { width: 24px; height: 24px; color: #6fb0ff; }
.join-strip b { flex: 1; min-width: 150px; font-weight: 800; }
.join-strip input { width: 130px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: 900 20px Rubik, system-ui, sans-serif; letter-spacing: .25em; text-align: center; text-transform: uppercase; }
.join-strip #joinServer { width: 210px; font: 600 14px Rubik; letter-spacing: 0; text-transform: none; }
.join-strip input:focus { outline: none; border-color: var(--accent); }
.join-strip.hidden, .join-strip input.hidden { display: none; }
.lobby-head .row { margin-top: 0; }

/* Ventana de amigos */
.friends-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; }
.fr-head { display: flex; align-items: center; justify-content: space-between; }
.fr-head h3 { margin: 0; font: 900 italic 26px Rubik, system-ui, sans-serif; }
.fr-add { display: flex; gap: 8px; }
.fr-add input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: 600 15px Rubik, system-ui, sans-serif; }
.fr-add input:focus { outline: none; border-color: var(--accent); }
#friendsMain { display: flex; flex-direction: column; gap: 6px; }
#friendsMain.hidden, #friendsGuest.hidden, #friendReqsBox.hidden { display: none; }
#friendsMain .hint { margin: 2px 0 6px; }
#friendsGuest p { color: var(--muted); line-height: 1.5; }
.fr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: min(44vh, 360px); overflow-y: auto; scrollbar-width: thin; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.fr-row.on { border-color: rgba(var(--acc-rgb),.4); }
.fr-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #55605a; }
.fr-row.on .fr-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.fr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-info b, .fr-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.fr-info small { color: var(--muted); font-weight: 700; font-size: 12px; }
.fr-row.on .fr-info small { color: var(--accent); }
.fr-act { display: flex; gap: 6px; flex: none; }
.fr-act .btn { padding: 7px 12px; font-size: 13px; min-height: 0; }
.fr-act .fr-del { padding: 7px 9px; }
.fr-act .fr-del .ico-svg { width: 14px; height: 14px; }

/* Invitación recibida */
.invite-banner { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 16px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(22,40,70,.97), rgba(12,20,30,.97)); border: 1.5px solid #6fb0ff; box-shadow: 0 0 30px rgba(63,140,255,.35), 0 18px 40px rgba(0,0,0,.5);
  animation: invIn .35s cubic-bezier(.2,1.3,.3,1); max-width: calc(100vw - 20px); }
@keyframes invIn { from { opacity: 0; transform: translate(-50%, -20px); } }
.invite-banner.hidden { display: none; }
.invite-banner > .ico-svg { width: 28px; height: 28px; color: #6fb0ff; flex: none; }
.invite-banner div { display: flex; flex-direction: column; }
.invite-banner b { font: 900 italic 18px Rubik, system-ui, sans-serif; }
.invite-banner small { color: var(--muted); font-weight: 700; }
.invite-banner .btn { padding: 8px 14px; font-size: 14px; }

/* Pantallas pequeñas */
@media (max-width: 900px) { .friends-btn .fb-txt { display: none; } .friends-btn { padding: 0 12px; } .party-side { flex-basis: 110px; } .pcard { width: 108px; } .pcard canvas { width: 90px; height: 90px; } .pcard b { max-width: 108px; font-size: 14px; } .party-plus { width: 78px; height: 78px; } }
@media (max-width: 640px) { .friends-btn { height: 44px; border-radius: 12px; padding: 0 10px; } .friends-btn .ico-svg { width: 22px; height: 22px; } .party-side { flex-basis: 84px; } .pcard { width: 84px; } .pcard canvas { width: 72px; height: 72px; } .pcard b { max-width: 84px; font-size: 12px; } .party-plus { width: 62px; height: 62px; } .party-plus .ico-svg { width: 26px; height: 26px; } .party-plus small { display: none; } .party.has-others #showcase { width: min(300px, 46vw); } .room-pill b { font-size: 22px; } }
@media (max-height: 520px) {
  .room-bar { min-height: 38px; }
  .room-create { padding: 6px 14px; font-size: 12px; }
  .room-pill { padding: 3px 6px 3px 14px; } .room-pill b { font-size: 20px; } .room-pill button { width: 28px; height: 28px; }
  .party.has-others #showcase, #showcase { height: 34vh; }
  .party-side { flex-basis: 96px; } .pcard { width: 92px; } .pcard canvas { width: 70px; height: 70px; } .pcard b { font-size: 12px; max-width: 92px; } .party-plus { width: 60px; height: 60px; } .party-plus small { display: none; } .party-plus .ico-svg { width: 24px; height: 24px; }
  .friends-btn { height: 46px; } .friends-btn .fb-txt { display: none; }
  .invite-banner { top: 58px; padding: 6px 10px; } .invite-banner b { font-size: 15px; }
  .play-big.waiting { font-size: 12px; max-width: 150px; }
  .join-strip { padding: 8px 12px; gap: 8px; } .join-strip input { width: 100px; padding: 6px 8px; font-size: 16px; }
}

/* Inicio en pantallas medianas: la fila de arriba no puede pasarse de ancho. */
@media (max-width: 1120px) { .friends-btn .fb-txt { display: none; } .friends-btn { padding: 0 12px; } .home-top .logo { font-size: 40px; } .pass-mini { min-width: 196px; } .top-left { gap: 12px; } }

.pcard canvas { position: relative; inset: auto; }
@media (max-width: 640px) { .side-btns { grid-template-columns: repeat(4, 1fr); } }
@media (max-height: 520px) { .side-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Móvil en vertical: el grupo debajo de tu ficha y la fila de arriba en dos líneas. */
@media (max-width: 640px) {
  .home-top { flex-wrap: wrap; row-gap: 8px; }
  .top-left { flex-wrap: nowrap; }
  .top-right { width: 100%; justify-content: flex-end; }
  .party { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "main main" "left right"; }
  .party #showcase { grid-area: main; justify-self: center; width: min(320px, 80vw); height: 30vh; }
  .party.has-others #showcase { width: min(320px, 80vw); height: 30vh; }
  #partyL { grid-area: left; flex-direction: row; justify-content: flex-end; flex-basis: auto; }
  #partyR { grid-area: right; flex-direction: row; justify-content: flex-start; flex-basis: auto; }
  .party-side { gap: 10px; }
  .room-bar { min-height: 40px; }
}

@media (max-width: 640px) { .pass-mini { min-width: 0; } .home-top .logo { font-size: 34px; } .friends-btn { flex: none; } .top-left { gap: 8px; max-width: 100%; } }

@media (max-width: 640px) { .name-plate { margin-top: 12px; } }

/* ---------- v13b: crear sala encima de JUGAR, modos sin huecos y amigos con pestañas ---------- */
.play-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.play-col .room-bar { min-height: 0; margin: 0; justify-content: flex-end; }
.play-col .room-create { padding: 7px 16px; font-size: 12px; letter-spacing: .08em; }
.play-col .room-create .ico-svg { width: 14px; height: 14px; }
.play-col .room-pill { padding: 3px 5px 3px 14px; gap: 8px; }
.play-col .room-pill b { font-size: 20px; }
.play-col .room-pill small { font-size: 9px; }
.play-col .room-pill button { width: 28px; height: 28px; }
.play-col .room-pill button .ico-svg { width: 14px; height: 14px; }

/* Modos: la rejilla se reparte según cuántas tarjetas haya (sin huecos vacíos) */
.mode-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
.mode-grid[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
.mode-grid[data-n="4"] .mode-card { min-height: 190px; padding: 26px; }
.mode-grid[data-n="4"] .mode-card b { font-size: 26px; }
.mode-grid[data-n="4"] .mode-card small { font-size: 15px; }
@media (max-width: 700px) { .mode-grid[data-n="3"], .mode-grid[data-n="4"] { grid-template-columns: 1fr; } .mode-grid[data-n="4"] .mode-card { min-height: 0; padding: 20px; } }
@media (max-height: 520px) {
  .mode-grid[data-n="4"] { grid-template-columns: repeat(2, 1fr); }
  .mode-grid[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
  .mode-grid[data-n="4"] .mode-card { min-height: 0; padding: 12px 16px; }
  .mode-grid[data-n="4"] .mode-card b { font-size: 18px; }
  .mode-grid[data-n="4"] .mode-card small { font-size: 12px; }
}

/* Amigos: pestañas */
.fr-tabs { margin-bottom: 6px; }
.fr-tabs button { position: relative; flex: 1; padding: 10px 12px; font-weight: 800; }
.fr-tabs .tdot { top: 4px; right: 8px; }
#frList.hidden, #frAdd.hidden { display: none; }
#frList, #frAdd { display: flex; flex-direction: column; gap: 6px; }
#frList .opt-label { margin: 6px 0 0; }
#friendSentBox.hidden { display: none; }
.fr-row:not(.on) .fr-info b { color: #aab6af; }
.fr-row:not(.on) { opacity: .8; }

@media (max-width: 640px) {
  .play-col { align-items: stretch; }
  .play-col .room-bar { justify-content: center; }
}
@media (max-height: 520px) {
  .play-col { gap: 4px; }
  .play-col .room-create { padding: 5px 12px; font-size: 11px; }
  .play-col .room-pill b { font-size: 17px; }
  .play-col .room-pill button { width: 24px; height: 24px; }
}

/* ---------- v13c: abandonar sala y equipación por color de equipo ---------- */
.room-leave { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 12px; letter-spacing: .06em; font-weight: 900;
  border-color: rgba(255,77,87,.6); color: #ff9aa0; background: rgba(255,77,87,.1); }
.room-leave:hover { background: rgba(255,77,87,.24); }
.room-leave .ico-svg { width: 14px; height: 14px; }
.room-leave.hidden { display: none; }
.play-col .room-bar { flex-wrap: wrap; gap: 8px; }
.play-col .room-pill { gap: 8px; padding-right: 5px; }

.team-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.team-pick .seg { flex: 1; min-width: 240px; }
.team-pick .seg button { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; }
.team-pick .btn { padding: 9px 14px; font-size: 13px; }
.team-pick .btn.hidden { display: none; }
.tm { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.tm.red { background: #ff4d57; box-shadow: 0 0 8px #ff4d57; }
.tm.blue { background: #3f8cff; box-shadow: 0 0 8px #3f8cff; }
#custTeam button.on[data-team="red"] { background: #ff4d57; border-color: #ff4d57; color: #fff; }
#custTeam button.on[data-team="blue"] { background: #3f8cff; border-color: #3f8cff; color: #fff; }
#custTeam button.on .tm { background: #fff; box-shadow: none; }
.team-note { margin: 0 0 8px; }
@media (max-height: 520px) { .team-pick .seg { min-width: 200px; } .team-pick .seg button { padding: 6px 8px; font-size: 12px; } .team-note { display: none; } }
@media (max-width: 640px) { .play-col .room-bar { justify-content: center; } }

.team-pick .seg { flex: 1 1 100%; }

/* Con sala: el código arriba, ABANDONAR SALA debajo y JUGAR al final (en columna). */
.play-col .room-bar { flex-direction: column; align-items: flex-end; flex-wrap: nowrap; gap: 6px; }
.play-col .room-leave { padding: 6px 14px; }
@media (max-width: 640px) { .play-col .room-bar { align-items: center; } }

/* ---------- v13d: estadísticas del partido (mantener Tab) ---------- */
.stats-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; width: min(780px, 94%); max-height: 92%; overflow: auto;
  padding: 16px 20px 12px; border-radius: 20px; pointer-events: none; background: rgba(8,14,11,.92); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 80px rgba(0,0,0,.6); backdrop-filter: blur(6px); animation: spIn .12s ease-out; }
@keyframes spIn { from { opacity: 0; transform: translate(-50%, -48%); } }
.stats-panel.hidden { display: none; }
.sp-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.sp-team { font: 900 italic 22px Rubik, system-ui, sans-serif; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-team.red { color: #ff6b73; text-align: right; }
.sp-team.blue { color: #6fa8ff; text-align: left; }
.sp-head b { font: 900 italic 42px Rubik, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.sp-time { text-align: center; color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 2px 0 8px; }
.sp-poss { margin: 0 0 8px; }
.stats-panel .stats { margin-top: 8px; font-size: 14px; }
.stats-panel .stats tr.me td { background: rgba(var(--acc-rgb), .1); }
.stats-panel .stats tr.total td { font-weight: 900; color: var(--accent); }
.stats-panel .stats tr.total td:first-child { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.sp-hint { display: block; text-align: center; margin-top: 10px; color: var(--muted); font-size: 12px; }
.sp-hint kbd { background: rgba(255,255,255,.12); border-radius: 6px; padding: 1px 7px; font-weight: 800; }
@media (max-height: 520px) {
  .stats-panel { padding: 8px 12px 6px; width: min(720px, 96%); }
  .sp-head b { font-size: 28px; } .sp-team { font-size: 16px; }
  .sp-time { margin: 0 0 4px; font-size: 11px; }
  .stats-panel .stats { font-size: 12px; margin-top: 4px; }
  .stats-panel .stats td { padding: 3px 6px; } .stats-panel .stats th { padding: 3px 6px; }
  .sp-hint { margin-top: 4px; font-size: 10px; }
}

.stats-panel .stats { table-layout: fixed; }
.stats-panel .stats th:first-child { width: 34%; }

/* ---------- v13e: pantalla de carga de la partida y perfil de otros jugadores ---------- */
.match-loader { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; overflow: hidden; background: #06100a; color: #fff;
  font-family: Rubik, system-ui, sans-serif; transition: opacity .45s ease; }
.match-loader.hidden { display: none; }
.match-loader.out { opacity: 0; pointer-events: none; }
#mlCanvas { position: absolute; inset: -4%; width: 108%; height: 108%; filter: blur(9px) brightness(.5) saturate(1.25); }
.ml-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(5,10,8,.15) 0%, rgba(5,10,8,.82) 100%), linear-gradient(transparent 55%, rgba(0,0,0,.65)); }
.ml-center { position: relative; text-align: center; animation: mlIn .5s cubic-bezier(.2,1.3,.4,1); }
@keyframes mlIn { from { opacity: 0; transform: scale(.9); } }
.ml-logo { font: 900 italic clamp(72px, 15vw, 170px)/1 Rubik, sans-serif; letter-spacing: -.02em; }
.ml-logo span { display: inline-block; color: #7cff6b; text-shadow: 0 8px 0 rgba(0,0,0,.35), 0 0 46px rgba(124,255,107,.5); }
.ml-logo span:first-child { color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,.35), 0 0 30px rgba(255,255,255,.4); }
.ml-info { margin-top: 8px; font: 900 italic clamp(12px, 1.8vw, 20px) Rubik, sans-serif; letter-spacing: .32em; color: #dfe8e2; text-shadow: 0 3px 12px rgba(0,0,0,.8); }
.ml-bottom { position: absolute; left: 0; right: 0; bottom: max(26px, 6vh); width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.ml-tip { margin: 0 0 14px; text-align: center; color: #eef5f0; font-weight: 700; font-size: clamp(13px, 1.6vw, 17px); line-height: 1.4; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.ml-tip b { display: block; font: 900 italic 11px Rubik, sans-serif; letter-spacing: .3em; color: #ffd84d; margin-bottom: 6px; }
.ml-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.16); overflow: hidden; }
.ml-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, #2e8f22, #7cff6b); box-shadow: 0 0 12px rgba(124,255,107,.85); }
.ml-row { margin-top: 8px; font-weight: 800; font-size: 13px; letter-spacing: .08em; color: #c9d6cf; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
@media (max-height: 520px) { .ml-logo { font-size: min(14vw, 26vh); } .ml-bottom { bottom: 12px; } .ml-tip { margin-bottom: 8px; font-size: 12px; } .ml-info { margin-top: 2px; } }

/* Se puede tocar a un jugador para ver su perfil */
.pcard.view, .fr-row.view, #lobby li.view { cursor: pointer; }
.pcard.view:hover b { color: var(--accent); }
.pcard.view:hover canvas { transform: scale(1.06); }
.pcard canvas { transition: transform .12s; }
.fr-row.view:hover { background: rgba(255,255,255,.09); }
#lobby li.view:hover { background: rgba(255,255,255,.08); }

.pview-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.pv-close { position: absolute; top: 12px; right: 12px; }
.pv-top { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding-right: 36px; }
#pvAvatar { position: relative; inset: auto; width: 96px; height: 96px; }
.pv-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-id b { font: 900 italic 26px Rubik, system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-id small { color: var(--muted); font-weight: 700; }
.pv-state { font-weight: 800; font-size: 12px; color: var(--muted); }
.pv-state.on { color: var(--accent); }
.pv-lv { width: 74px; text-align: center; padding: 8px 4px; border-radius: 14px; background: #0b0f0d; border: 2px solid var(--accent); }
.pv-lv small { display: block; font-size: 8px; font-weight: 900; letter-spacing: .16em; color: var(--muted); }
.pv-lv b { display: block; font: 900 italic 30px/1.1 Rubik, sans-serif; color: var(--accent); }
.pv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pv-stats .stat { padding: 8px 6px; text-align: center; }
.pv-stats .stat b { font-size: 20px; }
.pv-stats .stat small { font-size: 10px; }
.pv-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.pv-a { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.05); color: #6c7973; border: 1px solid var(--line); }
.pv-a .ico-svg { width: 20px; height: 20px; }
.pv-a.got { background: radial-gradient(circle, #ffe680, #c98f00); color: #241a00; border-color: #ffd84d; box-shadow: 0 0 10px rgba(255,216,77,.4); }
.pview-card .row { margin-top: 4px; }
@media (max-width: 480px) { .pv-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-height: 520px) { .pv-top { gap: 10px; } #pvAvatar { width: 64px; height: 64px; } .pv-id b { font-size: 20px; } .pv-lv { width: 60px; } .pv-lv b { font-size: 22px; } .pview-card { gap: 6px; padding: 12px; } .pv-a { border-radius: 8px; } .pv-a .ico-svg { width: 16px; height: 16px; } .pv-ach { grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); } .pv-stats .stat { padding: 4px; } .pv-stats .stat b { font-size: 16px; } }

#mlCanvas { filter: blur(7px) brightness(.62) saturate(1.25); }

/* ---------- v14: repetidos guardados ---------- */
.item { position: relative; }
.spare-badge { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: #ffd84d; color: #241a00; font: 900 12px Rubik, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
#detailSell { margin-top: 12px; width: 100%; border-color: #ffd84d; color: #ffd84d; display: flex; align-items: center; justify-content: center; gap: 6px; }
#detailSell.hidden { display: none; }
#detailSell .coin-ico { vertical-align: -3px; }

/* ---------- v14b: arrastrar jugadores entre equipos ---------- */
.team-col li.movable { cursor: grab; touch-action: none; user-select: none; }
.team-col li.dragging { opacity: .35; }
.team-col.drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: rgba(var(--acc-rgb), .1); }
.drag-ghost { position: fixed; z-index: 400; pointer-events: none; transform: translate(-50%, -50%) scale(1.06); display: flex; align-items: center; padding: 6px 12px; border-radius: 10px;
  background: #1c2723; border: 1.5px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.55); font-weight: 700; font-size: 14px; list-style: none; color: #fff; }
.drag-ghost .tag { display: none; }

/* ---------- v15: subcampeón del torneo ---------- */
.tour-res.runner { background: linear-gradient(90deg, rgba(207,216,224,.22), rgba(207,216,224,.06)); color: #e3eaf0; border-color: #cfd8e0; font-size: 20px; }

/* ---------- v15b: partida personalizada (5 modos sin dejar huecos) ---------- */
.mode-card.custom { background: linear-gradient(160deg, rgba(70,24,30,.95), rgba(26,10,14,.95)); }
.mode-card.custom:hover { border-color: #ff6b73; }
.mode-card.custom .mi { color: #ff8a92; }
.mode-grid[data-n="5"] { grid-template-columns: repeat(6, 1fr); }
.mode-grid[data-n="5"] .mode-card { grid-column: span 2; }
.mode-grid[data-n="5"] .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) { grid-column: span 3; }
@media (max-width: 700px) { .mode-grid[data-n="5"] { grid-template-columns: 1fr; } .mode-grid[data-n="5"] .mode-card, .mode-grid[data-n="5"] .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) { grid-column: auto; } }

/* ---------- v16: sin cuenta, botón «Iniciar sesión» ---------- */
.acct-btn.guest { border-color: var(--accent); color: var(--accent); background: rgba(var(--acc-rgb), .1); }

/* ---------- v16: tienda del día (rota cada día) y catálogo ---------- */
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.shop-seg { flex: 0 1 420px; }
.shop-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; }
.shop-seg .ico-svg { width: 18px; height: 18px; }
.shop-timer { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,216,77,.16), rgba(255,216,77,.04));
  border: 1px solid rgba(255,216,77,.55); color: #ffd84d; box-shadow: 0 0 24px rgba(255,216,77,.12); }
.shop-timer .ico-svg { width: 24px; height: 24px; }
.shop-timer small { display: block; font-size: 10px; font-weight: 900; letter-spacing: .18em; color: #e8d9a0; }
.shop-timer b { font: 900 italic 24px/1 Rubik, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.shop-timer.hidden { display: none; }
.sh-sec { display: flex; align-items: center; gap: 14px; margin: 18px 0 10px; font: 900 italic 20px Rubik, sans-serif; letter-spacing: .12em; color: #fff; }
.sh-sec::before, .sh-sec::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.3)); }
.sh-sec::after { background: linear-gradient(90deg, rgba(255,255,255,.3), transparent); }
.sh-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sh-daily { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.sh-card { --rc: #7cff6b; --bg1: #1f5c2c; --bg2: #0a1f10; position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: 18px; cursor: pointer;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--rc) 35%, transparent), transparent 65%), linear-gradient(165deg, var(--bg1), var(--bg2));
  border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent); box-shadow: 0 10px 28px rgba(0,0,0,.45); transition: transform .14s, box-shadow .14s; }
.sh-card:hover, .sh-card:focus-visible { transform: translateY(-4px) scale(1.015); box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 26px color-mix(in srgb, var(--rc) 45%, transparent); outline: none; }
.sh-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.sh-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--rc); box-shadow: 0 0 14px var(--rc); }
.sh-card.r-common { --rc: #7cff6b; --bg1: #1d5a2a; --bg2: #08190d; }
.sh-card.r-rare { --rc: #3f9bff; --bg1: #17407e; --bg2: #08142c; }
.sh-card.r-xpecial { --rc: #e46bff; --bg1: #5e1f72; --bg2: #1d0826; }
.sh-card.r-cosmic { --rc: #c9a2ff; border-color: transparent;
  background: radial-gradient(ellipse at 50% 35%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 70% 18%, #fff 50%, transparent), radial-gradient(1px 1px at 85% 60%, #fff 50%, transparent), radial-gradient(1px 1px at 35% 75%, #fff 50%, transparent),
    linear-gradient(135deg, #2a0f6e, #6a2cff 30%, #ff4fd8 60%, #2ec5ff 90%) 0 0 / 300% 300%;
  animation: shCosmic 6s ease-in-out infinite alternate; box-shadow: 0 0 0 2px rgba(255,255,255,.25), 0 14px 40px rgba(106,44,255,.45); }
@keyframes shCosmic { to { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 100% 100%; } }
.sh-card.r-cosmic::after { background: linear-gradient(90deg, #6a2cff, #ff4fd8, #2ec5ff); }
.sh-card canvas { position: relative; inset: auto; display: block; width: 100%; height: 130px; }
.sh-card.big canvas { height: 180px; }
.sh-info { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 4px 14px 8px; }
.sh-type { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.sh-type .ico-svg { width: 12px; height: 12px; }
.sh-card h4 { margin: 0; font: 900 italic 19px/1.1 Rubik, sans-serif; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.sh-card.big h4 { font-size: 30px; }
.sh-card.big p { margin: 2px 0 4px; font-size: 13px; color: rgba(255,255,255,.82); line-height: 1.35; }
.sh-rar { align-self: flex-start; margin-top: 2px; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #0b0f0d; background: var(--rc); }
.r-cosmic .sh-rar { color: #fff; background: linear-gradient(90deg, #6a2cff, #ff4fd8, #2ec5ff); }
.r-exclusive .sh-rar { background: linear-gradient(90deg, #fff1a8, #ffb800, #fff1a8); }
.sh-buy { position: relative; margin: auto 10px 14px; padding: 9px 10px; border-radius: 12px; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  font: 900 15px Rubik, sans-serif; color: #fff; background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: background .12s; }
.sh-buy:hover { background: rgba(0,0,0,.65); }
.sh-buy .coin-ico { width: 16px; height: 16px; }
.sh-buy.cant { color: rgba(255,255,255,.55); }
.sh-buy.own { background: rgba(var(--acc-rgb), .2); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .6); }
.sh-buy .ico-svg { width: 15px; height: 15px; }
.sh-own { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 8px; font-size: 10px; font-weight: 900; letter-spacing: .12em; background: var(--accent); color: #0b0f0d; }
.sh-card.big .sh-info { padding: 4px 18px 10px; }
#shopDay.hidden, #shopCatalog.hidden { display: none; }

.cat-filter { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 10px 0 4px; }
.cf { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font: 800 12px Rubik, sans-serif; cursor: pointer; }
.cf.on { color: #0b0f0d; background: #fff; border-color: #fff; }
.cf.r-common.on { background: #7cff6b; border-color: #7cff6b; } .cf.r-rare.on { background: #3f9bff; border-color: #3f9bff; color: #fff; }
.cf.r-xpecial.on { background: #e46bff; border-color: #e46bff; } .cf.r-cosmic.on { background: linear-gradient(90deg, #6a2cff, #ff4fd8, #2ec5ff); color: #fff; border-color: transparent; }
.cf.r-exclusive.on { background: #ffd84d; border-color: #ffd84d; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat-card { --rc: #7cff6b; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 10px; border-radius: 14px; cursor: pointer; text-align: center;
  background: linear-gradient(170deg, color-mix(in srgb, var(--rc) 14%, #131a17), #0c110f); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent); transition: transform .12s, border-color .12s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--rc); }
.cat-card.r-common { --rc: #7cff6b; } .cat-card.r-rare { --rc: #3f9bff; } .cat-card.r-xpecial { --rc: #e46bff; } .cat-card.r-cosmic { --rc: #b98cff; } .cat-card.r-exclusive { --rc: #ffd84d; }
.cat-card canvas { position: relative; inset: auto; width: 100%; height: 86px; display: block; }
.cat-card h4 { margin: 0; font: 900 italic 15px Rubik, sans-serif; }
.cat-card .sh-rar { position: absolute; top: 8px; left: 8px; margin: 0; }
.cat-card .sh-own { top: 8px; right: 8px; }
.cat-how { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: var(--muted); }
.cat-how .ico-svg { width: 13px; height: 13px; }
.cat-how.today { color: var(--accent); } .cat-how.wheel { color: #ffd84d; } .cat-how.pass { color: #9fd8ff; }
@media (max-width: 900px) { .sh-daily { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .sh-feat { grid-template-columns: 1fr; } .sh-daily { grid-template-columns: repeat(2, 1fr); } .sh-card.big canvas { height: 170px; } .shop-top { justify-content: center; } }
@media (max-height: 520px) {
  .shop-top { margin: 0 0 6px; } .shop-timer { padding: 4px 10px; } .shop-timer b { font-size: 18px; }
  .sh-sec { margin: 8px 0 6px; font-size: 15px; }
  .sh-feat { gap: 10px; } .sh-card.big canvas { height: 140px; } .sh-card.big h4 { font-size: 22px; } .sh-card.big p { display: none; }
  .sh-daily { grid-template-columns: repeat(5, 1fr); gap: 8px; } .sh-card canvas { height: 84px; } .sh-card h4 { font-size: 15px; } .sh-buy { margin: auto 6px 10px; padding: 6px; font-size: 13px; }
  .cat-card canvas { height: 64px; }
}

/* ---------- v16b: modos Detector de calor y Penaltis (la rejilla se reparte sin huecos) ---------- */
.mode-card.heat { background: linear-gradient(160deg, rgba(90,36,10,.95), rgba(30,12,4,.95)); }
.mode-card.heat:hover { border-color: #ff7a1a; }
.mode-card.heat .mi { color: #ff9a3d; }
.mode-card.pens { background: linear-gradient(160deg, rgba(14,60,40,.95), rgba(6,24,16,.95)); }
.mode-card.pens:hover { border-color: #3dff9a; }
.mode-card.pens .mi { color: #5dffb0; }
.mode-card.pens { background: linear-gradient(160deg, rgba(14,52,70,.95), rgba(6,20,28,.95)); }
.mode-card.pens:hover { border-color: #7fe0ff; }
.mode-card.pens .mi { color: #9fe8ff; }
.mode-grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
.mode-grid[data-n="7"] { grid-template-columns: repeat(12, 1fr); }
.mode-grid[data-n="7"] .mode-card { grid-column: span 3; }
.mode-grid[data-n="7"] .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) { grid-column: span 4; }
@media (max-width: 900px) { .mode-grid[data-n="7"] { grid-template-columns: repeat(2, 1fr); } .mode-grid[data-n="7"] .mode-card, .mode-grid[data-n="7"] .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) ~ .mode-card:not(.hidden) { grid-column: auto; } .mode-grid[data-n="7"] .mode-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .mode-grid[data-n="6"], .mode-grid[data-n="7"] { grid-template-columns: 1fr; } .mode-grid[data-n="7"] .mode-card:last-child { grid-column: auto; } }
@media (max-height: 520px) {
  .mode-grid[data-n="6"] .mode-card, .mode-grid[data-n="7"] .mode-card { min-height: 0; padding: 10px 12px; }
  .mode-grid[data-n="6"] .mode-card small, .mode-grid[data-n="7"] .mode-card small { font-size: 11px; }
}

/* ---------- v16c: premio de cada ronda en el cuadro del torneo ---------- */
.br-prize { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin: -2px 0 2px; padding: 4px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #ffd84d; background: rgba(255,216,77,.1); border: 1px solid rgba(255,216,77,.35); text-align: center; }
.br-prize b { color: #fff; font-weight: 900; }
.br-prize .coin-ico { width: 13px; height: 13px; }
.br-prize.champ { display: block; margin-top: 8px; border-radius: 12px; padding: 6px 10px; font-size: 12px; line-height: 1.5; color: var(--cup); border-color: var(--cup); background: rgba(255,255,255,.04); }
.br-prize.champ .coin-ico { vertical-align: -2px; }

/* Packs del día */
.sh-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sh-pack { --pc: #ffd84d; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 14px; border-radius: 18px;
  background: radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--pc) 40%, transparent), transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--pc) 22%, #15171c), #0b0c10);
  border: 2px solid color-mix(in srgb, var(--pc) 75%, transparent); box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 22px color-mix(in srgb, var(--pc) 25%, transparent); }
.sh-pack::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.pk-head { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; }
.pk-head h4 { margin: 0; font: 900 italic 26px/1.05 Rubik, sans-serif; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.pk-head small { grid-column: 1 / -1; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.pk-off { grid-row: 1; grid-column: 2; padding: 4px 10px; border-radius: 10px; font: 900 15px Rubik, sans-serif; color: #0b0f0d; background: var(--pc); box-shadow: 0 0 14px color-mix(in srgb, var(--pc) 60%, transparent); transform: rotate(-4deg); }
.pk-items { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.pk-item { --rc: #7cff6b; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; border-radius: 12px; cursor: pointer; min-width: 0;
  background: linear-gradient(170deg, color-mix(in srgb, var(--rc) 18%, #131a17), rgba(0,0,0,.4)); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); }
.pk-item.r-rare { --rc: #3f9bff; } .pk-item.r-xpecial { --rc: #e46bff; } .pk-item.r-cosmic { --rc: #b98cff; }
.pk-item:hover, .pk-item:focus-visible { border-color: var(--rc); outline: none; }
.pk-item canvas { position: relative; inset: auto; width: 100%; height: 74px; display: block; }
.pk-item b { font: 900 italic 12px/1.1 Rubik, sans-serif; text-align: center; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pk-item small .ico-svg { width: 12px; height: 12px; opacity: .75; }
.pk-item.have { opacity: .55; }
.pk-item .sh-own { top: 4px; right: 4px; font-size: 8px; padding: 2px 5px; }
.pk-foot { position: relative; display: flex; align-items: center; gap: 12px; }
.pk-foot small { flex: 1; font-size: 12px; color: rgba(255,255,255,.75); line-height: 1.3; }
.pk-foot .sh-buy { margin: 0; min-width: 170px; }
.pk-foot .sh-buy s { margin-right: 4px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.5); }
.sh-pack.done { opacity: .8; }
@media (max-width: 900px) { .sh-packs { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .pk-foot { flex-direction: column; align-items: stretch; } .pk-foot .sh-buy { min-width: 0; } .pk-item canvas { height: 60px; } .pk-items { gap: 5px; } }

.opt-desc { display: block; margin-top: 6px; font-size: 12px; line-height: 1.35; color: var(--muted); }

/* Invitación: barra con el tiempo que queda */
.invite-banner { overflow: hidden; }
.invite-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: linear-gradient(90deg, #6fb0ff, var(--accent)); transform-origin: left; }
@keyframes invBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* Menú al pulsar a alguien de la sala */
.member-menu { position: fixed; z-index: 95; min-width: 210px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 16px;
  background: #121816; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.member-menu.hidden { display: none; }
.member-menu b { padding: 2px 8px 6px; font: 900 italic 16px Rubik, sans-serif; }
.member-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: #e6efe9; font: 800 14px Rubik, sans-serif; cursor: pointer; text-align: left; }
.member-menu button:hover, .member-menu button:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.member-menu button .ico-svg { width: 17px; height: 17px; color: var(--accent); }
.member-menu button.danger, .member-menu button.danger .ico-svg { color: #ff6b6b; }
.pcard.gone, #lobby .team-col li.gone { opacity: .5; }
.tag.gone { background: #555 !important; color: #fff !important; }
/* Botón de entrenar en el inicio (si no eres el anfitrión) */
.train-side { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; border-radius: 16px; font: 900 italic 16px Rubik, sans-serif; letter-spacing: .04em;
  background: linear-gradient(#1f5f86, #133c57); color: #e6f6ff; box-shadow: 0 6px 0 #0a2638, 0 12px 26px rgba(0,0,0,.4); }
.train-side.hidden { display: none; }
.train-side .ico-svg { width: 20px; height: 20px; }
/* Intercambio */
.trade-card { width: min(860px, 100%); }
.trade-card h3 { margin: 0 0 12px; font: 900 italic 24px Rubik, sans-serif; }
.trade-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.trade-col { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-width: 0; }
.trade-col h4 { margin: 0; font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.tr-offer { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.25); }
.tr-tabs { display: flex; gap: 4px; }
.tr-tabs button { flex: 1; padding: 7px 0; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.tr-tabs button.on { background: rgba(var(--acc-rgb), .18); color: var(--accent); border-color: rgba(var(--acc-rgb), .6); }
.tr-tabs .ico-svg { width: 16px; height: 16px; }
.tr-inv { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow-y: auto; }
.tr-chip { --rc: #7cff6b; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent);
  background: color-mix(in srgb, var(--rc) 10%, #121816); color: #fff; font: 800 12px Rubik, sans-serif; cursor: pointer; }
.tr-chip.r-rare { --rc: #3f9bff; } .tr-chip.r-xpecial { --rc: #e46bff; } .tr-chip.r-cosmic { --rc: #b98cff; } .tr-chip.r-exclusive { --rc: #ffd84d; }
.tr-chip.on { background: color-mix(in srgb, var(--rc) 35%, #121816); box-shadow: 0 0 0 2px var(--rc); }
.tr-chip:disabled { cursor: default; opacity: 1; }
.tr-chip .ico-svg { width: 13px; height: 13px; color: var(--rc); }
.tr-chip em { font-style: normal; color: var(--muted); }
.tr-empty { color: var(--muted); padding: 4px; }
.tr-status { margin: 4px 0 0; font-weight: 800; color: var(--muted); }
.tr-status.ok { color: var(--accent); }
#trReady.waiting { filter: saturate(.4); }
@media (max-width: 700px) { .trade-cols { grid-template-columns: 1fr; } }

.play-group { display: flex; align-items: center; gap: 12px; }
@media (max-width: 700px) { .play-group { justify-content: stretch; } .play-group .play-big { flex: 1; } }


.fps-meter { position: fixed; top: 8px; left: 8px; z-index: 99; padding: 3px 8px; border-radius: 8px; background: rgba(0,0,0,.55); color: #7cff6b; font: 800 12px Consolas, monospace; pointer-events: none; }
.fps-meter.hidden { display: none; }

/* Intercambio: cada cosa con su foto */
.tr-chip { flex-direction: column; justify-content: flex-start; gap: 2px; width: 104px; padding: 6px 6px 8px; border-radius: 14px; text-align: center; position: relative; }
.tr-chip canvas { position: relative; inset: auto; width: 100%; height: 62px; display: block; }
.tr-chip b { font: 900 italic 12px/1.1 Rubik, sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-chip small { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); font-weight: 800; }
.tr-chip small .ico-svg { width: 11px; height: 11px; }
.tr-chip em { position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 900; }
.tr-inv { max-height: 260px; }

/* Favoritos: corazón arriba a la derecha de cada objeto */
.item.mine .fav-btn { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.45); cursor: pointer; transition: transform .12s; }
.item.mine .fav-btn:hover { transform: scale(1.12); }
.item.mine .fav-btn svg { width: 17px; height: 17px; fill: none; stroke: rgba(255,255,255,.75); stroke-width: 2; }
.item.mine .fav-btn.on svg { fill: #ff4f7b; stroke: #ff4f7b; filter: drop-shadow(0 0 5px rgba(255,79,123,.7)); }
.item.mine .spare-badge { top: 38px; }
/* Precio en el detalle */
.price-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font: 900 12px Rubik, sans-serif; color: #fff; }
.price-tag .coin-ico { width: 14px; height: 14px; }

/* Inventario: objetos del Pase */
.item.mine .pass-badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 6px; border-radius: 6px; font: 900 normal 9px Rubik, sans-serif; letter-spacing: .1em; color: #241a00; background: linear-gradient(90deg, #ffe27a, #ffb800); }
.item.mine.locked { opacity: .55; filter: grayscale(.6); }
.item.mine.locked:hover { opacity: .8; }
.item.mine.locked .eq-state .ico-svg { width: 13px; height: 13px; }

/* Evento de Halloween */
.event-tile { position: relative; background: linear-gradient(160deg, #3a1a05, #1b0a24) !important; border-color: #ff7a1a !important; color: #ffd2a6 !important;
  box-shadow: 0 0 18px rgba(255,122,26,.45); animation: evGlow 2.4s ease-in-out infinite; }
.event-tile.hidden { display: none; }
.event-tile .ev-ico { font-size: 28px; line-height: 1; filter: drop-shadow(0 0 6px rgba(255,140,40,.8)); }
@keyframes evGlow { 50% { box-shadow: 0 0 30px rgba(255,122,26,.75), 0 0 6px rgba(155,92,255,.6); } }
.shop-event { margin: 4px 0 8px; padding: 16px; border-radius: 20px; border: 2px solid #ff7a1a;
  background: radial-gradient(ellipse at 10% 0%, rgba(255,122,26,.35), transparent 55%), radial-gradient(ellipse at 100% 100%, rgba(155,92,255,.35), transparent 55%), linear-gradient(160deg, #1d0d12, #0d0814);
  box-shadow: 0 0 30px rgba(255,122,26,.25); }
.shop-event.hidden { display: none; }
.ev-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ev-pumpkin { font-size: 44px; filter: drop-shadow(0 0 10px rgba(255,140,40,.8)); }
.ev-head div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ev-head b { font: 900 italic 26px Rubik, sans-serif; color: #ffb35c; letter-spacing: .04em; text-shadow: 0 0 14px rgba(255,122,26,.6); }
.ev-head small { color: #e7d4ff; font-size: 13px; }
.ev-head em { font-style: normal; font: 900 14px Rubik, sans-serif; padding: 6px 12px; border-radius: 999px; background: #ff7a1a; color: #1b0a24; white-space: nowrap; }
.ev-shop { grid-template-columns: repeat(4, 1fr); }
.ev-sub { margin: 14px 0 8px; font-size: 12px; letter-spacing: .16em; color: #c79bff; }
.ev-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-goal { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,122,26,.4); }
.ev-goal canvas { position: relative; inset: auto; width: 96px; height: 64px; display: block; }
.ev-goal div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-goal b { font: 900 14px Rubik, sans-serif; }
.ev-goal small { color: var(--muted); font-size: 12px; }
.ev-goal em { font-style: normal; font-size: 12px; font-weight: 800; color: #ffb35c; }
.ev-goal .xp-bar i { background: linear-gradient(90deg, #ff7a1a, #ffd84d); }
.ev-goal.done { border-color: #7cff6b; }
.ev-goal.got { opacity: .6; }
.cat-how.event { color: #ffb35c; }
@media (max-width: 900px) { .ev-shop { grid-template-columns: repeat(2, 1fr); } .ev-goals { grid-template-columns: 1fr; } }

/* Cartas del evento: fondo fijo de Halloween (el fondo animado de las cósmicas, repetido 4 veces, bajaba mucho los FPS) */
.ev-shop .sh-card, .ev-shop .sh-card.r-cosmic, .ev-shop .sh-card.r-xpecial, .ev-shop .sh-card.r-exclusive { animation: none; border-color: #ff7a1a;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,140,40,.32), transparent 65%), linear-gradient(165deg, #3a1a2e, #140a1c);
  box-shadow: 0 8px 22px rgba(0,0,0,.45); }
.ev-shop .sh-card::before { display: none; }
.ev-shop .sh-card::after { background: linear-gradient(90deg, #ff7a1a, #9b5cff); box-shadow: none; }
.ev-shop .sh-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.5), 0 0 18px rgba(255,122,26,.45); }

.item.mine .pass-badge.club { background: linear-gradient(90deg, #fff1a8, #ffc21f); color: #241a00; box-shadow: 0 0 8px rgba(255,210,63,.5); }
.item.mine .pass-badge.event { background: linear-gradient(90deg, #ff9a3d, #ff6a1a); color: #1b0a00; }

/* Cuenta atrás al quitar la pausa */
.resume-bar { position: fixed; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 60; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 34px 18px; border-radius: 18px;
  background: rgba(8,14,11,.82); border: 1.5px solid rgba(var(--acc-rgb),.45); box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 30px rgba(var(--acc-rgb),.18);
  font-family: Rubik, system-ui, sans-serif; color: #fff; backdrop-filter: blur(4px); }
.resume-bar.hidden { display: none; }
.resume-bar b { font-size: 12px; letter-spacing: .24em; color: var(--accent); font-weight: 900; }
.resume-bar span { font-size: 54px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(var(--acc-rgb),.6); }
.resume-bar span.pop { animation: rzPop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes rzPop { 0% { transform: scale(1.7); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }
.rz-track { width: 240px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.rz-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); box-shadow: 0 0 12px var(--accent); }

/* Nombre único */
.name-hint { min-height: 14px; font-size: 11px; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.name-hint.ok { color: var(--accent); }
.name-hint.bad { color: #ff6b6b; font-weight: 700; }
.names input.bad, .names input.bad:focus { border-color: #ff5a5a; box-shadow: 0 0 0 4px rgba(255,90,90,.14); }

/* Elegir modo: foto del modo detrás, icono en placa brillante y etiqueta */
.mode-card { --mc: var(--accent); position: relative; overflow: hidden; isolation: isolate; justify-content: flex-end; min-height: 210px;
  border-color: rgba(255,255,255,.08); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.mode-card.mystery { --mc: #e46bff; } .mode-card.tour { --mc: #ffcc33; } .mode-card.heat { --mc: #ff8a2a; }
.mode-card.pens { --mc: #7fe0ff; } .mode-card.custom { --mc: #ff6b73; } .mode-card.train { --mc: #4fd2ff; }
.mode-card .mode-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transform: scale(1.04); filter: saturate(1.05) brightness(.8); transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .3s; }
.mode-card::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,9,7,.05) 0%, rgba(5,9,7,.45) 42%, rgba(5,9,7,.93) 78%),
    radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--mc) 32%, transparent), transparent 60%); }
.mode-card::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc) 25%, transparent); transition: box-shadow .2s; }
.mode-card:hover { border-color: var(--mc); box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 26px color-mix(in srgb, var(--mc) 35%, transparent); }
.mode-card:hover .mode-shot { transform: scale(1.13); filter: saturate(1.25) brightness(.95); }
.mode-card:hover::after { box-shadow: inset 0 0 0 1.5px var(--mc); }
.mode-card .mi { position: absolute; top: 16px; left: 16px; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  color: var(--mc); background: linear-gradient(150deg, color-mix(in srgb, var(--mc) 30%, rgba(8,12,10,.7)), rgba(8,12,10,.75));
  border: 1px solid color-mix(in srgb, var(--mc) 55%, transparent); backdrop-filter: blur(6px);
  box-shadow: 0 0 22px color-mix(in srgb, var(--mc) 38%, transparent), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .2s; }
.mode-card .mi .ico-svg { width: 28px; height: 28px; stroke-width: 2; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mc) 70%, transparent)); }
.mode-card:hover .mi { transform: rotate(-6deg) scale(1.08); }
.mode-card .mc-chip { position: absolute; top: 18px; right: 16px; font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: .14em;
  padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(5,9,7,.6); border: 1px solid color-mix(in srgb, var(--mc) 50%, transparent); backdrop-filter: blur(6px); }
.mode-card b { font-size: 24px; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.mode-card small { color: rgba(235,245,238,.82); text-shadow: 0 1px 8px rgba(0,0,0,.8); }
@media (max-height: 520px), (max-width: 560px) {
  .mode-card { min-height: 120px; padding-top: 66px; }
  .mode-card .mi { top: 10px; left: 12px; width: 42px; height: 42px; border-radius: 12px; }
  .mode-card .mi .ico-svg { width: 22px; height: 22px; }
  .mode-card .mc-chip { top: 12px; right: 10px; font-size: 9px; }
}

/* ---------- Halloween (body.halloween, hasta el 31 de octubre) ---------- */
.hw-deco { display: none; }
body.halloween .hw-deco { display: block; position: fixed; inset: 0; z-index: 210; pointer-events: none; overflow: hidden; }
body.halloween[data-screen="game"] .hw-deco, body.halloween[data-screen="end"] .hw-deco { display: none; }
.hw-web { position: absolute; top: 0; width: clamp(120px, 16vw, 230px); aspect-ratio: 1; background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='rgba(235,230,255,0.32)' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M0 0L230.0 0.0 M0 0L221.1 63.4 M0 0L192.9 125.3 M0 0L147.8 176.2 M0 0L86.2 213.3 M0 0L0.0 230.0 M34.0 0.0Q27.3 3.8 32.7 9.4Q25.1 11.4 28.5 18.5Q20.7 18.3 21.9 26.0Q14.2 23.6 12.7 31.5Q5.2 26.9 0.0 34.0 M66.0 0.0Q53.1 7.5 63.4 18.2Q48.7 22.2 55.4 35.9Q40.1 35.5 42.4 50.6Q27.5 45.8 24.7 61.2Q10.1 52.1 0.0 66.0 M104.0 0.0Q83.6 11.8 100.0 28.7Q76.7 35.0 87.2 56.6Q63.2 55.9 66.8 79.7Q43.4 72.2 39.0 96.4Q16.0 82.2 0.0 104.0 M146.0 0.0Q117.4 16.5 140.3 40.2Q107.7 49.1 122.4 79.5Q88.7 78.5 93.8 111.8Q60.9 101.4 54.7 135.4Q22.4 115.4 0.0 146.0 M192.0 0.0Q154.4 21.7 184.6 52.9Q141.7 64.6 161.0 104.6Q116.6 103.2 123.4 147.1Q80.1 133.3 71.9 178.0Q29.5 151.7 0.0 192.0'/%3E%3C/g%3E%3Cg fill='rgba(20,10,30,0.9)' stroke='rgba(235,230,255,0.5)' stroke-width='1'%3E%3Cline x1='104' y1='60' x2='104' y2='118' stroke='rgba(235,230,255,0.45)'/%3E%3Ccircle cx='104' cy='124' r='6'/%3E%3Ccircle cx='104' cy='116' r='4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; opacity: .85; }
.hw-web.l { left: 0; }
.hw-web.r { right: 0; transform: scaleX(-1); }
.hw-moon { position: absolute; top: -70px; right: 12%; width: 150px; height: 150px; border-radius: 50%; opacity: .5;
  background: radial-gradient(circle at 40% 40%, #fff6d8, #ffd27a 55%, #e89a3a 100%); box-shadow: 0 0 80px 30px rgba(255,170,60,.25); }
.hw-bat { position: absolute; width: 46px; height: 22px; background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 30'%3E%3Cpath fill='%23120a1c' d='M32 9c-1.4 0-2.4.8-2.9 2l-1-3.2-.9 2.8C25.4 6.9 21 4.2 14.6 3.4c1.8 1.7 2.5 3.8 2 5.6-2.6-1.4-6.2-1.9-9.8-.8 2 1 3 2.8 3 4.4-3-.4-6.4.3-9.6 2.2 6.4.1 11.6 2.7 14.6 6.8 1.4-1.6 3.8-2.2 5.8-1.4.4 2.2 2 3.8 4 5.2a2 2 0 0 1 1.6 0c2-1.4 3.6-3 4-5.2 2-.8 4.4-.2 5.8 1.4 3-4.1 8.2-6.7 14.6-6.8-3.2-1.9-6.6-2.6-9.6-2.2 0-1.6 1-3.4 3-4.4-3.6-1.1-7.2-.6-9.8.8-.5-1.8.2-3.9 2-5.6-6.4.8-10.8 3.5-12.6 7.2l-.9-2.8-1 3.2c-.5-1.2-1.5-2-2.9-2z'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 6px rgba(255,140,40,.35)); opacity: .9; }
.hw-bat.b1 { top: 14%; animation: hwFly 19s linear infinite, hwFlap .26s ease-in-out infinite alternate; }
.hw-bat.b2 { top: 30%; width: 32px; height: 15px; animation: hwFly 27s linear -9s infinite reverse, hwFlap .22s ease-in-out infinite alternate; }
.hw-bat.b3 { top: 8%; width: 26px; height: 12px; opacity: .65; animation: hwFly 33s linear -20s infinite, hwFlap .3s ease-in-out infinite alternate; }
@keyframes hwFly { 0% { left: -8%; translate: 0 0; } 25% { translate: 0 30px; } 50% { translate: 0 -10px; } 75% { translate: 0 40px; } 100% { left: 108%; translate: 0 0; } }
@keyframes hwFlap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
.hw-pump { position: absolute; bottom: 10px; width: 64px; height: 60px; background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 60'%3E%3Cpath d='M32 14c2-6 6-9 10-10' fill='none' stroke='%233f7a2a' stroke-width='4' stroke-linecap='round'/%3E%3Cellipse cx='18' cy='36' rx='14' ry='20' fill='%23e8630f'/%3E%3Cellipse cx='46' cy='36' rx='14' ry='20' fill='%23e8630f'/%3E%3Cellipse cx='32' cy='36' rx='15' ry='22' fill='%23ff8a1f'/%3E%3Cpath d='M24 30l5 5h-8zM40 30l3 5h-8zM21 44c6 5 16 5 22 0l-3 4-3-3-3 4-3-4-3 3-3-4z' fill='%233b1300'/%3E%3Cpath d='M24 30l5 5h-8zM40 30l3 5h-8z' fill='%23ffd84d' opacity='.55'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(255,138,31,.55)); animation: hwGlow 2.6s ease-in-out infinite alternate; }
.hw-pump.l { left: 14px; }
.hw-pump.r { right: 14px; width: 48px; height: 45px; animation-delay: -1.3s; }
@keyframes hwGlow { from { filter: drop-shadow(0 0 8px rgba(255,138,31,.35)); } to { filter: drop-shadow(0 0 20px rgba(255,138,31,.75)); } }
/* En pantallas pequeñas, menos cosas */
@media (max-width: 700px), (max-height: 520px) { .hw-pump, .hw-moon, .hw-bat.b3 { display: none; } .hw-web { width: 90px; opacity: .6; } }
/* Fondo con un toque morado y naranja */
body.halloween #app::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(90% 60% at 50% -10%, rgba(120,50,190,.22), transparent 60%), radial-gradient(70% 50% at 50% 115%, rgba(255,110,20,.16), transparent 65%); }
body.halloween[data-screen="game"] #app::after, body.halloween[data-screen="pause"] #app::after, body.halloween[data-screen="end"] #app::after { display: none; }
/* Logo, botón de jugar y títulos */
body.halloween .logo span, body.halloween .ml-logo span:not(:first-child) { color: #ff8a1f; text-shadow: 0 0 28px rgba(255,138,31,.55); }
body.halloween .ld-logo span:not(:first-child) { color: #ff8a1f; text-shadow: 0 8px 0 rgba(0,0,0,.35), 0 0 46px rgba(255,138,31,.55); }
body.halloween .ld-glow { background: radial-gradient(circle, rgba(255,138,31,.24), rgba(140,60,200,.12) 45%, transparent 68%); }
body.halloween .ld-sub::after { content: ' · EDICIÓN HALLOWEEN'; color: #ff9a3d; }
body.halloween .play-big { background: linear-gradient(135deg, #ffb24d, #ff6a1a); box-shadow: 0 10px 0 #9c3a00, 0 22px 50px rgba(255,106,26,.4); color: #1b0a00; }
body.halloween .play-big:active { box-shadow: 0 4px 0 #9c3a00, 0 12px 30px rgba(255,106,26,.3); }
body.halloween .screen-head h2::before { content: ''; display: inline-block; width: .95em; height: .9em; margin-right: .35em; vertical-align: -.08em;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 60'%3E%3Cpath d='M32 14c2-6 6-9 10-10' fill='none' stroke='%233f7a2a' stroke-width='4' stroke-linecap='round'/%3E%3Cellipse cx='18' cy='36' rx='14' ry='20' fill='%23e8630f'/%3E%3Cellipse cx='46' cy='36' rx='14' ry='20' fill='%23e8630f'/%3E%3Cellipse cx='32' cy='36' rx='15' ry='22' fill='%23ff8a1f'/%3E%3Cpath d='M24 30l5 5h-8zM40 30l3 5h-8zM21 44c6 5 16 5 22 0l-3 4-3-3-3 4-3-4-3 3-3-4z' fill='%233b1300'/%3E%3Cpath d='M24 30l5 5h-8zM40 30l3 5h-8z' fill='%23ffd84d' opacity='.55'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 8px rgba(255,138,31,.6)); }
/* La luna y las calabazas solo en la pantalla de carga (en los menús taparían botones) */
.hw-moon, .hw-pump { display: none; }
body.halloween:has(#loader:not(.out):not(.hidden)) .hw-moon, body.halloween:has(#loader:not(.out):not(.hidden)) .hw-pump { display: block; }
/* El texto nunca se mete debajo del icono: la tarjeta crece hacia abajo */
.mode-card { padding-top: 84px; }
@media (max-height: 520px), (max-width: 560px) { .mode-card { padding-top: 62px; } }

/* Chat en la sala (inicio con tus amigos): encima de los botones de abajo, siempre a la vista */
.chat.room { bottom: 118px; width: min(380px, 42vw); pointer-events: auto; }
.chat.room li.old { opacity: .85; }
.chat.room small { display: none; }
.chat.room ul { max-height: 190px; }
@media (max-height: 520px) { .chat.room { bottom: 84px; } .chat.room ul { max-height: 90px; } }
/* En pantallas estrechas el chat de la sala va arriba a la izquierda (abajo están los botones y el código) */
@media (max-width: 900px) { .chat.room { top: 168px; bottom: auto; width: 40vw; } .chat.room ul { max-height: 84px; } }

/* ---- Inicio: botones cuadrados (compactos) con el estilo de XBALL: negro y el color del tema ---- */
.home-bottom .side-btns { display: grid; grid-template-columns: repeat(3, 94px); grid-auto-rows: 94px; gap: 10px; flex-wrap: nowrap; }
.side-btns .btn.tile {
  min-width: 0; width: 100%; height: 100%; padding: 6px 3px 9px; gap: 0; justify-content: space-between; border-radius: 18px;
  background: linear-gradient(180deg, rgba(24,38,30,.92), rgba(8,14,11,.94)); border: 1.5px solid rgba(var(--acc-rgb),.28); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 22px rgba(0,0,0,.45);
  font: 900 11px Rubik, system-ui, sans-serif; letter-spacing: .08em; transition: transform .14s, border-color .14s, box-shadow .14s; }
.side-btns .btn.tile:hover { background: linear-gradient(180deg, rgba(28,46,36,.95), rgba(10,18,14,.95)); border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(var(--acc-rgb),.35), 0 0 24px rgba(var(--acc-rgb),.28), 0 10px 22px rgba(0,0,0,.45); transform: translateY(-2px); }
.side-btns .btn.tile:active { transform: translateY(1px) scale(.97); }
.side-btns .tile .art { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.side-btns .tile .art-svg { height: 100%; max-height: 56px; width: auto; filter: drop-shadow(0 0 7px rgba(var(--acc-rgb),.45)); transition: transform .2s, filter .2s; }
.side-btns .btn.tile:hover .art-svg { transform: scale(1.08); filter: drop-shadow(0 0 12px rgba(var(--acc-rgb),.75)); }
.side-btns .btn.tile .dot { top: 8px; right: 8px; }
.side-btns .event-tile { background: linear-gradient(160deg, #3a1a05, #1b0a24) !important; border-color: #ff7a1a !important; color: #ffd2a6 !important; animation: evGlow 2.4s ease-in-out infinite; }
.side-btns .event-tile .art-svg { filter: drop-shadow(0 0 8px rgba(255,140,40,.8)); }
.side-btns .event-tile.hidden { display: none; }
@media (max-width: 900px) { .home-bottom .side-btns { grid-template-columns: repeat(3, 82px); grid-auto-rows: 82px; gap: 8px; } .side-btns .btn.tile { font-size: 10px; } }
@media (max-width: 640px) { .home-bottom .side-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 76px; } }
@media (max-height: 520px) {
  .home-bottom .side-btns { grid-template-columns: repeat(6, 60px); grid-auto-rows: 60px; gap: 6px; }
  .side-btns .btn.tile { font-size: 7.5px; padding: 3px 1px 5px; border-radius: 13px; letter-spacing: .02em; }
  .side-btns .tile .art-svg { max-height: 34px; }
  .side-btns .btn.tile .dot { top: 4px; right: 4px; width: 9px; height: 9px; }
}

/* ---- Clanes (mismo estilo que el resto del juego) ---- */
.clan-wrap { width: min(1180px, 100%); }
.clan-tools { display: flex; gap: 8px; justify-self: end; }
.clan-tool { position: relative; width: 46px; height: 46px; border-radius: 14px; cursor: pointer; color: var(--accent);
  background: rgba(10,17,14,.85); border: 1.5px solid rgba(var(--acc-rgb),.3); display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, box-shadow .15s; }
.clan-tool:hover { border-color: var(--accent); box-shadow: 0 0 16px rgba(var(--acc-rgb),.3); }
.clan-tool:active { transform: scale(.95); }
.clan-tool .ico-svg { width: 21px; height: 21px; }
.clan-tool .art-svg { width: 32px; height: 32px; }
.clan-tool.red { color: #ff6b73; border-color: rgba(255,77,87,.35); }
.clan-tool.red:hover { border-color: var(--red); box-shadow: 0 0 16px rgba(255,77,87,.3); }
.clan-tool .dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 10px var(--accent); animation: blink 1.4s infinite; }
.clan-tool .dot.hidden, .clan-tool.hidden { display: none; }
.clan-guest { text-align: center; padding: 30px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.clan-layout { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.clan-card, .clan-members, .clan-browse { border-radius: 20px; padding: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.clan-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.clan-edit { position: absolute; top: 14px; right: 14px; }
.clan-shield { width: 150px; height: 150px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.clan-shield .shield-svg { width: 100%; height: 100%; }
.clan-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: center; }
.clan-title b { font: 900 italic 28px Rubik, system-ui, sans-serif; color: var(--text); }
.clan-title span { font-weight: 900; color: var(--accent); letter-spacing: .06em; }
.clan-desc { margin: 0; color: var(--muted); font-weight: 700; min-height: 1em; }
.clan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.clan-stats > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); text-align: left; }
.clan-stats .ico { color: var(--accent); } .clan-stats .ico-svg { width: 24px; height: 24px; }
.clan-stats small { display: block; font-size: 11px; color: var(--muted); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.clan-stats b { font: 900 20px Rubik, system-ui, sans-serif; color: var(--text); }
.clan-card .btn.big { width: 100%; margin-top: 4px; }
.clan-mhead { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.clan-mhead > b { text-align: center; font: 900 italic 20px Rubik, system-ui, sans-serif; letter-spacing: .06em; }
.clan-count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 900; }
.clan-count .ico { color: var(--accent); }
.clan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: min(58vh, 560px); overflow-y: auto; scrollbar-width: thin; }
.clan-row, .clan-res { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 14px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.clan-row:hover, .clan-res:hover { border-color: rgba(var(--acc-rgb),.5); background: rgba(var(--acc-rgb),.06); }
.clan-res.mine { border-color: rgba(var(--acc-rgb),.6); }
.clan-av { position: relative; inset: auto; width: 48px; height: 48px; flex: none; border-radius: 50%; background: rgba(0,0,0,.3); box-shadow: 0 0 0 2px rgba(var(--acc-rgb),.35); }
.clan-row .fr-dot { width: 10px; height: 10px; border-radius: 50%; background: #4d5a53; flex: none; }
.clan-row.on .fr-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.clan-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.clan-info b { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clan-info small { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.clan-row.on .clan-info small { color: var(--accent); }
.clan-info small .ico-svg { width: 13px; height: 13px; color: var(--accent); }
.clan-row:not(.on) .clan-info b { color: #aab6af; }
.clan-cups { display: inline-flex; align-items: center; gap: 6px; font: 900 18px Rubik, system-ui, sans-serif; color: var(--text); }
.clan-cups .ico-svg { width: 20px; height: 20px; color: var(--accent); }
.clan-row .fr-act { display: flex; gap: 4px; }
.cr-rank { font: 900 italic 18px Rubik, system-ui, sans-serif; color: var(--accent); min-width: 36px; text-align: center; }
.cr-shield { width: 46px; height: 46px; flex: none; } .cr-shield .shield-svg { width: 100%; height: 100%; }
.clan-tabs { margin-bottom: 14px; }
.clan-tabs button.hidden { display: none; }
.clan-create { display: flex; flex-direction: column; gap: 8px; }
.cc-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cc-fields { flex: 1; min-width: 240px; display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.cc-fields label { display: flex; flex-direction: column; gap: 4px; } .cc-fields label.wide { grid-column: 1 / -1; }
.cc-fields small { color: var(--muted); font-weight: 800; font-size: 12px; }
.cc-fields input, #ccMin { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: 700 15px Rubik, system-ui, sans-serif; outline: none; }
.cc-fields input:focus, #ccMin:focus { border-color: var(--accent); }
.cc-fields input:disabled { opacity: .6; }
.cc-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-sw { width: 32px; height: 32px; border-radius: 10px; border: 2px solid rgba(255,255,255,.12); cursor: pointer; }
.cc-sw.on { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 12px rgba(var(--acc-rgb),.5); }
.cc-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
#ccMin { width: 140px; }
.clan-create .btn.big { margin-top: 10px; }
.clan-chat-card { width: min(560px, 100%); display: flex; flex-direction: column; gap: 10px; }
.cc-list { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 6px; height: min(50vh, 420px); overflow-y: auto; scrollbar-width: thin; }
.cc-list li { padding: 8px 12px; border-radius: 12px; background: var(--panel-2); display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; }
.cc-list li.me { background: rgba(var(--acc-rgb),.1); }
.cc-list li b { color: var(--accent); } .cc-list li span { overflow-wrap: anywhere; } .cc-list li small { color: var(--muted); font-size: 11px; }
.cc-list li.cc-sys { display: block; text-align: center; background: none; color: var(--muted); font-style: italic; font-size: 13px; }
@media (max-width: 820px) and (min-height: 521px) { .clan-layout { grid-template-columns: 1fr; } .clan-shield { width: 110px; height: 110px; } }
@media (max-height: 520px) {
  .clan-layout { grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); gap: 10px; }
  .clan-card { gap: 6px; } .clan-title b { font-size: 18px; } .clan-desc { font-size: 12px; }
  .clan-stats { gap: 6px; } .clan-stats > div { padding: 6px 8px; gap: 6px; } .clan-stats b { font-size: 15px; } .clan-stats small { font-size: 8px; } .clan-stats .ico-svg { width: 18px; height: 18px; }
  .clan-mhead { margin-bottom: 8px; } .clan-mhead > b { font-size: 15px; }
  .clan-row, .clan-res { padding: 5px 10px 5px 6px; gap: 8px; } .clan-av { width: 36px; height: 36px; } .clan-cups { font-size: 15px; }
  .clan-list { max-height: calc(100vh - 150px); }
  .clan-wrap .screen-head h2 { font-size: 22px; }
  .clan-shield { width: 64px; height: 64px; }
  .clan-tool { width: 38px; height: 38px; } .clan-card, .clan-members, .clan-browse { padding: 12px; }
}
/* Pantallas medianas (móvil en horizontal): la barra de arriba no puede ensanchar el inicio y cortar el botón JUGAR. */
.home-screen { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .acct-btn #acctName { display: none; } .home-top .coins small { display: none; } }

/* ---- Chat de la sala: abajo en el centro y discreto; el bocadillo abre el chat entero ---- */
#chat.chat { left: 50%; right: auto; top: auto; bottom: 12px; transform: translateX(-50%); width: min(420px, 34vw); align-items: center; gap: 5px; pointer-events: none; }
#chat.chat ul { width: 100%; max-height: none; overflow: hidden; align-items: center; }
#chat.chat li { align-self: center; text-align: center; font-size: 12.5px; background: rgba(0,0,0,.55); }
#chat.chat li.old { opacity: 0; }
#chat.chat.open li.old { opacity: .9; }
.chat-bar { display: flex; align-items: center; gap: 6px; width: 100%; justify-content: center; }
#chat .chat-bar input { flex: 1; min-width: 0; padding: 7px 12px; font-size: 13px; border-radius: 999px; }
#chat.chat small { display: block; pointer-events: none; background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
#chat.chat.open small, #chat.chat.room small, #chat.chat.lobby small { display: none; }
.chat-full-btn { position: relative; flex: none; pointer-events: auto; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--accent);
  background: rgba(10,17,14,.85); border: 1.5px solid rgba(var(--acc-rgb),.35); display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, box-shadow .15s; }
.chat-full-btn:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(var(--acc-rgb),.35); }
.chat-full-btn .ico-svg { width: 17px; height: 17px; }
.chat-full-btn b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font: 900 11px/18px Rubik, system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px rgba(10,17,14,.95); }
.chat-full-btn b.hidden { display: none; }
body[data-screen="game"] .chat-full-btn:not(:hover) { opacity: .6; }
@media (max-width: 900px) { #chat.chat { width: min(240px, 34vw); } #chat.chat small { display: none; } }
@media (max-height: 520px) { #chat.chat { bottom: 6px; } #chat.chat li { font-size: 11px; padding: 3px 8px; } #chat .chat-bar input { padding: 5px 10px; font-size: 12px; } .chat-full-btn { width: 30px; height: 30px; } }
.lobby-card { margin-bottom: 64px; } /* que el chat de abajo no tape los ajustes de la sala */

/* ---- Copas: botón del inicio, ligas, camino de trofeos y ranking ---- */
.cups-mini { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-radius: 16px; cursor: pointer; color: var(--text);
  background: rgba(10,17,14,.78); border: 1px solid rgba(var(--acc-rgb),.3); font: 900 18px Rubik, system-ui, sans-serif; transition: border-color .15s, box-shadow .15s; }
.cups-mini:hover { border-color: var(--accent); box-shadow: 0 0 16px rgba(var(--acc-rgb),.3); }
.cups-mini .ico { color: var(--accent); } .cups-mini .ico-svg { width: 22px; height: 22px; filter: drop-shadow(0 0 6px rgba(var(--acc-rgb),.5)); }
.cups-mini .dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(10,17,14,.9), 0 0 10px var(--accent); animation: blink 1.4s infinite; }
.cups-mini .dot.hidden { display: none; }
@media (max-width: 900px) { .cups-mini { height: 44px; padding: 0 10px; font-size: 15px; border-radius: 12px; } .cups-mini .ico-svg { width: 18px; height: 18px; } }
@media (max-height: 520px) { .cups-mini { height: 38px; padding: 0 9px; font-size: 13px; } }
.league-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.cups-top { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.cups-badge { width: 70px; height: 70px; }
.cups-now { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cups-now > small:first-child { font-weight: 900; letter-spacing: .1em; font-size: 12px; }
.cups-now > b { display: inline-flex; align-items: center; gap: 8px; font: 900 italic 34px Rubik, system-ui, sans-serif; }
.cups-now > b .ico { color: var(--accent); } .cups-now > b .ico-svg { width: 30px; height: 30px; filter: drop-shadow(0 0 8px rgba(var(--acc-rgb),.5)); }
.cups-now small { color: var(--muted); }
.cups-tabs { margin: 4px 0; }
.road { display: flex; gap: 10px; overflow-x: auto; padding: 10px 4px 14px; scroll-behavior: smooth; scrollbar-width: thin; }
.road-step { position: relative; flex: 0 0 132px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px 18px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); text-align: center; }
.road-step.open { border-color: rgba(var(--acc-rgb),.6); box-shadow: 0 0 18px rgba(var(--acc-rgb),.18); }
.road-step.got { opacity: .62; }
.road-step.locked { opacity: .82; }
.road-step.league { flex-basis: 158px; border-color: color-mix(in srgb, var(--lc) 60%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--lc) 14%, rgba(13,21,18,.92)), var(--panel)); }
.rs-cups { display: inline-flex; align-items: center; gap: 5px; font: 900 15px Rubik, system-ui, sans-serif; }
.rs-cups .ico-svg { width: 16px; height: 16px; color: var(--accent); }
.rs-prize { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; }
.rs-badge { width: 48px; height: 48px; } .rs-prize small { font-weight: 900; font-size: 10px; letter-spacing: .08em; color: var(--lc); }
.rs-amt { display: inline-flex; align-items: center; gap: 6px; font: 900 18px Rubik, system-ui, sans-serif; }
.rs-amt .coin-ico { width: 24px; height: 24px; }
.rs-amt em { font-style: normal; font-size: 11px; padding: 3px 6px; border-radius: 6px; background: rgba(var(--acc-rgb),.15); color: var(--accent); }
.road-step .pt-state { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.road-step .pt-state .ico-svg { width: 13px; height: 13px; }
.rs-line { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.rs-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi)); box-shadow: 0 0 8px rgba(var(--acc-rgb),.6); }
.rank-row.me { border-color: var(--accent); background: rgba(var(--acc-rgb),.08); }
.rank-badge { width: 28px; height: 28px; flex: none; }
.rank-list { max-height: min(54vh, 520px); }
@media (max-height: 520px) {
  .cups-top { padding: 8px 12px; gap: 10px; } .cups-badge { width: 44px; height: 44px; } .cups-now > b { font-size: 24px; }
  .road-step { flex-basis: 112px; padding: 8px 8px 16px; } .rs-prize { min-height: 56px; } .rs-badge { width: 34px; height: 34px; }
  .rank-list { max-height: calc(100vh - 230px); }
}
/* Solicitudes del clan: botón con texto y lucecita cuando hay alguna */
.clan-tool.wide { width: auto; padding: 0 14px; gap: 7px; font: 900 12px Rubik, system-ui, sans-serif; letter-spacing: .06em; }
.clan-tool.wide b { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 900 12px/20px Rubik, system-ui, sans-serif; }
.clan-tool.wide b.hidden { display: none; }
.clan-tool.lit { border-color: var(--accent); animation: reqGlow 1.6s ease-in-out infinite; }
@keyframes reqGlow { 50% { box-shadow: 0 0 22px rgba(var(--acc-rgb),.65); } }
@media (max-height: 520px) { .clan-tool.wide { padding: 0 10px; font-size: 10px; } }
/* Con el botón de copas arriba, en pantallas medianas se estrecha el pase para que nada se monte. */
@media (max-width: 900px) { .pass-mini { min-width: 0; } .pm-body { width: 96px; } .home-top .logo { font-size: 34px; } .top-left, .top-right { gap: 8px; } }

/* ---- Inicio: camino de trofeos arriba (donde estaba el pase) y 7 botones abajo ---- */
.road-mini .rm-badge { padding: 5px; }
.road-mini .pm-top small { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 13px; }
.road-mini .pm-top small .ico { color: var(--accent); } .road-mini .pm-top small .ico-svg { width: 14px; height: 14px; }
.home-bottom .side-btns { grid-template-columns: repeat(4, 94px); }
.tile-chip { position: absolute; top: 6px; left: 6px; font: 900 italic 9px Rubik, system-ui, sans-serif; letter-spacing: .04em; padding: 2px 5px; border-radius: 6px;
  background: rgba(var(--acc-rgb),.16); color: var(--accent); border: 1px solid rgba(var(--acc-rgb),.35); }
@media (max-width: 900px) { .home-bottom .side-btns { grid-template-columns: repeat(4, 82px); } .road-mini .pm-top b { display: none; } }
@media (max-width: 640px) { .home-bottom .side-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-height: 520px) {
  .home-bottom .side-btns { grid-template-columns: repeat(7, 54px); grid-auto-rows: 54px; gap: 5px; }
  .side-btns .tile .art-svg { max-height: 30px; }
  .tile-chip { top: 3px; left: 3px; font-size: 7px; padding: 1px 3px; }
}
/* ---- Tamaños que se adaptan a la pantalla (portátil, monitor…): --ui lo calcula el juego ---- */
.home-top, .home-bottom, .name-plate, .party-side { zoom: var(--ui, 1); }
.screen > .wide-wrap, .screen > .card { zoom: min(var(--ui, 1), 1.12); }
.modal-card { zoom: min(var(--ui, 1), 1); }
@media (max-height: 520px) { .side-btns .btn.tile { font-size: 6.6px; letter-spacing: 0; } }

/* ---- Inicio: botones en una columna a la izquierda y el pase en barra larga abajo ---- */
.side-btns.side-dock { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); zoom: var(--ui, 1); z-index: 5;
  display: grid; grid-template-columns: 80px; grid-auto-rows: 80px; gap: 9px; flex-wrap: nowrap; }
.side-dock .btn.tile { font-size: 10px; letter-spacing: .05em; }
.side-dock .tile .art-svg { max-height: 46px; }
.home-center { padding: 0 calc(var(--ui, 1) * 124px); }
.pass-mini.pass-long { min-width: 360px; padding: 8px 20px 8px 8px; border-radius: 18px; }
.pass-long .pm-lv { width: 56px; height: 56px; border-radius: 14px; }
.pass-long .pm-lv b { font-size: 24px; }
.pass-long .pm-top b { font-size: 15px; }
.pass-long .pm-top small { font-size: 12px; }
.pass-long .pm-body { width: auto; }
.pass-long .xp-bar { height: 9px; }
.pass-long .dot { position: absolute; top: 8px; right: 8px; }
.home-bottom { align-items: flex-end; }
@media (max-height: 760px) and (min-height: 521px) { .side-btns.side-dock { grid-template-columns: repeat(2, 72px); grid-auto-rows: 72px; gap: 8px; } .home-center { padding: 0 calc(var(--ui, 1) * 186px); } }
@media (max-width: 900px) { .pass-mini.pass-long { min-width: 0; } .pass-long .pm-body { width: 150px; } .pass-long .pm-top b { display: inline; } }
@media (max-height: 520px) {
  .side-btns.side-dock { left: 10px; grid-template-columns: repeat(2, 46px); grid-auto-rows: 46px; gap: 5px; }
  .side-dock .btn.tile { font-size: 6px; letter-spacing: 0; padding: 2px 1px 4px; border-radius: 11px; }
  .side-dock .tile .art-svg { max-height: 26px; }
  .side-dock .btn.tile .dot { top: 3px; right: 3px; width: 8px; height: 8px; }
  .home-center { padding: 0 104px; }
  .pass-mini.pass-long { padding: 4px 10px 4px 4px; border-radius: 12px; }
  .pass-long .pm-lv { width: 36px; height: 36px; border-radius: 9px; } .pass-long .pm-lv b { font-size: 16px; } .pass-long .pm-lv small { font-size: 6px; }
  .pass-long .pm-body { width: 120px; gap: 4px; } .pass-long .pm-top b { font-size: 10px; } .pass-long .pm-top small { font-size: 9px; } .pass-long .xp-bar { height: 6px; }
}
.pass-long .pm-top b { white-space: nowrap; }

/* ---- (TAG) del clan junto al nombre ---- */
.ctag { margin-left: .35em; font-weight: 900; font-style: normal; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.plate-btn .ctag { font-size: .62em; vertical-align: .2em; }
/* ---- Camino de trofeos: casillas de ruleta ---- */
.road-step.spin { border-color: color-mix(in srgb, var(--wc) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--wc) 12%, rgba(13,21,18,.92)), var(--panel)); }
.rs-spin { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rs-wheel { position: relative; width: 46px; height: 46px; } .rs-wheel .art-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--wc) 70%, transparent)); }
.rs-spin b { font: 900 italic 15px Rubik, system-ui, sans-serif; color: var(--wc); min-height: 0; }
.rs-spin small { font-size: 10px; font-weight: 900; color: var(--wc); line-height: 1.15; }
.wheel-pick.ticket { border-style: dashed; }
.wl-label { margin: 4px 2px 0; }
#memberMenu button.duel { color: #ffd84d; }
.rs-wheel { --accent: var(--wc); --accent-hi: color-mix(in srgb, var(--wc) 70%, #fff); --accent-lo: color-mix(in srgb, var(--wc) 75%, #000); } /* la ruleta del premio, del color de su rareza */
/* (TAG) del clan en tu nombre del inicio: seguido del nombre, sin círculo */
.plate-btn b { white-space: nowrap; }
.plate-btn .ctag { display: inline; min-width: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: none; font-size: .72em; vertical-align: .08em; margin-left: .3em; }
/* (TAG) del clan con un espacio de separación del nombre */
.ctag { margin-left: .55em; }
.plate-btn .ctag { margin-left: .5em; }

/* ---- Ventana de fundadores ---- */
.founder-card #founderCanvas { width: 260px; height: 190px; display: block; margin: 0 auto; }
.founder-card h3 { font: 900 italic 44px/1 Rubik, system-ui, sans-serif; letter-spacing: .04em; margin: 8px 0 4px;
  background: linear-gradient(90deg, #fff1a8, #ffd84d, #7cff6b, #ffd84d, #fff1a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.founder-card p { max-width: 440px; margin: 6px auto 14px; color: var(--text); line-height: 1.45; }
.founder-card .founder-rar { background: linear-gradient(90deg, #fff1a8, #ffb800, #fff1a8); color: #0b0f0d; }
@media (max-height: 520px) { .founder-card #founderCanvas { height: 120px; } .founder-card h3 { font-size: 30px; } .founder-card p { font-size: 13px; margin: 4px auto 8px; } }

.founder-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 14px; max-width: 520px; }
.founder-list span { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,216,77,.08); border: 1px solid rgba(255,216,77,.35); }
.founder-list b { font-size: 13px; color: #ffe27a; } .founder-list small { font-size: 10px; color: var(--muted); }
@media (max-height: 520px) { .founder-list { margin-bottom: 8px; } .founder-list span { padding: 3px 7px; } .founder-list b { font-size: 11px; } }

/* Ventana de fundadores: siempre cabe (si no, se puede bajar) y se puede cerrar */
.prize-card.founder-card { overflow-y: auto; max-height: calc(100vh - 24px); padding: 16px 18px; gap: 6px; }
.founder-card #founderCanvas { height: min(170px, 22vh); flex: none; }
.founder-card h3 { font-size: clamp(26px, 5vh, 40px); margin: 2px 0; }
.founder-card p { font-size: 13.5px; margin: 2px auto 6px; }
.founder-card .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.founder-card .row .btn.big { padding: 12px 22px; font-size: 16px; }
.founder-x { position: absolute; top: 10px; right: 10px; z-index: 3; }
@media (max-height: 640px) { .founder-card #founderCanvas { height: 110px; } .founder-card p { font-size: 12px; } .founder-list { gap: 4px; margin-bottom: 6px; } .founder-list span { padding: 3px 7px; } }
.modal-card.founder-card { zoom: 1; } /* la ventana de fundadores ya se ajusta sola a la pantalla */
@media (max-height: 520px) {
  .prize-card.founder-card { padding: 10px 14px; gap: 3px; }
  .founder-card .prize-kicker { font-size: 10px; }
  .founder-card #founderCanvas { height: 74px; }
  .founder-card h3 { font-size: 22px; margin: 0; }
  .founder-card p { display: none; }
  .founder-list { margin: 2px auto 4px; }
  .founder-card .row .btn { padding: 8px 14px; font-size: 13px; }
}
/* Ventanas: sin la barra de scroll a la vista (si algo no cabe, se sigue pudiendo bajar con la rueda o el dedo) */
.modal-card { scrollbar-width: none; -ms-overflow-style: none; }
.modal-card::-webkit-scrollbar { display: none; width: 0; height: 0; }

.grip-opt { margin-bottom: 18px; }
.grip-opt .grip-end { color: var(--muted); font-weight: 800; white-space: nowrap; font-size: 12px; }
/* Todas las barras deslizantes con el estilo del juego (agarre, público, FPS, joystick…) */
.vol-row input[type=range] { --v: 50%; flex: 1; min-width: 0; height: 10px; -webkit-appearance: none; appearance: none; border-radius: 5px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) var(--v), rgba(255,255,255,.12) var(--v)); }
.vol-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 12px rgba(var(--acc-rgb),.6); }
.vol-row input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
/* Sin barras de scroll a la vista en todo el juego (se sigue pudiendo bajar con la rueda o el dedo) */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---------- Gemas: esmeralda XBALL (negro y verde) ---------- */
.gem-ico {
  position: relative; display: inline-block; width: 16px; height: 16px; flex: none;
  transform: rotate(45deg) scale(.92); border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-hi, #c9ffb8) 0%, var(--accent, #7cff6b) 42%, var(--accent-lo, #2c8f3a) 100%);
  box-shadow: 0 0 10px rgba(124,255,107,.55), inset 0 0 0 1.5px rgba(10,17,14,.55);
}
.gem-ico::after { content: ''; position: absolute; left: 3px; top: 3px; width: 5px; height: 5px; border-radius: 1px; background: rgba(255,255,255,.75); }
.coins.gems { padding: 8px 12px; gap: 7px; }
.coins.gems b { color: var(--accent-hi, #c9ffb8); }
.ach-act .ach-rw.gem { margin-left: 6px; }
.m-reward span .gem-ico, .ach-rw .gem-ico { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
@media (max-width: 900px) { .home-top .coins.gems { padding: 6px 9px; } }

.wallet { display: inline-flex; align-items: center; gap: 8px; }
.screen-head > .wallet { justify-self: end; }
@media (max-width: 700px) { .screen-head .wallet .coins small { display: none; } .screen-head .wallet { gap: 5px; } }

/* ---- Elige modo (v2): informal y rankeds grandes arriba; minijuegos, torneos y personalizada abajo ---- */
#modeGrid { grid-template-columns: repeat(6, 1fr); }
#modeGrid .mode-card { grid-column: span 2; }
#modeGrid .mode-card.casual, #modeGrid .mode-card.ranked { grid-column: span 3; min-height: 230px; }
#modeGrid .mode-card.casual b, #modeGrid .mode-card.ranked b { font-size: 28px; }
.mode-card.casual { --mc: var(--accent); } .mode-card.ranked { --mc: #ffd84d; } .mode-card.mini { --mc: #e46bff; } .mode-card.futsal { --mc: #ff4d57; }
@media (max-width: 760px) { #modeGrid { grid-template-columns: 1fr 1fr; } #modeGrid .mode-card, #modeGrid .mode-card.casual, #modeGrid .mode-card.ranked { grid-column: span 1; min-height: 150px; } #modeGrid .mode-card.custom { grid-column: span 2; } }
@media (max-height: 520px) { #modeGrid .mode-card.casual, #modeGrid .mode-card.ranked { min-height: 120px; } #modeGrid .mode-card.casual b, #modeGrid .mode-card.ranked b { font-size: 20px; } }
.mode-sub.hidden, .mini-grid.hidden, .size-pick.hidden, .size-pick button.hidden { display: none; }
.mode-sub { display: flex; flex-direction: column; gap: 14px; }
.ms-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ms-head h3 { margin: 0; font: 900 italic 26px Rubik, sans-serif; color: var(--accent); letter-spacing: .02em; }
.ms-head small { color: var(--muted); font-size: 14px; }
.mini-grid { grid-template-columns: repeat(4, 1fr); }
.mini-grid .mode-card { min-height: 260px; }
@media (max-width: 1000px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } .mini-grid .mode-card { min-height: 170px; } }
@media (max-width: 560px) { .mini-grid { grid-template-columns: 1fr; } }
@media (max-height: 520px) { .mini-grid { grid-template-columns: repeat(4, 1fr); } .mini-grid .mode-card { min-height: 130px; } }
.size-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 700px) { .size-pick { grid-template-columns: 1fr 1fr; } }
.size-pick button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; cursor: pointer;
  border-radius: 20px; border: 1px solid rgba(var(--acc-rgb),.3); color: var(--text); font: inherit;
  background: radial-gradient(120% 90% at 50% 0%, rgba(var(--acc-rgb),.16), transparent 60%), linear-gradient(170deg, rgba(20,30,25,.96), rgba(8,12,10,.96));
  transition: transform .12s, border-color .12s, box-shadow .12s; }
.size-pick button b { font: 900 italic 34px Rubik, sans-serif; color: var(--accent); text-shadow: 0 0 18px rgba(var(--acc-rgb),.45); }
.size-pick button small { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.size-pick button:hover, .size-pick button:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 24px rgba(var(--acc-rgb),.25); outline: none; }
@media (max-height: 520px) { .size-pick button { min-height: 90px; } .size-pick button b { font-size: 24px; } }

/* ---- Buscando partida ---- */
.queue-card { width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 22px; }
.queue-card h3 { margin: 4px 0 0; font: 900 italic 24px Rubik, sans-serif; letter-spacing: .04em; }
.q-kind { margin: 0; color: var(--accent); font-weight: 900; letter-spacing: .12em; font-size: 13px; }
.q-ring { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.q-ring i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid rgba(var(--acc-rgb),.18); border-top-color: var(--accent); animation: qSpin 1s linear infinite; box-shadow: 0 0 24px rgba(var(--acc-rgb),.25); }
.q-ring b { font: 900 italic 30px Rubik, sans-serif; color: var(--accent); }
@keyframes qSpin { to { transform: rotate(360deg); } }
.q-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 260px; }
.q-slots i { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); }
.q-slots i.on { border: 2px solid var(--accent); background: radial-gradient(circle at 35% 30%, rgba(var(--acc-rgb),.9), rgba(var(--acc-rgb),.35)); box-shadow: 0 0 10px rgba(var(--acc-rgb),.5); }
.queue-card .hint { margin: 0; min-height: 2.6em; }
/* Portátil (pantalla baja): los botones de la izquierda en 2 columnas, sin hacerse diminutos y con el texto entero. */
@media (max-height: 760px) and (min-height: 521px) {
  .side-btns.side-dock { zoom: max(var(--ui, 1), .92); grid-template-columns: repeat(2, 80px); grid-auto-rows: 80px; gap: 8px; left: 18px; }
  .side-dock .btn.tile { font-size: 8.6px; letter-spacing: 0; white-space: nowrap; }
  .side-dock .tile .art-svg { max-height: 44px; }
}
.side-dock .btn.tile { overflow: hidden; }

/* ---- Catálogo: lo que no tienes, «Bloqueado» (pequeño) ---- */
.sh-own.lock { display: inline-flex; align-items: center; gap: 3px; background: rgba(10,14,12,.8); color: var(--muted); border: 1px solid rgba(255,255,255,.14); box-shadow: none; }
.sh-own.lock .ico-svg { width: 10px; height: 10px; }

/* ---- Tienda: gemas ---- */
#shopGems.hidden { display: none; }
.gem-packs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 900px) { .gem-packs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gem-packs { grid-template-columns: 1fr 1fr; } }
.gem-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 10px 16px; border-radius: 18px; cursor: pointer; font: inherit; color: var(--text);
  background: radial-gradient(110% 80% at 50% 0%, rgba(var(--acc-rgb),.18), transparent 65%), linear-gradient(170deg, rgba(20,30,25,.96), rgba(8,12,10,.96));
  border: 1px solid rgba(var(--acc-rgb),.3); transition: transform .12s, border-color .12s, box-shadow .12s; }
.gem-pack:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 24px rgba(var(--acc-rgb),.25); }
.gem-pack.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 26px rgba(var(--acc-rgb),.3); }
.gp-pile { display: flex; justify-content: center; height: 46px; align-items: center; }
.gp-pile .gem-ico { width: 24px; height: 24px; margin: 0 -3px; }
.gem-pack b { font: 900 italic 30px Rubik, sans-serif; color: var(--accent-hi, #c9ffb8); }
.gem-pack small { color: var(--muted); font-weight: 900; letter-spacing: .14em; font-size: 11px; }
.gem-pack em { margin-top: 6px; font-style: normal; font-weight: 900; font-size: 16px; padding: 6px 16px; border-radius: 999px; background: var(--accent); color: #07110a; }
.gp-save { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 999px; background: #ffd84d; color: #241a00; box-shadow: 0 4px 12px rgba(0,0,0,.4); }

/* ---- Pase Premium ---- */
.pass-prem { margin-top: 18px; padding: 16px; border-radius: 20px; border: 1px solid rgba(255,216,77,.45);
  background: radial-gradient(120% 70% at 0% 0%, rgba(255,216,77,.12), transparent 60%), rgba(10,14,12,.6); }
.pp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pp-head > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.pp-head b { font: 900 italic 22px Rubik, sans-serif; color: #ffd84d; letter-spacing: .03em; }
.pp-head small { color: var(--muted); }
#ppBuy { display: inline-flex; align-items: center; gap: 8px; }
.pass-prem:not(.owned) .pass-tier { filter: saturate(.6); opacity: .8; }
.pass-tier.prem { border-color: rgba(255,216,77,.35); }
.pt-coins.pt-spin { flex-direction: column; gap: 2px; }
.pt-coins.pt-spin .rs-wheel { width: 40px; height: 40px; }
.pt-coins.pt-spin small { font-size: 10px; font-weight: 900; color: var(--wc); text-align: center; line-height: 1.1; }
.pt-coins.pt-gems b { color: var(--accent-hi, #c9ffb8); }
#spinGemBtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: min(320px, 100%); margin-top: 8px; }
#spinGemBtn.hidden { display: none; }
#spinGemBtn.cant { opacity: .55; }

/* ---- Idioma y país ---- */
.flag { width: 1.25em; height: auto; aspect-ratio: 3 / 2; border-radius: 3px; vertical-align: -0.12em; margin-right: .4em; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 2px 6px rgba(0,0,0,.35); flex: none; }
.flag.none { display: inline-block; width: 30px; height: 20px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 4px, transparent 4px 8px); }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.country { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: 700 13px Rubik, sans-serif; cursor: pointer; text-align: left; }
.country .flag { width: 30px; margin: 0; }
.country:hover { border-color: rgba(var(--acc-rgb),.6); }
.country.on { border-color: var(--accent); background: rgba(var(--acc-rgb),.14); box-shadow: 0 0 12px rgba(var(--acc-rgb),.25); }

@media (max-height: 760px) and (min-height: 521px) { .home-center { padding: 0 calc(max(var(--ui, 1), .92) * 196px); } }
.cat-card .sh-own.lock { font-size: 8px; letter-spacing: .04em; padding: 2px 6px; top: 9px; right: 8px; gap: 2px; }
.cat-card .sh-own.lock .ico-svg { width: 8px; height: 8px; }

/* ---- Gema: siempre de oro (no cambia con el tema) ---- */
.gem-ico { background: linear-gradient(135deg, #fff6c8 0%, #ffd84d 42%, #c98a00 100%) !important; box-shadow: 0 0 10px rgba(255,216,77,.55), inset 0 0 0 1.5px rgba(40,26,0,.5) !important; }
.coins.gems { border-color: rgba(255,216,77,.45); }
.coins.gems b, .gem-pack b, .pt-coins.pt-gems b { color: #ffd84d !important; }
.gem-pack { background: radial-gradient(110% 80% at 50% 0%, rgba(255,216,77,.16), transparent 65%), linear-gradient(170deg, rgba(20,30,25,.96), rgba(8,12,10,.96)); }
/* El «Ahorras» ya no tapa la explicación de arriba */
.gem-packs { padding-top: 16px; }
.wp-or { font-style: normal; opacity: .7; margin: 0 2px; }
/* Pase: pestañas gratis / premium */
.pass-tabs { margin: 6px 0 12px; max-width: 520px; }
.pass-tabs button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pass-tabs .ico-svg { width: 16px; height: 16px; }
.pass-tabs .tdot { position: absolute; top: 6px; right: 8px; }
#passFree.hidden, .pass-prem.hidden { display: none; }
.pass-prem { margin-top: 0; }
/* Final del partido: copas ganadas o perdidas */
.cups-res { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; border-radius: 14px; margin: 6px auto 0; width: fit-content;
  background: rgba(255,216,77,.1); border: 1px solid rgba(255,216,77,.45); }
.cups-res.hidden { display: none; }
.cups-res .ico-svg { width: 20px; height: 20px; color: #ffd84d; }
.cups-res b { color: #ffd84d; font: 900 italic 20px Rubik, sans-serif; }
.cups-res small { color: var(--muted); }
.cups-res.down { background: rgba(255,77,87,.1); border-color: rgba(255,77,87,.45); }
.cups-res.down b, .cups-res.down .ico-svg { color: #ff6b73; }
.btn.danger { border-color: rgba(255,77,87,.6); color: #ff8a90; }
.btn.danger:hover { background: rgba(255,77,87,.15); }
/* Botones de la izquierda del inicio: el texto entero (PERSONALIZAR es el más largo) */
.side-dock .btn.tile { letter-spacing: 0; padding-left: 2px; padding-right: 2px; }
.side-dock .btn.tile span:last-child, .side-dock .btn.tile > b { white-space: nowrap; }

.mode-card svg.mode-art { filter: none; }
.mode-card:hover svg.mode-art { filter: saturate(1.15) brightness(1.08); }
.side-dock .btn.tile { font-size: 9px; overflow: visible; } @media (max-height: 760px) and (min-height: 521px) { .side-dock .btn.tile { font-size: 8.6px; } }

/* ---- Final de ranked: liga y barra de copas ---- */
.cups-res { --lc: #ffd84d; position: relative; display: flex; align-items: center; gap: 14px; width: min(460px, 100%); margin: 8px auto 0; padding: 10px 16px; border-radius: 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--lc) 14%, rgba(10,14,12,.85)), rgba(10,14,12,.85)); border: 1px solid color-mix(in srgb, var(--lc) 55%, transparent); overflow: visible; }
.cups-res.down { background: linear-gradient(90deg, rgba(255,77,87,.12), rgba(10,14,12,.85)); border-color: rgba(255,77,87,.5); }
.cr-badge { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--lc) 60%, transparent)); }
.cr-badge svg { width: 100%; height: 100%; }
.cr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; text-align: left; }
.cr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cr-top b { font: 900 italic 17px Rubik, sans-serif; color: var(--lc); letter-spacing: .03em; }
.cr-top em { font: 900 italic 22px Rubik, sans-serif; color: #ffd84d; }
.cups-res.down .cr-top em { color: #ff6b73; }
.cr-bar { position: relative; height: 12px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.cr-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--lc) 60%, #000), var(--lc)); box-shadow: 0 0 12px color-mix(in srgb, var(--lc) 70%, transparent); }
.cups-res.down .cr-fill { background: linear-gradient(90deg, #7a1d24, #ff6b73); box-shadow: 0 0 10px rgba(255,77,87,.5); }
.cr-body small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cups-res.promo { animation: crPromo 1.2s cubic-bezier(.2,.9,.3,1.2); box-shadow: 0 0 0 2px var(--lc), 0 0 40px color-mix(in srgb, var(--lc) 55%, transparent); }
.cups-res.promo .cr-badge { animation: crBadge 1s cubic-bezier(.2,.9,.3,1.4); }
@keyframes crPromo { 0% { transform: scale(1); } 25% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes crBadge { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.35) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.cr-promo { position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none; z-index: 2; }
.cr-promo.hidden { display: none; }
.cr-promo span { position: relative; display: inline-block; font: 900 italic 22px Rubik, sans-serif; letter-spacing: .04em; padding: 6px 16px 8px; border-radius: 12px;
  color: #0a0f0c; background: var(--lc); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 30px color-mix(in srgb, var(--lc) 70%, transparent); animation: crPop .7s cubic-bezier(.2,.9,.3,1.5) both; }
.cups-res.demo .cr-promo span { background: rgba(20,24,22,.95); color: #ff8a90; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 16px; }
.cr-rays { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; opacity: .55;
  background: repeating-conic-gradient(from 0deg, var(--lc) 0 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 62%); mask: radial-gradient(circle, #000 0, transparent 62%);
  animation: crRays 3s linear infinite, crFade .8s ease-out both; }
.cups-res.demo .cr-rays { display: none; }
@keyframes crPop { 0% { transform: scale(.2) translateY(20px); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes crRays { to { transform: rotate(360deg); } }
@keyframes crFade { from { opacity: 0; } }
.cr-promo { top: 0; transform: translate(-50%, -62%); }

/* ---- Xclusivo de la semana ---- */
.sh-weekly { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 0 auto; }
.sh-card.weekly { border-color: #ffd84d; box-shadow: 0 0 0 1px #ffd84d, 0 0 34px rgba(255,216,77,.25); background: radial-gradient(120% 90% at 0% 0%, rgba(255,216,77,.14), transparent 60%), var(--panel, rgba(13,21,18,.92)); }
.sh-buy.gem { background: linear-gradient(135deg, #fff1a8, #ffc21f); color: #241a00; border-color: #ffd84d; }
.sh-buy.gem.cant { opacity: .6; }
.wk-left { position: absolute; top: 10px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #ffd84d;
  background: rgba(10,12,6,.8); border: 1px solid rgba(255,216,77,.45); padding: 3px 8px; border-radius: 999px; }
.wk-left .ico-svg { width: 12px; height: 12px; }
.sh-card.weekly .sh-own { top: 40px; }
/* ---- Cambiar de nombre ---- */
.name-save { margin-top: 6px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; }
.name-save.hidden { display: none; }
.name-save .gem-ico { width: 13px; height: 13px; }

/* ---- Buscar partida: siempre por encima del resumen del partido ---- */
#queue { z-index: 400; }

/* ---- Pase al estilo de los pases de batalla: gratis arriba, Premium abajo ---- */
.pass-buy { margin: 6px 0 10px; padding: 12px 16px; border-radius: 18px; border: 1px solid rgba(255,216,77,.45);
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,216,77,.14), transparent 60%), rgba(10,14,12,.7); }
.pass-buy.owned { border-color: rgba(255,216,77,.8); box-shadow: 0 0 24px rgba(255,216,77,.2); }
.pp-eur { background: linear-gradient(135deg, #fff1a8, #ffc21f) !important; color: #241a00 !important; border-color: #ffd84d !important; font-weight: 900; }
.pp-gems { display: inline-flex; align-items: center; gap: 7px; }
.pass-track { position: relative; display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 12px; scroll-behavior: smooth; }
.pt-rows { position: sticky; left: 0; z-index: 3; flex: none; display: flex; flex-direction: column; gap: 10px; padding-top: 34px; background: linear-gradient(90deg, rgba(10,17,14,.98) 70%, rgba(10,17,14,0)); padding-right: 10px; }
.pr-lab { writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; width: 34px; height: 196px; border-radius: 12px;
  font: 900 italic 14px Rubik, sans-serif; letter-spacing: .14em; }
.pr-lab.free { background: rgba(124,255,107,.12); color: var(--accent); border: 1px solid rgba(124,255,107,.35); }
.pr-lab.prem { background: rgba(255,216,77,.14); color: #ffd84d; border: 1px solid rgba(255,216,77,.5); }
.pt-cols { display: flex; gap: 10px; }
.pcol { flex: none; width: 150px; display: flex; flex-direction: column; gap: 10px; }
.pc-lv { display: grid; place-items: center; height: 24px; border-radius: 999px; font: 900 italic 14px Rubik, sans-serif; color: var(--muted); background: rgba(255,255,255,.05); }
.pcol.reached .pc-lv { color: #0a1a08; background: var(--accent); }
.pcol.next .pc-lv { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.pcol .pass-tier { height: 196px; min-height: 0; margin: 0; }
.pcol .pass-tier .pt-lv { display: none; }
.pcol .pass-tier.prem { background: linear-gradient(180deg, rgba(60,40,8,.55), rgba(20,14,4,.75)); border-color: rgba(255,216,77,.45); }
.pass-track:not(.has-prem) .pcol .pass-tier.prem { filter: saturate(.75); }
.pcol .pass-tier canvas { height: 82px; }
#langSeg { flex-wrap: wrap; } #langSeg button { flex: 1 1 120px; }

/* Pase: arrastrar con el ratón y flechas a los lados (sin barra de scroll) */
.pass-wrap { position: relative; }
.pass-track { cursor: grab; user-select: none; }
.pass-track.dragging { cursor: grabbing; }
.pass-track.dragging * { pointer-events: none; }
.road { cursor: grab; user-select: none; scrollbar-width: none; } .road::-webkit-scrollbar { display: none; }
.road.dragging { cursor: grabbing; scroll-behavior: auto; } .road.dragging * { pointer-events: none; }
.pass-arrow { position: absolute; top: 50%; z-index: 5; width: 46px; height: 46px; margin-top: -10px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(10,17,14,.92); border: 2px solid var(--accent); color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 14px rgba(var(--acc-rgb),.3); transition: opacity .2s, transform .12s; }
.pass-arrow:hover { transform: scale(1.08); }
.pass-arrow .ico-svg { width: 22px; height: 22px; }
.pass-arrow.l { left: 44px; }
.pass-arrow.r { right: -6px; }
.pass-arrow.r .ico-svg { transform: scaleX(-1); }
.pass-arrow.off { opacity: 0; pointer-events: none; }

/* Las etiquetas GRATIS / PREMIUM van fuera de lo que se desliza: nada asoma por detrás */
.pass-wrap { display: flex; gap: 10px; align-items: stretch; }
.pass-wrap > .pt-rows { position: static; background: none; padding: 38px 0 12px; flex: none; }
.pass-wrap > .pass-track { flex: 1; min-width: 0; padding-left: 0; }
.pass-arrow.l { left: 50px; }

.pt-multi { display: flex; gap: 4px; width: 100%; }
.pt-multi canvas { flex: 1; min-width: 0; height: 82px; cursor: pointer; }
.pcol .pass-tier.multi b { font-size: 12px; line-height: 1.1; }

/* ---- Club XBALL ---- */
#shopClub.hidden { display: none; }
.club-card { max-width: 900px; margin: 10px auto; padding: 20px; border-radius: 22px; border: 2px solid #ffd84d;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,216,77,.18), transparent 55%), radial-gradient(100% 80% at 0% 100%, rgba(var(--acc-rgb),.12), transparent 60%), rgba(10,14,12,.9);
  box-shadow: 0 0 40px rgba(255,216,77,.18); }
.club-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.club-head b { display: block; font: 900 italic 34px Rubik, sans-serif; color: #ffd84d; letter-spacing: .02em; }
.club-head small { color: var(--muted); }
.club-badge { font: 900 italic 18px Rubik, sans-serif; letter-spacing: .14em; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #fff1a8, #ffc21f); color: #241a00; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.club-body { display: grid; grid-template-columns: 1fr 230px; gap: 16px; align-items: center; }
@media (max-width: 700px) { .club-body { grid-template-columns: 1fr; } }
.club-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.club-perks li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,216,77,.18); }
.club-perks li > .ico-svg, .club-perks li > .ico .ico-svg { width: 26px; height: 26px; color: #ffd84d; }
.club-perks li > .gem-ico { width: 22px; height: 22px; margin: 0 2px; }
.club-perks b { display: block; font-weight: 900; }
.club-perks small { color: var(--muted); }
.club-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: 18px; background: rgba(0,0,0,.3); border: 1px solid #ffd84d; }
.club-item canvas { width: 100%; height: 150px; }
.club-item b { font: 900 italic 22px Rubik, sans-serif; color: #ffd84d; }
.club-item small { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.club-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
.club-foot .btn { font-size: 18px; padding: 14px 26px; }
.club-foot small { color: var(--muted); text-align: center; }
.club-item canvas { position: relative; inset: auto; display: block; }
.club-body { grid-template-columns: minmax(0, 1fr) 230px; } .club-item { min-width: 0; overflow: hidden; } .club-item canvas { width: 100% !important; max-width: 100%; } @media (max-width: 700px) { .club-body { grid-template-columns: minmax(0, 1fr); } }
#shopSeg { flex-wrap: nowrap; } #shopSeg button { white-space: nowrap; flex: 0 1 auto; }

/* ---- Ventana de recompensas ---- */
#rewards { z-index: 380; }
#rewards.out .rw-card { animation: rwOut .25s ease-in both; }
.rw-card { position: relative; overflow: hidden; width: min(760px, 100%); text-align: center; padding: 26px 22px 22px; border: 2px solid #ffd84d;
  background: radial-gradient(100% 70% at 50% 0%, rgba(255,216,77,.16), transparent 60%), linear-gradient(170deg, rgba(25,38,32,.98), rgba(10,16,13,.98));
  box-shadow: 0 0 0 1px rgba(255,216,77,.3), 0 0 60px rgba(255,216,77,.2), 0 40px 120px rgba(0,0,0,.7); animation: rwIn .45s cubic-bezier(.2,.9,.3,1.25) both; }
.rw-rays { position: absolute; left: 50%; top: 90px; width: 900px; height: 900px; margin: -450px 0 0 -450px; pointer-events: none; opacity: .13; z-index: 0;
  background: repeating-conic-gradient(from 0deg, #ffd84d 0 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 60%); mask: radial-gradient(circle, #000 0, transparent 60%); animation: crRays 12s linear infinite; }
.rw-card > * { position: relative; z-index: 1; }
.rw-kick { display: inline-block; font: 900 italic 14px Rubik, sans-serif; letter-spacing: .2em; color: #241a00; background: #ffd84d; padding: 4px 12px; border-radius: 999px; }
.rw-card h3 { margin: 10px 0 16px; font: 900 italic 34px Rubik, sans-serif; letter-spacing: .02em; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.rw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; max-height: 52vh; overflow-y: auto; padding: 4px; }
.rw-grid[data-n="1"] { grid-template-columns: minmax(0, 260px); justify-content: center; }
.rw-grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.rw-tile { --rc: #7cff6b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; padding: 12px 8px; border-radius: 16px;
  background: radial-gradient(100% 80% at 50% 0%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), rgba(0,0,0,.35); border: 2px solid color-mix(in srgb, var(--rc) 70%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 25%, transparent); animation: rwPop .5s cubic-bezier(.2,.9,.3,1.5) both; }
.rw-tile.r-common { --rc: #7cff6b; } .rw-tile.r-rare { --rc: #3f9bff; } .rw-tile.r-xpecial { --rc: #e46bff; } .rw-tile.r-cosmic { --rc: #b98cff; } .rw-tile.r-exclusive { --rc: #ffd84d; }
.rw-tile.coins { --rc: #7cff6b; } .rw-tile.gems { --rc: #ffd84d; } .rw-tile.xp { --rc: #3fd2ff; } .rw-tile.spin { --rc: var(--wc); }
.rw-tile canvas { position: relative; inset: auto; width: 100%; height: 90px; display: block; }
.rw-tile b { font: 900 italic 22px Rubik, sans-serif; color: #fff; line-height: 1.1; }
.rw-tile small { color: var(--muted); font-size: 12px; font-weight: 700; }
.rw-tile .coin-ico { width: 46px; height: 46px; } .rw-tile .coin-ico::after { font-size: 24px; }
.rw-tile .gem-ico { width: 40px; height: 40px; margin: 6px 0; }
.rw-tile em { font: 900 italic 34px Rubik, sans-serif; color: #3fd2ff; font-style: italic; }
.rw-tile .rs-wheel { width: 64px; height: 64px; }
.rw-tile.coins b { color: #7cff6b; } .rw-tile.gems b { color: #ffd84d; } .rw-tile.xp b { color: #3fd2ff; }
#rwOk { margin-top: 18px; min-width: 200px; }
@keyframes rwIn { from { transform: scale(.7) translateY(30px); opacity: 0; } }
@keyframes rwOut { to { transform: scale(.85); opacity: 0; } }
@keyframes rwPop { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---- Tienda: pestañas en una columna a la izquierda ---- */
.shop-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.shop-nav { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 10px; }
.snav { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 18px; cursor: pointer; text-align: left; font: inherit; color: var(--text);
  background: linear-gradient(160deg, rgba(24,38,30,.92), rgba(8,14,11,.94)); border: 1.5px solid rgba(var(--acc-rgb),.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.35); transition: transform .12s, border-color .12s, box-shadow .12s; }
.snav:hover { transform: translateX(4px); border-color: var(--accent); }
.snav.on { border-color: var(--accent); background: radial-gradient(120% 120% at 0% 0%, rgba(var(--acc-rgb),.28), transparent 60%), linear-gradient(160deg, rgba(28,50,36,.95), rgba(10,18,14,.95)); box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(var(--acc-rgb),.3); }
.sn-art { flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.sn-art svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(var(--acc-rgb),.4)); }
.sn-txt { display: flex; flex-direction: column; min-width: 0; }
.sn-txt b { font: 900 italic 18px Rubik, sans-serif; line-height: 1.1; }
.sn-txt small { color: var(--muted); font-size: 12px; font-weight: 700; }
.snav.gold { border-color: rgba(255,216,77,.5); background: radial-gradient(120% 120% at 100% 0%, rgba(255,216,77,.2), transparent 60%), linear-gradient(160deg, rgba(40,32,10,.95), rgba(14,11,4,.95)); }
.snav.gold .sn-txt b { color: #ffd84d; }
.snav.gold .sn-art svg { filter: drop-shadow(0 0 8px rgba(255,216,77,.6)); animation: snFloat 2.6s ease-in-out infinite; }
.snav.gold.on { border-color: #ffd84d; box-shadow: 0 0 0 1px #ffd84d, 0 0 26px rgba(255,216,77,.35); }
.snav.gold:hover { border-color: #ffd84d; }
.sn-tag { position: absolute; top: -8px; right: 10px; font: 900 10px Rubik, sans-serif; font-style: normal; letter-spacing: .1em; padding: 3px 8px; border-radius: 999px; background: #ff4d57; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.snav.club .sn-tag { background: #ffd84d; color: #241a00; }
@keyframes snFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.shop-pane { min-width: 0; }
.shop-pane .shop-top { justify-content: flex-end; margin-top: 0; }
.shop-pane .shop-top:empty { display: none; }
@media (max-width: 860px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .shop-nav { position: static; flex-direction: row; overflow-x: auto; padding: 8px 4px; }
  .snav { flex: 0 0 auto; width: auto; padding: 8px 12px; }
  .sn-art { width: 36px; height: 36px; } .sn-txt small { display: none; }
}
@media (max-height: 520px) { .sn-art { width: 32px; height: 32px; } .snav { padding: 6px 10px; } .sn-txt small { display: none; } .shop-layout { grid-template-columns: 170px minmax(0, 1fr); } }

/* ---- «+» junto a las gemas ---- */
.coins.gems { padding-right: 6px; }
.gem-plus { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  font: 900 18px/1 Rubik, sans-serif; color: #241a00; background: linear-gradient(135deg, #fff1a8, #ffc21f); box-shadow: 0 0 10px rgba(255,216,77,.5); transition: transform .12s; }
.gem-plus:hover { transform: scale(1.15); }

.shop-nav .shop-timer { justify-content: center; margin-top: 4px; width: 100%; box-sizing: border-box; }
#queue { z-index: 1000 !important; }
@media (max-width: 860px) { .shop-nav .shop-timer { flex: 0 0 auto; width: auto; margin: 0; } }

/* ---- Tienda: la cabecera y la columna se quedan quietas; lo de la derecha se desplaza por dentro y desaparece
   con un degradado bajo una línea alineada con la columna ---- */
#shop { overflow: hidden; align-items: flex-start; }
#shop > .wide-wrap { height: calc((100vh - 32px) / min(var(--ui, 1), 1.12)); margin: 0 auto; }
#shop .shop-layout { flex: 1; min-height: 0; align-items: stretch; }
#shop .shop-nav { position: static; overflow-y: auto; }
#shop .shop-pane { height: 100%; overflow-y: auto; padding: 18px 6px 24px; box-sizing: border-box; border-top: 2px solid rgba(var(--acc-rgb), .55);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 2px, rgba(0,0,0,0) 3px, #000 46px, #000 calc(100% - 34px), rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 2px, rgba(0,0,0,0) 3px, #000 46px, #000 calc(100% - 34px), rgba(0,0,0,0) 100%); }
#shop .shop-pane::-webkit-scrollbar { display: none; }
@media (max-width: 860px) {
  #shop .shop-layout { grid-template-rows: auto minmax(0, 1fr); }
  #shop .shop-nav { overflow-y: hidden; }
}
#shop .shop-pane { border-top: 0; -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0, #000 46px, #000 calc(100% - 34px), rgba(0,0,0,0) 100%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0, #000 46px, #000 calc(100% - 34px), rgba(0,0,0,0) 100%); }
#shop .shop-layout { position: relative; }
#shop .shop-layout::after { content: ''; position: absolute; left: 248px; right: 0; top: 0; height: 2px; pointer-events: none; border-radius: 2px;
  background: linear-gradient(90deg, rgba(var(--acc-rgb), 0), var(--accent) 12%, var(--accent) 88%, rgba(var(--acc-rgb), 0)); box-shadow: 0 0 12px rgba(var(--acc-rgb), .7); }
@media (max-width: 860px) { #shop .shop-layout::after { display: none; } }
@media (max-height: 520px) { #shop .shop-layout::after { left: 188px; } }
/* Tienda más ancha (la columna de pestañas ya ocupa sitio a la izquierda) */
#shop > .wide-wrap { width: min(1440px, 100%); }
#shop .shop-layout { grid-template-columns: 220px minmax(0, 1fr); }
#shop .shop-layout::after { left: 238px; }
#shop .shop-layout { grid-template-columns: 240px minmax(0, 1fr); }
#shop .shop-layout::after { left: 258px; }
.sn-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Club: lista del set del mes ---- */
.club-set { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.club-set-chip { font: 800 11px Rubik, sans-serif; letter-spacing: .03em; padding: 4px 9px; border-radius: 999px; background: rgba(255,216,77,.12); border: 1px solid rgba(255,216,77,.45); color: #ffd84d; white-space: nowrap; }

/* ---- Club: el set va pasando; los objetos se pueden tocar para verlos ---- */
#clubCanvas { cursor: zoom-in; }
.club-set-chip { cursor: pointer; font-family: inherit; transition: background .15s, color .15s, transform .15s; }
.club-set-chip:hover { transform: translateY(-1px); background: rgba(255,216,77,.22); }
.club-set-chip.on { background: #ffd84d; color: #241a00; box-shadow: 0 0 12px rgba(255,216,77,.5); }
#clubSlideName { color: #ffd84d; font-weight: 800; min-height: 1.2em; }

/* ---- Regalo del Pase Premium ---- */
.rw-tile.gift-crown .gift-svg { width: 92px; height: 92px; filter: drop-shadow(0 0 14px rgba(255,216,77,.7)); animation: snFloat 2.4s ease-in-out infinite; }

/* ---- Torneo con inscripción ---- */
.br-team.empty span { color: var(--muted); font-style: italic; font-weight: 500; }
.br-team.bot span::after { content: ' · IA'; color: var(--muted); font-size: 11px; font-weight: 700; }
.br-match.live { border-color: var(--accent); box-shadow: 0 0 14px rgba(var(--acc-rgb), .35); }
#tourJoin { z-index: 390; }
.tj-card { width: min(460px, 100%); text-align: center; padding: 24px 22px 20px; border: 2px solid var(--accent); }
.tj-card h3 { margin: 10px 0 6px; font: 900 italic 28px Rubik, sans-serif; }
.tj-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
#tjName { width: 100%; box-sizing: border-box; font: 800 22px Rubik, sans-serif; text-align: center; padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(var(--acc-rgb), .5); background: rgba(0,0,0,.35); color: #fff; outline: none; }
#tjName:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), .2); }
.tj-err { min-height: 18px; margin: 8px 0 4px; color: #ff6b78; font-size: 13px; font-weight: 700; }
.tj-btns { display: flex; gap: 10px; justify-content: center; }

/* ---- Cambiar contraseña ---- */
.pw-box { margin: 10px 0 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.2); text-align: left; }
.pw-box summary { cursor: pointer; font-weight: 800; color: var(--accent); }
.pw-box .names { margin-top: 10px; }
.pw-box .btn { margin-top: 6px; }

/* ---- Reportar y panel de admin ---- */
#reportBox { z-index: 395; }
.rp-card { width: min(460px, 100%); text-align: center; padding: 22px; border: 2px solid #ff6b78; }
.rp-card h3 { margin: 0 0 6px; font: 900 italic 24px Rubik, sans-serif; }
.rp-reasons { display: grid; gap: 8px; margin: 12px 0; }
.rp-reasons button { padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text); font: 700 14px Rubik, sans-serif; cursor: pointer; }
.rp-reasons button.on { border-color: #ff6b78; background: rgba(255,107,120,.15); color: #fff; }
#rpNote { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: #fff; font: 600 14px Rubik, sans-serif; margin-bottom: 12px; }
.chat-who { cursor: pointer; text-decoration: underline dotted; }
.admin-btn { display: block; text-align: center; text-decoration: none; margin-bottom: 8px; border-color: #ffd84d; color: #ffd84d; }

/* ---- Casilla legal y enlaces ---- */
.legal-chk { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 12.5px; line-height: 1.4; color: var(--muted); margin: 6px 0 2px; cursor: pointer; }
.legal-chk input { margin-top: 2px; accent-color: var(--accent); }
.legal-chk a, .legal-links a { color: var(--accent); }
.legal-links { text-align: center; font-size: 12.5px; color: var(--muted); margin: 18px 0 4px; }

/* ---- Instalar como app ---- */
.install-opt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; border: 1px solid rgba(var(--acc-rgb), .4); background: rgba(var(--acc-rgb), .07); }
.install-opt.hidden { display: none; }
.install-opt .note { margin: 0; flex: 1 1 260px; }

/* ---- Salas públicas ---- */
#modeGrid .mode-card.rooms { grid-column: span 6; min-height: 120px; background: linear-gradient(120deg, rgba(10,40,20,.95), rgba(6,14,10,.95)); }
.mode-card.rooms { --mc: var(--accent); }
.mode-card.rooms .mc-chip { background: rgba(var(--acc-rgb),.16); color: var(--accent); }
.mode-card.rooms .mc-chip::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ff4d57; box-shadow: 0 0 8px #ff4d57; animation: liveDot 1.2s infinite; vertical-align: 1px; }
@keyframes liveDot { 50% { opacity: .25; } }
@media (max-width: 760px) { #modeGrid .mode-card.rooms { grid-column: span 2; } }
.rooms-stats { justify-self: end; color: var(--muted); font-size: 14px; text-align: right; }
.rooms-stats b { color: var(--accent); font-size: 18px; }
.rooms-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.rooms-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.rooms-search:focus-within { border-color: rgba(var(--acc-rgb),.7); box-shadow: 0 0 14px rgba(var(--acc-rgb),.18); }
.rooms-search .ico { color: var(--muted); width: 18px; height: 18px; } .rooms-search .ico-svg { width: 18px; height: 18px; }
.rooms-search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: 600 16px Rubik, sans-serif; padding: 12px 0; }
.rooms-bar .btn .ico, .lob-tools .btn .ico { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; display: inline-block; } .rooms-bar .btn .ico-svg, .lob-tools .btn .ico-svg { width: 16px; height: 16px; }
.rooms-quick { border-color: rgba(255,216,77,.6); color: #ffd84d; }
.rooms-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rooms-filters .seg button { padding: 7px 11px; font-size: 13px; }
.rooms-chk { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.rooms-chk input { accent-color: var(--accent); width: 16px; height: 16px; }
#roomsRefresh { margin-left: auto; } #roomsRefresh.spin .ico-svg { animation: rSpin .6s linear; } @keyframes rSpin { to { transform: rotate(360deg); } }
.rooms-head, .room-row { display: grid; grid-template-columns: 28px minmax(160px, 2.4fr) 1.3fr 1fr 1fr 1.1fr 92px; gap: 10px; align-items: center; }
.rooms-head { padding: 0 14px 6px; color: var(--muted); font: 800 11px Rubik, sans-serif; letter-spacing: .12em; }
.rooms-list { display: flex; flex-direction: column; gap: 6px; }
.room-row { position: relative; padding: 11px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.room-row:hover { border-color: rgba(var(--acc-rgb),.55); background: rgba(16,30,22,.95); transform: translateX(3px); }
.room-row.full { opacity: .55; }
.room-row.open { border-color: var(--accent); box-shadow: 0 0 18px rgba(var(--acc-rgb),.15); }
.room-row .rr-lock { color: #ffd84d; display: grid; place-items: center; } .room-row .rr-lock .ico-svg { width: 16px; height: 16px; }
.room-row .rr-live { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); justify-self: center; }
.room-row .rr-live.play { background: #ff4d57; box-shadow: 0 0 8px #ff4d57; animation: liveDot 1.2s infinite; }
.rr-name { min-width: 0; } .rr-name b { display: block; font: 800 16px Rubik, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-name small { color: var(--muted); font-size: 12px; } .rr-name small i { font-style: normal; color: #ffd84d; }
.rr-mode { display: inline-flex; align-items: center; gap: 6px; font: 800 13px Rubik, sans-serif; color: var(--mc, var(--accent)); }
.rr-mode em { font-style: normal; padding: 2px 7px; border-radius: 7px; background: color-mix(in srgb, var(--mc, var(--accent)) 16%, transparent); }
.rr-mode small { color: var(--muted); font-weight: 600; }
.rr-map { color: var(--text); font-size: 14px; }
.rr-play { font: 800 14px Rubik, sans-serif; } .rr-play .r { color: #ff6b73; } .rr-play .b { color: #6fb0ff; } .rr-play small { color: var(--muted); font-weight: 600; margin-left: 6px; }
.rr-play.wait { color: var(--muted); font-weight: 600; font-size: 13px; }
.rr-n b { font: 900 15px Rubik, sans-serif; } .rr-n i { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); margin-top: 4px; overflow: hidden; }
.rr-n i u { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent)); border-radius: 3px; }
.room-row.full .rr-n i u { background: #ff4d57; }
.rr-go { padding: 8px 10px; font-size: 13px; }
.rr-more { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); cursor: default; }
.rr-more h5 { margin: 0 0 4px; font: 900 12px Rubik, sans-serif; letter-spacing: .1em; } .rr-more .r h5 { color: #ff6b73; } .rr-more .b h5 { color: #6fb0ff; } .rr-more .s h5 { color: var(--muted); }
.rr-more ul { list-style: none; margin: 0; padding: 0; font-size: 14px; } .rr-more li { padding: 2px 0; } .rr-more li.none { color: var(--muted); font-style: italic; }
.rr-more .rr-cfg { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.rooms-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 50px 20px; text-align: center; color: var(--muted); }
.rooms-empty > .ico { width: 54px; height: 54px; color: var(--accent); opacity: .7; } .rooms-empty > .ico .ico-svg { width: 54px; height: 54px; }
.rooms-empty b { color: var(--text); font: 900 italic 22px Rubik, sans-serif; }
@media (max-width: 860px) {
  .rooms-head { display: none; }
  .room-row { grid-template-columns: 20px 1fr auto; grid-template-areas: 'live name go' 'live mode n' 'live play n'; row-gap: 4px; }
  .room-row > :nth-child(1) { grid-area: live; } .room-row .rr-name { grid-area: name; } .room-row .rr-mode { grid-area: mode; } .room-row .rr-map { display: none; }
  .room-row .rr-play { grid-area: play; } .room-row .rr-n { grid-area: n; min-width: 70px; } .room-row .rr-go { grid-area: go; }
  .rr-more { grid-template-columns: 1fr 1fr; }
}
.room-new-card { width: min(820px, 100%); }
.rn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 8px 0 12px; }
.rn-field { display: flex; flex-direction: column; gap: 6px; } .rn-wide { grid-column: 1 / -1; }
.rn-field input { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: 700 16px Rubik, sans-serif; padding: 10px 12px; outline: 0; }
.rn-field input:focus { border-color: var(--accent); }
.rn-field .seg { flex-wrap: wrap; } .rn-field .seg button { padding: 7px 10px; font-size: 13px; }
.rn-field small { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
@media (max-width: 640px) { .rn-grid { grid-template-columns: 1fr; } }
.room-pass-card { width: min(440px, 100%); }
.room-pass-card h3 .ico { width: 18px; height: 18px; display: inline-block; vertical-align: -2px; color: #ffd84d; }
.lob-room { font: 900 italic 22px Rubik, sans-serif; color: var(--accent); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lob-room small { display: block; font: 600 normal 13px Rubik, sans-serif; color: var(--muted); }
.lob-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.lob-tools #lobLoop.on { border-color: var(--accent); color: var(--accent); }
.pause-team { margin: 4px 0; } .pause-team .seg button[data-team="red"].on { background: #ff4d57; color: #fff; } .pause-team .seg button[data-team="blue"].on { background: #3f8cff; color: #fff; }
.team-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 25; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 18px;
  background: rgba(6,12,9,.88); border: 1px solid rgba(var(--acc-rgb),.45); box-shadow: 0 10px 30px rgba(0,0,0,.5); backdrop-filter: blur(6px); }
.team-bar .tb-eye { display: flex; flex-direction: column; } .team-bar .tb-eye b { font: 900 italic 15px Rubik, sans-serif; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.team-bar .tb-eye .ico { width: 16px; height: 16px; display: inline-block; } .team-bar .tb-eye .ico-svg { width: 16px; height: 16px; } .team-bar .tb-eye b { display: block; } .team-bar .tb-eye small { color: var(--muted); font-size: 12px; }
.team-bar .tb-red { background: #ff4d57; border-color: #ff4d57; color: #fff; } .team-bar .tb-blue { background: #3f8cff; border-color: #3f8cff; color: #fff; }
@media (max-width: 640px) { .team-bar { bottom: 8px; padding: 8px; gap: 6px; } .team-bar .tb-eye small { display: none; } .team-bar .btn { padding: 8px 10px; font-size: 13px; } }
#chatLog li.sys { color: var(--muted); font-style: italic; }

/* ---- Ficha personalizada ---- */
.cskin-card { width: min(900px, 100%); }
.cs-body { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .cs-body { grid-template-columns: 1fr; } }
.cs-prev { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.cs-prev canvas { width: 320px; height: 180px; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #1b3a26, #08130c); border: 1px solid var(--line); }
.cs-prev small { color: var(--muted); font-size: 12px; }
.cs-presets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cs-presets button { padding: 6px 10px; font-size: 12px; }
.cs-opts { display: flex; flex-direction: column; gap: 6px; }
.cs-opts .opt-label { margin-top: 6px; }
.cs-sw { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cs-sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); cursor: pointer; padding: 0; transition: transform .12s; }
.cs-sw button:hover { transform: scale(1.12); }
.cs-sw button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.7); }
.cs-sw input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.cs-sw label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.cs-pats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cs-pats button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font: 700 11px Rubik, sans-serif; cursor: pointer; }
.cs-pats button.on { border-color: var(--accent); color: var(--accent); background: rgba(var(--acc-rgb),.1); }
.cs-pats canvas { width: 40px; height: 40px; }
@media (max-width: 520px) { .cs-pats { grid-template-columns: repeat(4, 1fr); } }
.cs-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
#detailDesign .ico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.cskin-card canvas { position: static; display: block; inset: auto; }

.detail-info.has-design #detailBtn { grid-row: 1; }
.detail-info #detailDesign { grid-row: 2; grid-column: 2; min-width: 200px; padding: 10px 18px; font-size: 15px; background: rgba(var(--acc-rgb),.08); border: 1px solid rgba(var(--acc-rgb),.6); color: var(--accent); }
.detail-info #detailDesign:hover { background: rgba(var(--acc-rgb),.18); }
.detail-info #detailDesign .ico-svg { width: 16px; height: 16px; }
.cs-opts .opt-label small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.cs-opts .seg { flex-wrap: wrap; } .cs-opts .seg button { padding: 7px 10px; font-size: 13px; }
.cs-rand { align-self: flex-start; margin-top: 8px; } .cs-rand .ico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.cs-pats { max-height: 260px; overflow-y: auto; padding-right: 4px; }

/* ---- Menú de la sala en pleno partido (Esc): jugadores por equipo y ajustes ---- */
.pause-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pause-room .pr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pause-room h3 { margin: 0; color: #fff; font-size: 18px; font-style: italic; letter-spacing: 0; text-transform: none; }
.pause-room .pr-head .btn { padding: 8px 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.pause-room .pr-head .btn .ico, .pause-room .pr-head .btn .ico-svg { width: 15px; height: 15px; }
.pause-room #prPause.on { border-color: var(--accent); color: var(--accent); }
.pr-teams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pr-teams .team-col { padding: 10px; min-height: 120px; }
.pr-teams .team-col h3 { font-size: 13px; margin: 0 0 6px; }
.pr-teams ul { min-height: 54px; }
.pr-teams li { font-size: 14px; padding: 5px 8px; }
.pr-teams .btn { padding: 7px 8px; font-size: 13px; width: 100%; }
.pr-teams .btn.on { opacity: .45; pointer-events: none; }
.pause-room .note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .pr-teams { grid-template-columns: 1fr; } }

/* ---- Rendimiento: el desenfoque de fondo (muy caro encima del partido animado) solo en calidad Ultra ---- */
html:not([data-q="ultra"]) .screen, html:not([data-q="ultra"]) .home-screen, html:not([data-q="ultra"]) .modal,
html:not([data-q="ultra"]) .team-bar, html:not([data-q="ultra"]) .resume-bar, html:not([data-q="ultra"]) .mode-card .mi,
html:not([data-q="ultra"]) .mode-card .mc-chip, html:not([data-q="ultra"]) .stats-panel { backdrop-filter: none !important; }
html:not([data-q="ultra"]) .screen { background: radial-gradient(ellipse at center, rgba(4,9,7,.55), rgba(4,9,7,.9)); }
html:not([data-q="ultra"]) .modal { background: rgba(3,6,5,.82); }
/* Baja: sin brillos animados ni sombras grandes (cada uno obliga a repintar). */
html[data-q="low"] .mode-card .mi .ico-svg, html[data-q="low"] .snav.gold .sn-art svg { filter: none; }
html[data-q="low"] .item.r-cosmic::before, html[data-q="low"] .item .rarity, html[data-q="low"] .clan-tool.lit, html[data-q="low"] .rec-dot { animation: none !important; }

/* ---- Versión (BETA) en el logo y aviso de versión nueva ---- */
.home-top .logo { position: relative; }
.ver-badge { position: absolute; top: -12px; right: -10px; z-index: 3; font: 900 normal 11px Rubik, sans-serif; letter-spacing: .14em; padding: 3px 7px; border-radius: 7px;
  color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 12px rgba(var(--acc-rgb),.55); transform: rotate(8deg); cursor: help; }
@media (max-width: 900px) { .ver-badge { font-size: 9px; padding: 2px 5px; right: -8px; top: -9px; } }
.upd-bar { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 16px;
  background: rgba(8,16,11,.96); border: 1px solid rgba(var(--acc-rgb),.6); box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 20px rgba(var(--acc-rgb),.2); }
.upd-bar > .ico { width: 22px; height: 22px; color: var(--accent); } .upd-bar > .ico .ico-svg { width: 22px; height: 22px; }
.upd-bar b { display: block; font: 800 15px Rubik, sans-serif; } .upd-bar small { color: var(--muted); font-size: 12px; }
.upd-bar .btn { padding: 8px 14px; }

/* BETA también en la pantalla de carga, en la esquina del logo. */
.ld-logo { position: relative; }
.ld-ver { position: absolute; top: .02em; right: -.42em; font: 900 normal clamp(13px, 2vw, 24px) Rubik, sans-serif; letter-spacing: .14em; padding: .2em .45em; border-radius: .4em;
  color: #0b1a08; background: #7cff6b; box-shadow: 0 0 18px rgba(124,255,107,.6); transform: rotate(8deg) scale(0); animation: ldVerIn .4s cubic-bezier(.3,1.6,.5,1) .55s forwards; }
@keyframes ldVerIn { to { transform: rotate(8deg) scale(1); } }

/* ---- iPhone/iPad y móviles con notch: el fondo llega a los bordes, pero botones y textos quedan dentro de la zona segura ---- */
:root { --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); }
html, body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body { position: fixed; inset: 0; }
.screen { padding: max(16px, var(--sat)) max(16px, var(--sar)) max(16px, var(--sab)) max(16px, var(--sal)); }
.home-screen { padding: max(22px, calc(var(--sat) + 8px)) max(28px, calc(var(--sar) + 12px)) max(22px, calc(var(--sab) + 6px)) max(28px, calc(var(--sal) + 12px)); }
#hud { box-sizing: content-box; padding-top: var(--sat); padding-left: max(16px, var(--sal)); padding-right: max(16px, var(--sar)); }
.modal { padding: max(16px, var(--sat)) max(16px, var(--sar)) max(16px, var(--sab)) max(16px, var(--sal)); }
.t-btns { right: var(--sar); bottom: var(--sab); left: var(--sal); top: var(--sat); }
.team-bar { bottom: max(18px, calc(var(--sab) + 8px)); }
.upd-bar { top: max(14px, calc(var(--sat) + 6px)); }
.side-btns.side-dock { margin-left: var(--sal); }
.chat { left: calc(14px + var(--sal)); bottom: calc(14px + var(--sab)); }

/* ---- Móvil en horizontal (poca altura): pase y tienda caben en la pantalla ---- */
@media (max-height: 520px) and (orientation: landscape) {
  .pcol .pass-tier { height: 120px; padding: 8px 6px 6px; gap: 2px; } .pcol .pass-tier canvas { max-height: 54px; }
  .pass-lv { width: 52px; height: 52px; } .pass-lv b { font-size: 22px; } .pass-lv small { font-size: 7px; }
  #pass .screen-head { margin-bottom: 6px; } .pass-wrap > .pt-rows { padding-top: 30px; }
  .pcol { gap: 6px; }
  .pass-top { padding: 8px 14px; gap: 12px; }
  .pass-buy { padding: 4px 10px; } .pass-buy #ppSub { display: none; } .pass-buy .btn { padding: 6px 12px; }
  .pass-top { padding: 6px 12px; } .pass-top .btn { padding: 8px 14px; }
  .pass-prem { margin-top: 10px; padding: 10px; }
  #shop .shop-nav { flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 0; }
  #shop .snav { width: 100%; flex: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  /* Inicio en el móvil: los botones de la izquierda algo más grandes (con la interfaz encogida se quedaban diminutos y cortaban el texto). */
  .side-btns.side-dock { grid-template-columns: repeat(2, 68px); grid-auto-rows: 64px; gap: 6px; }
  .side-dock .btn.tile { font-size: 8px; letter-spacing: 0; }
  .side-dock .tile .art-svg { max-height: 34px; }
}
