/* CryptoArcade — hoja única del shell. Escala de espacio 4/8/12/16/24/32/48/64.
   Superficies por cambio de fondo, no por bordes. Un acento (lima). Coral solo pérdidas. */

:root {
  --bg: #0B0E14;
  --surface: #131824;
  --surface-2: #1A2130;
  --line: #1F2736;
  --lime: #C6FF3D;
  --lime-dim: #9CCB2B;
  --lime-ink: #0B0E14;
  --coral: #FF4D6D;
  --text: #F2F4F8;
  --muted: #8A94A8;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --hdr-h: 60px;
  --tab-h: 60px;
  --wrap: 1200px;
  --r: 6px;
  --r-lg: 12px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.5 var(--sans);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.lime { color: var(--lime); }
.coral { color: var(--coral); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- tipografía ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
.h-big {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-variation-settings: 'wdth' 75;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
}
.h-sec {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-variation-settings: 'wdth' 82;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.h-sub { font-size: 1.05rem; font-weight: 800; }
p { margin: 0; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.small { font-size: 0.85rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.big-num { font-family: var(--mono); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.up { color: var(--lime); }
.down { color: var(--coral); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding: 24px 0 48px; min-height: 60dvh; }
.sec { padding: 32px 0 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-head a { color: var(--muted); font-size: 0.9rem; }
.sec-head a:hover { color: var(--text); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.split { display: grid; gap: 24px; grid-template-columns: 1fr; }
.split > *, .stack > *, .grid > * { min-width: 0; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
/* .split.wide lleva escenario de juego: la columna principal no baja de ~700 px o el
   panel de apuesta se encima. Debajo de 1120 px la barra lateral va abajo. */
@media (max-width: 1119px) { .split.wide { grid-template-columns: 1fr; } }
@media (min-width: 1120px) { .split.wide { grid-template-columns: minmax(0, 1fr) 420px; } }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel-2 { background: var(--surface-2); border-radius: var(--r); padding: 16px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.loading { display: grid; place-items: center; min-height: 40dvh; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--lime); animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.empty-big { padding: 48px 16px; text-align: center; background: var(--surface); border-radius: var(--r-lg); }
.empty-big .h-sec { margin-bottom: 8px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r); border: 0;
  background: var(--surface-2); color: var(--text); font-weight: 800; letter-spacing: 0.01em;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease, opacity 160ms ease;
  text-transform: uppercase; font-size: 0.9rem; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--lime); color: var(--lime-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) { background: #D7FF6E; }
  .btn:not(.btn-primary):not(.btn-ghost):hover:not(:disabled) { background: #222b3d; }
  .btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
}
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: transparent; color: var(--coral); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.8rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--lime); font-weight: 800; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- formularios ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r); border: 0;
  background: var(--surface-2); color: var(--text); outline-offset: 0;
  transition: box-shadow 160ms ease;
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--lime); }
.input.mono { font-family: var(--mono); }
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #6a7387; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
.help { font-size: 0.85rem; color: var(--muted); }
.form-err { color: var(--coral); font-size: 0.9rem; font-weight: 800; }
.form-ok { color: var(--lime); font-size: 0.9rem; font-weight: 800; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--lime); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 4px; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; transition: background-color 160ms ease, color 160ms ease; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg.seg-block { display: flex; } .seg.seg-block button { flex: 1; }
.file {
  display: grid; place-items: center; text-align: center; gap: 4px; padding: 24px; border-radius: var(--r);
  background: var(--surface-2); cursor: pointer; transition: background-color 160ms ease;
}
.file:hover, .file:focus-within { background: #222b3d; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file b { font-weight: 800; } .file span { color: var(--muted); font-size: 0.85rem; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); font-weight: 800;
  padding: 10px 12px; border-radius: var(--r); text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.04em;
  transition: color 160ms ease, background-color 160ms ease; min-height: 40px;
}
.tabs button[aria-selected="true"] { color: var(--bg); background: var(--lime); }
.tabs.tabs-quiet button[aria-selected="true"] { color: var(--text); background: var(--surface-2); }

/* ---------- tablas / leaderboard ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; padding: 8px 10px; }
.table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; }
.lb { display: grid; gap: 2px; }
.lb-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); }
.lb-row.is-me { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--lime); }
.lb-rank { font-family: var(--mono); color: var(--muted); font-size: 0.95rem; }
.lb-row:nth-child(1) .lb-rank, .lb-row:nth-child(2) .lb-rank, .lb-row:nth-child(3) .lb-rank { color: var(--text); font-weight: 500; }
.lb-row:nth-child(1) .lb-rank { color: var(--lime); }
.lb-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-val { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-val small { color: var(--muted); font-size: 0.8rem; margin-left: 4px; }
.lb-sub { color: var(--muted); font-size: 0.8rem; display: block; }

/* ---------- avatar / thumb ---------- */
.avatar { --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--surface-2); flex: 0 0 auto; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-missing::after { content: attr(data-initial); font-weight: 800; font-size: calc(var(--s) * 0.45); color: var(--text); }
.avatar.is-selected { box-shadow: 0 0 0 3px var(--lime); }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); border-radius: var(--r); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-missing::after { content: attr(data-title); position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 800; font-variation-settings: 'wdth' 75; text-transform: uppercase; font-size: 1.4rem; line-height: 1; color: var(--muted); background: linear-gradient(160deg, #1A2130, #0F131C); }
.thumb.thumb-wide { aspect-ratio: 16 / 9; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(11, 14, 20, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hdr-in { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; height: var(--hdr-h); display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; flex: 0 0 auto; }
.logo img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.logo.is-missing img { display: none; }
.logo-txt b { color: var(--lime); font-weight: 800; }
.nav { display: none; gap: 4px; margin-left: 8px; min-width: 0; overflow: hidden; }
.nav-a { padding: 8px 12px; border-radius: var(--r); color: var(--muted); font-weight: 800; font-size: 0.9rem; transition: color 160ms ease, background-color 160ms ease; }
.nav-a:hover { color: var(--text); }
.nav-a.is-active { color: var(--text); background: var(--surface); }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bal { display: inline-flex; align-items: center; background: var(--surface); border-radius: var(--r); height: 38px; padding-left: 4px; }
.bal-cur { border: 0; background: var(--surface-2); color: var(--muted); border-radius: 4px; height: 30px; padding: 0 10px; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.06em; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.bal-cur:active { transform: scale(0.96); }
.bal-cur[data-cur="SOL"] { color: var(--text); }
.bal-n { padding: 0 12px 0 10px; font-size: 0.95rem; font-weight: 500; }
.lang { border: 0; background: transparent; color: var(--muted); font-weight: 800; height: 38px; padding: 0 8px; border-radius: var(--r); font-size: 0.85rem; letter-spacing: 0.06em; transition: color 160ms ease; }
.lang:hover { color: var(--text); }
.hdr-me { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border-radius: 999px; transition: background-color 160ms ease; }
.hdr-me:hover { background: var(--surface); }
.hdr-name { font-weight: 800; font-size: 0.9rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.hdr-connect { display: inline-flex; }  /* visible en todo ancho: es la accion principal del sitio */
.clock { color: var(--muted); font-size: 0.8rem; padding: 0 6px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--lime); color: var(--bg); border: 0; padding: 10px 14px; border-radius: var(--r); font-weight: 800; }
.skip:focus-visible { top: 8px; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .bal-n { font-size: 1.05rem; }
}
@media (min-width: 1100px) { .hdr-name { display: inline-flex; } }
/* Entre 900 y 1100 px la nav se aprieta para que quepan reloj, saldo y CTA sin recortarse. */
@media (min-width: 900px) and (max-width: 1099px) {
  .hdr-in { gap: 10px; }
  .nav-a { padding: 8px 10px; font-size: 0.85rem; }
  .hdr-connect { padding: 0 14px; font-size: 0.78rem; }
}
/* El wordmark es lo primero que se sacrifica cuando el header se aprieta: queda la marca. */
@media (max-width: 1099px) { .logo-txt { display: none; } }

/* ---------- ticker ---------- */
.ticker { display: flex; align-items: center; height: 34px; background: var(--surface); overflow: hidden; font-size: 0.82rem; }
.tk-live { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; height: 100%; background: var(--surface); position: relative; z-index: 2; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; color: var(--muted); }
.tk-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse 1.6s ease-in-out infinite; }
.tk-live #online { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
@keyframes pulse { 50% { opacity: 0.35; } }
.tk-track { flex: 1; display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tk-row { display: flex; gap: 32px; padding-right: 32px; flex: 0 0 auto; animation: marquee 40s linear infinite; white-space: nowrap; align-items: center; }
.tk-track:hover .tk-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
.tk-item { display: inline-flex; align-items: center; gap: 6px; }
.tk-m { color: var(--text); } .tk-g { color: var(--muted); } .tk-p { color: var(--lime); }
@media (prefers-reduced-motion: reduce) { .tk-row { animation: none; } .tk-row[aria-hidden] { display: none; } .tk-live i { animation: none; } }

/* ---------- tabbar (móvil) ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(19, 24, 36, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tab-a { display: grid; place-items: center; gap: 2px; color: var(--muted); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; transition: color 160ms ease; }
.tab-a .ico { width: 22px; height: 22px; }
.tab-a.is-active { color: var(--lime); }
.tab-a:active { transform: scale(0.96); }
body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }

/* ---------- footer ---------- */
.ftr { background: var(--surface); margin-top: 24px; }
.ftr-in { max-width: var(--wrap); margin: 0 auto; padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.85rem; }
.ftr-l { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.age { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--muted); font-weight: 800; font-size: 0.75rem; letter-spacing: -0.02em; color: var(--text); }
.ftr-dev { color: var(--text); }
.ftr-r { display: flex; gap: 20px; }
.ftr-r a:hover { color: var(--text); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast { pointer-events: auto; background: var(--surface-2); color: var(--text); padding: 12px 16px; border-radius: var(--r); font-weight: 800; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); opacity: 1; transform: translateY(0); transition: opacity 200ms ease, transform 200ms var(--ease-out); box-shadow: inset 3px 0 0 var(--muted), 0 10px 30px rgba(0,0,0,.45); }
.toast-ok { box-shadow: inset 3px 0 0 var(--lime), 0 10px 30px rgba(0,0,0,.45); }
.toast-err { box-shadow: inset 3px 0 0 var(--coral), 0 10px 30px rgba(0,0,0,.45); }
.toast[data-leaving] { opacity: 0; transform: translateY(8px); }
@starting-style { .toast { opacity: 0; transform: translateY(12px); } }

/* ---------- confetti ---------- */
.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; }

/* ---------- lobby ---------- */
.hero { display: grid; gap: 24px; padding: 8px 0 0; align-items: center; }
.hero-txt { display: grid; gap: 20px; }
.hero .h-big { max-width: 12ch; }
.hero-art { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art.is-missing { background: radial-gradient(60% 60% at 70% 40%, #1A2130, #0B0E14); }
.hero-art.is-missing::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, var(--lime) 0 4px, transparent 5px), radial-gradient(circle at 70% 60%, var(--text) 0 3px, transparent 4px), radial-gradient(circle at 45% 75%, var(--lime) 0 2px, transparent 3px); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-meta { display: flex; gap: 24px; color: var(--muted); font-size: 0.9rem; }
.hero-meta b { color: var(--text); font-family: var(--mono); font-weight: 500; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr 1fr; padding-top: 24px; } .hero-art { aspect-ratio: 4 / 3; } }

.carts { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .carts { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.cart { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); transition: transform 200ms var(--ease-out); isolation: isolate; }
.cart:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .cart:hover { transform: translateY(-4px); } .cart:hover .cart-img img { transform: scale(1.04); } }
.cart-img { position: absolute; inset: 0; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.cart-img.is-missing { background: linear-gradient(160deg, #1A2130, #0F131C); }
.cart-img.is-missing::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, rgba(198,255,61,0.18), transparent 45%); }
.cart::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,14,20,0) 35%, rgba(11,14,20,0.55) 65%, rgba(11,14,20,0.95) 100%); }
.cart-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; z-index: 1; display: grid; gap: 4px; }
.cart-title { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; text-transform: uppercase; font-variation-settings: 'wdth' 72; letter-spacing: -0.01em; line-height: 0.95; }
.cart-tag { color: var(--muted); font-size: 0.8rem; }
.cart-rec { display: flex; align-items: baseline; gap: 6px; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.cart-rec b { font-family: var(--mono); color: var(--lime); font-weight: 500; font-size: 0.95rem; }
.cart-play { position: absolute; top: 12px; right: 12px; z-index: 1; background: var(--lime); color: var(--bg); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(0.9); transition: opacity 160ms ease, transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cart:hover .cart-play { opacity: 1; transform: scale(1); } }
.cart-play svg { width: 16px; height: 16px; }

.daily { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: inset 4px 0 0 var(--lime); }
.daily-txt b { display: block; font-size: 1.2rem; font-weight: 800; }
.daily-txt span { color: var(--muted); }
@media (min-width: 640px) { .daily { grid-template-columns: 1fr auto; } }

.cgames { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .cgames { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cgames { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.cg { display: grid; gap: 8px; border-radius: var(--r-lg); transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cg:hover { transform: translateY(-3px); } }
.cg:active { transform: scale(0.98); }
.cg .thumb { border-radius: var(--r-lg); }
.cg-title { font-weight: 800; font-size: 1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-meta { display: flex; gap: 10px; color: var(--muted); font-size: 0.8rem; align-items: center; }
.cg-meta .tok { color: var(--text); font-family: var(--mono); font-weight: 500; }

.records { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .records { grid-template-columns: repeat(4, 1fr); } }
.rec { background: var(--surface); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 8px; }
.rec-g { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.rec-v { font-family: var(--mono); font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; color: var(--lime); line-height: 1; }
.rec-m { color: var(--muted); font-size: 0.8rem; }
.rec-u { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }

/* entrada de la home: un solo momento autoral */
@media (prefers-reduced-motion: no-preference) {
  .view-lobby .cart, .view-lobby .hero-txt > *, .view-lobby .hero-art { animation: rise 500ms var(--ease-out) both; }
  .view-lobby .hero-txt > :nth-child(2) { animation-delay: 60ms; }
  .view-lobby .hero-txt > :nth-child(3) { animation-delay: 120ms; }
  .view-lobby .hero-art { animation-delay: 100ms; }
  .view-lobby .cart:nth-child(1) { animation-delay: 160ms; }
  .view-lobby .cart:nth-child(2) { animation-delay: 220ms; }
  .view-lobby .cart:nth-child(3) { animation-delay: 280ms; }
  .view-lobby .cart:nth-child(4) { animation-delay: 340ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- vista de juego ---------- */
.game-stage { background: var(--surface); border-radius: var(--r-lg); min-height: 420px; position: relative; overflow: hidden; }
.game-soon { display: grid; place-items: center; gap: 12px; min-height: 420px; text-align: center; padding: 32px; }
.game-side { display: grid; gap: 16px; }
.bets-recent { display: grid; gap: 2px; }
.bet-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 12px; background: var(--surface); border-radius: var(--r); font-size: 0.9rem; }
.bet-row .lb-user b { max-width: 120px; }

/* ---------- play (juego de creador) ---------- */
.play-frame { width: 100%; min-height: 480px; height: min(72dvh, 760px); border: 0; display: block; background: #000; border-radius: var(--r-lg); }
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.play-result { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.play-result .kv { background: var(--surface-2); border-radius: var(--r); padding: 12px; }
.kv { display: grid; gap: 2px; }
.kv small { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.kv b { font-family: var(--mono); font-size: 1.3rem; font-weight: 500; }
.kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.owner { display: flex; align-items: center; gap: 10px; }
.token-card { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: var(--r); padding: 12px; }
.token-card img { width: 36px; height: 36px; border-radius: 50%; }
.token-card .mono { font-weight: 500; }
.token-logo-fallback { width: 36px; height: 36px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 800; }

/* ---------- estado (texto, no pastillas) ---------- */
.status { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.status-pending { color: var(--muted); }
.status-approved, .status-verified, .status-open, .status-paid { color: var(--lime); }
.status-rejected, .status-cancelled { color: var(--coral); }
.status-settled { color: var(--text); }

/* ---------- listas genéricas ---------- */
.list { display: grid; gap: 8px; }
.item { display: grid; gap: 12px; grid-template-columns: 1fr; background: var(--surface); border-radius: var(--r-lg); padding: 16px; }
@media (min-width: 640px) { .item { grid-template-columns: 1fr auto; align-items: center; } }
.item-t { font-weight: 800; font-size: 1.05rem; }
.item-m { color: var(--muted); font-size: 0.85rem; display: flex; gap: 12px; flex-wrap: wrap; }
.item-a { display: flex; gap: 8px; flex-wrap: wrap; }
.item.with-thumb { grid-template-columns: 72px 1fr; }
@media (min-width: 640px) { .item.with-thumb { grid-template-columns: 72px 1fr auto; } }
.item .thumb { width: 72px; }

/* ---------- code / hashes ---------- */
.code { font-family: var(--mono); font-size: 0.8rem; background: var(--bg); border-radius: var(--r); padding: 12px; overflow-x: auto; white-space: pre; line-height: 1.5; margin: 0; }
.hash { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; color: var(--text); }
.copy-row { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: var(--r); padding: 8px 8px 8px 12px; }
.copy-row .hash { flex: 1; }
.steps { display: grid; gap: 12px; counter-reset: s; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.step::before { counter-increment: s; content: counter(s); font-family: var(--mono); font-size: 1.6rem; color: var(--lime); line-height: 1; }
.step b { display: block; margin-bottom: 4px; }
.step p { color: var(--muted); }

/* ---------- xp ---------- */
.xp { display: grid; gap: 6px; }
.xp-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: var(--lime); border-radius: 4px; transition: width 400ms var(--ease-out); }
.xp-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.avatars button { border: 0; background: transparent; padding: 4px; border-radius: 50%; display: grid; place-items: center; }
.avatars .avatar { --s: 56px; }

/* ---------- swap ---------- */
.jup-box { min-height: 560px; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; position: relative; }
#jupiter-plugin { min-height: 560px; }
/* ---------- diálogo de confirmación (_ui.js confirm) ---------- */
.dlg { background: var(--surface-2); color: var(--text); border: 0; border-radius: var(--r-lg); padding: 24px; width: min(440px, calc(100% - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.dlg::backdrop { background: rgba(11, 14, 20, 0.72); }
.dlg-msg { margin: 0; font-size: 1.05rem; line-height: 1.45; text-wrap: pretty; }
@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: dlg-in 180ms var(--ease-out); }
  @keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
}
.tour-detail { padding-top: 4px; }

.notice { background: var(--surface); border-radius: var(--r-lg); padding: 16px 20px; box-shadow: inset 4px 0 0 var(--muted); }
.notice.notice-warn { box-shadow: inset 4px 0 0 var(--coral); }
.notice.notice-ok { box-shadow: inset 4px 0 0 var(--lime); }
.notice b { display: block; margin-bottom: 4px; }

/* ---------- legal / texto largo ---------- */
.prose { max-width: 72ch; display: grid; gap: 12px; }
.prose h2 { font-size: 1.25rem; margin-top: 16px; }
.prose p, .prose li { color: #C4CAD6; }
.prose ul { margin: 0; padding-left: 20px; }

/* ---------- qr ---------- */
.qr { width: 168px; height: 168px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: var(--r); }

/* ---------- admin ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--surface); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 4px; }
.stat small { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.stat b { font-family: var(--mono); font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; }

/* ---------- skeleton ---------- */
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r); min-height: 44px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } .spin { animation: spin 0.6s linear infinite !important; animation-duration: 0.6s !important; } }

/* El boton de conectar se achica en pantallas chicas, pero nunca por debajo del area
   tocable de 44px de alto que necesita un dedo. */
@media (max-width: 899px) {
  .hdr-connect { padding: 0 10px; font-size: 0.72rem; min-height: 34px; }
}
@media (max-width: 419px) {
  .hdr-connect { padding: 0 8px; font-size: 0.68rem; }
  .hdr-connect .long { display: none; }
}

/* ---------- introducción (primera visita) ---------- */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(6, 8, 13, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .18s ease; }
.intro.abierta { opacity: 1; }
.intro-caja { position: relative; width: min(520px, 100%); max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 24px 60px rgba(0,0,0,.6);
  transform: translateY(8px); transition: transform .18s ease; }
.intro.abierta .intro-caja { transform: none; }
.intro-saltar { position: absolute; top: 10px; right: 10px; z-index: 2; border: 0; cursor: pointer;
  background: rgba(11,14,20,.7); color: var(--muted); font: inherit; font-size: .78rem;
  padding: 7px 12px; border-radius: 999px; }
.intro-saltar:hover { color: var(--text); }
.intro-arte { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg); }
.intro-arte img { width: 100%; height: 100%; object-fit: cover; display: block; }
.intro-txt { padding: 22px 24px 4px; }
.intro-paso { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.intro-t { font-family: var(--sans); font-weight: 800; font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.05; margin: 0 0 10px; letter-spacing: -0.02em; }
.intro-b { color: var(--muted); margin: 0; line-height: 1.55; }
.intro-pie { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 24px; flex-wrap: wrap; }
.intro-puntos { display: flex; gap: 7px; }
.intro-punto { width: 7px; height: 7px; border-radius: 999px; background: var(--line); transition: background .15s, width .15s; }
.intro-punto.on { background: var(--lime); width: 20px; }
.intro-btns { display: flex; gap: 8px; margin-left: auto; }
@media (prefers-reduced-motion: reduce) {
  .intro, .intro-caja, .intro-punto { transition: none; }
}

.ftr-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.ftr-link:hover { color: var(--text); }
