/* FantasyFem · estilos (móvil primero) */
:root {
  --bg: #12082A;
  --bg2: #1A0B33;
  --card: #241243;
  --card2: #2E1856;
  --line: #3B2468;
  --text: #F6F1FF;
  --muted: #B6A6D6;
  --lime: #C6F432;
  --lime-ink: #1A2600;
  --coral: #FF6B5B;
  --pink: #FF4FA3;
  --gold: #FFC93C;
  --sky: #4CC9F0;
  --good: #3DDC84;
  --bad: #FF5C7A;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Bricolage Grotesque', var(--font);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.4;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(255, 79, 163, .22), transparent 60%),
    radial-gradient(700px 400px at -20% 20%, rgba(198, 244, 50, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 600; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* barra superior */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(18, 8, 42, .97), rgba(18, 8, 42, .85));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.top .logo { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 20px; text-decoration: none; }
.top .logo img { width: 30px; height: 30px; border-radius: 9px; }
.top .logo b { color: var(--lime); }
.top .back { border: 0; background: var(--card); width: 36px; height: 36px; border-radius: 12px; font-size: 18px; cursor: pointer; }
.top .title { font-family: var(--display); font-weight: 800; font-size: 18px; }
.syncpill { margin-left: auto; font-size: 11px; padding: 4px 9px; border-radius: 99px; background: var(--card); color: var(--muted); white-space: nowrap; }
.syncpill.live { background: rgba(255, 92, 122, .18); color: #FFB3C1; }
.syncpill.error { background: rgba(255, 92, 122, .3); color: #fff; }

main { padding: 14px 16px 24px; max-width: 640px; margin: 0 auto; }
.boot { display: grid; place-items: center; gap: 12px; padding: 80px 0; color: var(--muted); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--lime); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* barra de pestañas inferior */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-around;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(26, 11, 51, .96); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.tabbar:empty { display: none; }
.tabbar a {
  flex: 1; max-width: 110px; text-decoration: none; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 6px 2px; border-radius: 12px; display: grid; gap: 2px; justify-items: center;
}
.tabbar a .ic { font-size: 20px; line-height: 1; }
.tabbar a.on { color: var(--lime); background: rgba(198, 244, 50, .08); }

/* tarjetas */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; border: 1px solid rgba(255, 255, 255, .05); }
.card.tight { padding: 12px; }
.card.link { display: block; text-decoration: none; cursor: pointer; transition: transform .1s; }
.card.link:active { transform: scale(.985); }
.card.glow { background: linear-gradient(135deg, #3A1670, #241243 60%); border-color: rgba(198, 244, 50, .25); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 10px; }
.section-title h2 { font-size: 18px; }

/* botones */
.btn {
  border: 0; cursor: pointer; border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 15px;
  background: var(--card2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, filter .15s; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--lime); color: var(--lime-ink); box-shadow: 0 6px 18px rgba(198, 244, 50, .25); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { background: rgba(255, 92, 122, .16); color: #FF9DB0; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn.xs { padding: 5px 9px; font-size: 12px; border-radius: 9px; }
.btns { display: flex; gap: 10px; }
.btns > * { flex: 1; }

/* formularios */
label.f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--lime); }
input.code { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; font-size: 22px; text-align: center; font-family: var(--display); }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.colors button.on { border-color: #fff; }
.err { color: #FFB3C1; font-size: 13px; min-height: 18px; }

/* chips / pestañas internas */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  border-radius: 99px; padding: 7px 13px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg { display: flex; background: var(--bg2); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 14px; position: sticky; top: 62px; z-index: 10; }
.seg a { flex: 1; text-align: center; padding: 9px 4px; border-radius: 11px; text-decoration: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg a.on { background: var(--card2); color: var(--text); }

/* escudo de color (nunca logos reales) */
.crest {
  --c: #888; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c) 70%, white), var(--c) 60%);
  display: grid; place-items: center; font-weight: 800; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.crest.sm { width: 24px; height: 24px; font-size: 9px; }
.crest.lg { width: 52px; height: 52px; font-size: 15px; }
.avatar { --c: #888; flex: none; width: 34px; height: 34px; border-radius: 12px; background: var(--c); color: #1A0B33; display: grid; place-items: center; font-weight: 800; font-family: var(--display); }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 22px; }
.avatar.sm { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; }

/* posiciones */
.pos { flex: none; font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 6px; letter-spacing: .04em; }
.pos.POR { background: #FFC93C; color: #3A2A00; }
.pos.DEF { background: #4CC9F0; color: #022B3A; }
.pos.MED { background: #3DDC84; color: #003B1B; }
.pos.DEL { background: #FF6B5B; color: #3A0700; }

/* listas */
.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border-radius: 14px; }
.item.me { box-shadow: inset 0 0 0 2px var(--lime); }
.item .pts { font-family: var(--display); font-weight: 800; font-size: 18px; min-width: 36px; text-align: right; }
.pts.neg { color: var(--bad); }
.item button.mini { margin-left: auto; }

/* partidos */
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.match .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match .side.away { flex-direction: row-reverse; text-align: right; }
.match .score { font-family: var(--display); font-weight: 800; font-size: 22px; text-align: center; min-width: 64px; }
.match .when { font-size: 12px; color: var(--muted); text-align: center; }
.livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 5px; animation: pulse 1.2s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 92, 122, .7); } 70% { box-shadow: 0 0 0 8px rgba(255, 92, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 122, 0); } }
.minute { color: #FFB3C1; font-weight: 700; font-size: 12px; }
.events { display: grid; gap: 4px; margin-top: 10px; font-size: 13px; }
.events .ev { display: flex; gap: 8px; align-items: center; }
.events .ev.away { flex-direction: row-reverse; text-align: right; }
.card-y, .card-r { display: inline-block; width: 9px; height: 12px; border-radius: 2px; background: #FFD43B; }
.card-r { background: #FF3B3B; }

/* retos */
.retos { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 10px; }
.reto .q { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.reto .opts { display: flex; gap: 6px; margin-top: 6px; }
.reto .opts button { flex: 1; border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; padding: 8px 4px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--text); }
.reto .opts button.on { background: var(--sky); color: #022B3A; border-color: var(--sky); }
.reto .opts button.ok { background: var(--good); color: #003B1B; border-color: var(--good); }
.reto .opts button.ko { background: rgba(255, 92, 122, .25); border-color: var(--bad); }
.reto .opts button:disabled { cursor: default; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.tag.open { background: rgba(198, 244, 50, .15); color: var(--lime); }
.tag.hot { background: rgba(255, 92, 122, .2); color: #FFB3C1; }

/* draft */
.draft-head { text-align: center; padding: 12px 16px; border-radius: var(--radius); background: var(--card); position: sticky; top: 64px; z-index: 12; overflow: hidden; box-shadow: var(--shadow); }
.draft-head.mine { background: linear-gradient(135deg, #C6F432, #8EDB2B); color: var(--lime-ink); }
.draft-head .big { font-family: var(--display); font-weight: 800; font-size: 24px; }
.draft-head .hrow { display: flex; align-items: center; gap: 12px; text-align: left; }
.draft-head .hrow .ring { margin: 0; flex: none; }
.ring { width: 64px; height: 64px; margin: 8px auto 0; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.slots .s { background: var(--bg2); border-radius: 10px; padding: 6px; text-align: center; font-size: 11px; }
.slots .s b { display: block; font-size: 16px; font-family: var(--display); }
.feed { display: grid; gap: 6px; max-height: 180px; overflow: auto; }
.feed .f { font-size: 13px; display: flex; gap: 8px; align-items: center; }

/* campo */
.pitch {
  border-radius: 22px; padding: 14px 8px; display: grid; gap: 12px;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 44px, transparent 44px 88px),
    radial-gradient(circle at 50% 50%, transparent 54px, rgba(255, 255, 255, .12) 55px, transparent 57px),
    linear-gradient(180deg, #3A1A7A, #281157);
  border: 1px solid rgba(255, 255, 255, .08);
}
.line { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pl {
  width: 70px; border: 0; background: rgba(18, 8, 42, .75); border-radius: 14px; padding: 8px 4px 6px; cursor: pointer;
  display: grid; justify-items: center; gap: 3px; position: relative; color: var(--text); font-size: 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.pl .nm { font-weight: 700; font-size: 11px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .pp { font-family: var(--display); font-weight: 800; font-size: 15px; }
.pl.sel { box-shadow: 0 0 0 3px var(--lime); }
.pl.cap::after { content: 'C'; position: absolute; top: -6px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #3A2A00; font-weight: 900; font-size: 11px; display: grid; place-items: center; }
.pl.live .pp { color: #FFB3C1; }
.pl.nomatch { opacity: .6; }
.bench { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.bench .pl { background: var(--card); flex: none; }

/* versus */
.vs {
  --a: #C6F432; --b: #FF4FA3;
  border-radius: 22px; overflow: hidden; position: relative; padding: 18px 16px 16px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--a) 55%, #1A0B33) 0 50%, color-mix(in srgb, var(--b) 55%, #1A0B33) 50% 100%);
  color: #fff; box-shadow: var(--shadow);
}
.vs .cols { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.vs .who { display: grid; justify-items: center; gap: 6px; text-align: center; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.vs .n { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.vs .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.vs .badge { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #3A2A00; display: grid; place-items: center; font-family: var(--display); font-weight: 900; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.vs .sub { font-size: 12px; opacity: .9; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 6px; }
table.t td { padding: 9px 6px; border-top: 1px solid rgba(255, 255, 255, .06); }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.me td { color: var(--lime); font-weight: 700; }
.medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 800; background: var(--card2); }
.medal.m1 { background: #FFC93C; color: #3A2A00; }
.medal.m2 { background: #D9DEE8; color: #2B2F38; }
.medal.m3 { background: #E29A5B; color: #3A1C00; }

/* bloque de puntos */
.bigpts { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--bg2); border-radius: 14px; padding: 10px; text-align: center; }
.kpi b { display: block; font-family: var(--display); font-size: 20px; white-space: nowrap; }
.kpi span { font-size: 11px; color: var(--muted); }

/* hoja inferior */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet .panel { width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; background: var(--bg2); border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.breakdown { display: grid; gap: 4px; font-size: 13px; }
.breakdown div { display: flex; justify-content: space-between; }

/* aviso flotante */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: 90vw; text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%); }

/* inicio / login */
.hero { text-align: center; padding: 30px 0 10px; }
.hero img { width: 92px; height: 92px; border-radius: 26px; box-shadow: var(--shadow); }
.hero h1 { font-size: 34px; margin-top: 14px; }
.hero h1 b { color: var(--lime); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(198, 244, 50, .14); color: var(--lime); }
.demo-banner { background: rgba(255, 201, 60, .14); color: #FFE29A; border-radius: 14px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.legal { font-size: 11px; color: var(--muted); text-align: center; margin-top: 26px; }
.strip { display: flex; align-items: center; gap: 10px; }
.admin-table input { padding: 6px; font-size: 13px; border-radius: 8px; text-align: center; }
.admin-table td { padding: 4px 3px; }
.kbd { font-family: ui-monospace, monospace; background: var(--bg2); padding: 2px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }

/* avatares dibujados */
.avatar.av { padding: 0; overflow: hidden; background: var(--c); }
.avatar.av svg { width: 100%; height: 100%; display: block; }
.avatar.xl { width: 92px; height: 92px; border-radius: 26px; flex: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 0 4px rgba(255, 255, 255, .9); }
.av-edit { display: grid; gap: 14px; }
.av-edit .lab { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); cursor: pointer; }
.swatches button.on { border-color: #fff; transform: scale(1.08); }
.opts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opts-grid button { border: 2px solid var(--line); background: var(--bg2); border-radius: 14px; padding: 4px 4px 6px; cursor: pointer; color: var(--text); font-size: 11px; font-weight: 600; display: grid; justify-items: center; gap: 2px; }
.opts-grid button.on { border-color: var(--lime); background: rgba(198, 244, 50, .08); }
.opts-grid .mini { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; }
.opts-grid .mini svg { width: 100%; height: 100%; display: block; }
.av-hero { display: flex; align-items: center; gap: 14px; padding: 12px 4px 14px; position: sticky; top: 62px; z-index: 5; background: linear-gradient(180deg, var(--bg) 82%, transparent); }
.av-hero .grow { min-width: 0; }
.swcustom { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; position: relative; border: 3px solid rgba(255, 255, 255, .12);
  background: conic-gradient(#ff4f4f, #ffd23f, #3ddc84, #4cc9f0, #b28dff, #ff4fa3, #ff4f4f); display: inline-block; }
.swcustom.on { border-color: #fff; background: var(--cc); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .15); }
.swcustom::after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.swcustom.on::after { content: '✎'; font-size: 13px; }
.swcustom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.fav { border-color: color-mix(in srgb, var(--lime) 50%, transparent) !important; }

.match .side .tname { font-size: 14px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: manual; }

/* ---------- fichajes y fichas de jugadora ---------- */
.slots button.s { border: 0; color: inherit; font: inherit; font-size: 11px; cursor: pointer; }
.slots .s.need { box-shadow: inset 0 0 0 1px rgba(255, 201, 60, .5); }
.chip.sm { padding: 6px 10px; font-size: 12px; }
select.chip { color: var(--text); width: auto; padding: 7px 10px; background: var(--card); }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 12px; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; color: var(--text); font: inherit; outline: none; box-shadow: none; }
.prow { background: var(--card); border-radius: 16px; padding: 10px 12px; cursor: pointer; transition: transform .12s, background .12s; }
.prow:active { transform: scale(.985); background: var(--card2); }
.prow.mine { box-shadow: inset 0 0 0 1px rgba(198, 244, 50, .45); }
.prow .pmain { display: flex; align-items: center; gap: 10px; }
.prow .pside { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.prow .pside .pts { font-size: 22px; min-width: 0; }
.prow .pfoot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .06); }
.fbars { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.fbars .fb { display: block; flex: none; width: 6px; border-radius: 2px; background: var(--muted); opacity: .8; }
.fbars .fb.hi { background: var(--lime); opacity: 1; }
.fbars .fb.neg { background: var(--bad); }
.fbars .fb.nd { background: var(--line); }
.trend { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 99px; white-space: nowrap; }
.trend.up { color: var(--good); background: rgba(61, 220, 132, .12); }
.trend.down { color: var(--bad); background: rgba(255, 92, 122, .12); }
.pricebox { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--card); border-radius: 14px; padding: 10px 12px; margin-top: 14px; }
.pricebox b { display: block; font-family: var(--display); font-size: 22px; }
.rchart { display: flex; align-items: flex-end; gap: 6px; height: 96px; padding: 0 2px; }
.rchart .rc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.rchart .rc b { font-size: 12px; font-family: var(--display); }
.rchart .rc .bar { display: block; flex: none; width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: var(--muted); }
.rchart .rc .bar.hi { background: var(--lime); }
.rchart .rc .bar.neg { background: var(--bad); }
.rchart .rc .bar.nd { background: var(--line); }
.rchart .rc span { font-size: 10px; color: var(--muted); }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.statgrid div { background: var(--card); border-radius: 12px; padding: 8px; text-align: center; }
.statgrid b { display: block; font-family: var(--display); font-size: 17px; white-space: nowrap; }
.statgrid span { font-size: 11px; color: var(--muted); }
.sellbox { display: grid; gap: 8px; margin-top: 14px; }
.sellbox div { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: 12px; padding: 12px 14px; }
.sellbox b { font-family: var(--display); font-size: 20px; }
.sellbox .good b { color: var(--good); }
.sellbox .bad b { color: var(--bad); }
.formbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.formbar .chips { flex: 1; }

/* ---------- celebraciones ---------- */
.celebrate { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(10, 4, 24, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overflow: hidden; animation: cbIn .18s ease-out; cursor: pointer; }
.celebrate.out { animation: cbOut .25s ease-in forwards; }
.cb-card { position: relative; width: min(300px, 80vw); padding: 28px 22px 24px; border-radius: 28px; text-align: center; background: linear-gradient(160deg, #2E1856, #1A0B33); box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 2px var(--lime); animation: cbPop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.celebrate.sell .cb-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 2px var(--gold); }
.celebrate.steal .cb-card, .celebrate.logro .cb-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 2px var(--pink); }
.cb-burst { position: absolute; left: 50%; top: 58px; width: 220px; height: 220px; margin-left: -110px; margin-top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(198, 244, 50, .35), transparent 65%); animation: cbBurst 1.2s ease-out both; pointer-events: none; }
.celebrate.sell .cb-burst { background: radial-gradient(circle, rgba(255, 201, 60, .35), transparent 65%); }
.celebrate.steal .cb-burst, .celebrate.logro .cb-burst { background: radial-gradient(circle, rgba(255, 79, 163, .4), transparent 65%); }
.cb-crest { position: relative; display: flex; justify-content: center; animation: cbBounce .7s .1s cubic-bezier(.2, 1.5, .4, 1) both; }
.cb-crest .crest { width: 76px; height: 76px; font-size: 24px; }
.cb-icon { position: relative; font-size: 64px; line-height: 1; animation: cbBounce .7s .1s cubic-bezier(.2, 1.5, .4, 1) both; }
.cb-stamp { position: relative; display: inline-block; margin-top: 16px; padding: 6px 16px; border-radius: 12px; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: .02em; white-space: nowrap; color: var(--lime-ink); background: var(--lime); transform: rotate(-6deg); animation: cbStamp .45s .25s cubic-bezier(.3, 1.6, .5, 1) both; }
.celebrate.sell .cb-stamp { background: var(--gold); color: #2A1A00; }
.celebrate.steal .cb-stamp, .celebrate.logro .cb-stamp { background: var(--pink); color: #fff; }
.cb-title { position: relative; margin-top: 16px; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.1; animation: cbUp .4s .4s ease-out both; }
.cb-sub { position: relative; margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 600; animation: cbUp .4s .5s ease-out both; }
.celebrate .cf { position: absolute; top: -20px; animation: cbFall linear both; }
.celebrate .cf.coin { top: auto; bottom: -40px; font-size: 26px; animation-name: cbRise; }
@keyframes cbIn { from { opacity: 0; } }
@keyframes cbOut { to { opacity: 0; transform: scale(1.04); } }
@keyframes cbPop { from { transform: scale(.5) rotate(-4deg); opacity: 0; } }
@keyframes cbBounce { from { transform: scale(.2) translateY(20px); opacity: 0; } }
@keyframes cbStamp { from { transform: scale(2.4) rotate(-14deg); opacity: 0; } }
@keyframes cbUp { from { transform: translateY(10px); opacity: 0; } }
@keyframes cbBurst { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes cbFall { from { transform: translateY(0) rotate(0); } to { transform: translateY(110vh) rotate(var(--r, 360deg)); } }
@keyframes cbRise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-110vh); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .celebrate, .celebrate * { animation-duration: .01s !important; animation-delay: 0s !important; } }
