/* IQ CryptoMind: tema oscuro (por defecto) y claro, elegido con el interruptor. */
:root, :root[data-theme="dark"] {
  --bg: #070a12;
  --bg2: #0b0f1a;
  --card: #0f1422;
  --card2: #151b2c;
  --line: #20283c;
  --text: #e9ecf5;
  --muted: #8a94ab;
  --accent: #8b5cf6;
  --accent2: #22d3ee;
  --accent-text: #a78bfa;
  --accent-ink: #ffffff;
  --brand: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --glow: radial-gradient(60% 50% at 15% 0%, rgba(139, 92, 246, .22), transparent 70%), radial-gradient(45% 40% at 95% 10%, rgba(34, 211, 238, .14), transparent 70%);
  --up: #22c55e;
  --down: #f04f4f;
  --warn: #e8b339;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6fb;
  --bg2: #efeff7;
  --card: #ffffff;
  --card2: #f6f6fc;
  --line: #e2e3ef;
  --text: #11131f;
  --muted: #5d6378;
  --accent: #6d3ff2;
  --accent2: #0891b2;
  --accent-text: #6d3ff2;
  --accent-ink: #ffffff;
  --brand: linear-gradient(135deg, #7c3aed 0%, #4f46e5 45%, #06b6d4 100%);
  --glow: radial-gradient(60% 50% at 15% 0%, rgba(124, 58, 237, .12), transparent 70%), radial-gradient(45% 40% at 95% 10%, rgba(6, 182, 212, .10), transparent 70%);
  --up: #12924b;
  --down: #d23a3a;
  --warn: #9a6a00;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
a { color: var(--accent-text); text-decoration: none; }
body { background-image: var(--glow); background-repeat: no-repeat; background-size: 100% 900px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.01em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--down); }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { width: 32px; height: 32px; display: inline-block; flex: none; filter: drop-shadow(0 4px 12px rgba(139, 92, 246, .35)); }
.logo svg { width: 100%; height: 100%; display: block; }
.wordmark { font-weight: 750; letter-spacing: -0.02em; }
.wordmark b { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 850; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--card2); text-decoration: none; }
.nav a.on { color: var(--text); background: var(--card); box-shadow: var(--shadow); }
.tools { display: flex; align-items: center; gap: 10px; }
.plan-badge { font-size: 12px; font-weight: 650; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.plan-badge.pro, .plan-badge.master { background: var(--brand); color: var(--accent-ink); border-color: transparent; }
.pill { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }

/* Interruptor estilo Apple */
.switch { position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: #d4d8df; transition: background .25s; flex: none; }
.switch[aria-checked="true"] { background: #34c759; }
:root[data-theme="dark"] .switch[aria-checked="true"] { background: #4c3d8f; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.3,.7,.4,1.2); display: grid; place-items: center; }
.switch[aria-checked="true"] .knob { transform: translateX(22px); }
.switch svg { width: 15px; height: 15px; grid-area: 1 / 1; transition: opacity .2s; }
.switch .sun { fill: none; stroke: #f59e0b; stroke-width: 2; stroke-linecap: round; }
.switch .sun circle { fill: #f59e0b; }
.switch .moon { fill: #5b6474; opacity: 0; }
.switch[aria-checked="true"] .sun { opacity: 0; }
.switch[aria-checked="true"] .moon { opacity: 1; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.disclaimer { font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg2); }
.disclaimer .wrap { padding-top: 7px; padding-bottom: 7px; }
.disclaimer .wrap::before { content: "⚠ "; color: var(--warn); }

main { padding-top: 22px; padding-bottom: 30px; min-height: 60vh; }
h1 { font-size: 28px; margin: 0; }
h2 { font-size: 20px; margin: 34px 0 12px; }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.upd, .upd small { color: var(--muted); font-size: 12.5px; }

/* Tarjetas */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head h3 { font-size: 15.5px; margin: 0; }
.card .upd { margin: 2px 0 6px; }
.what { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); flex: none; }
.what:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid .wide { grid-column: 1 / -1; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.stat-k { color: var(--muted); font-size: 12.5px; }
.stat-v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-s { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.fg-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #f04f4f, #f5a524 50%, #22c55e); max-width: 120px; }
.fg-bar i { position: absolute; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: var(--text); transform: translateX(-2px); }

/* Lista con guiones */
ul.dash { list-style: none; margin: 8px 0 2px; padding: 0; }
ul.dash > li { padding: 6px 0 6px 16px; position: relative; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
ul.dash > li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
ul.dash > li:last-child { border-bottom: 0; }
.k { color: var(--muted); }
.v { font-variant-numeric: tabular-nums; font-weight: 650; }
.sep { color: var(--muted); margin: 0 6px; opacity: .6; }
.up { color: var(--up); }
.down { color: var(--down); }
.st { font-size: 12px; color: var(--muted); white-space: nowrap; }
.st.conflict, .st.single_source { color: var(--warn); }
.locked { color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0 2px; background: var(--card2); }
.summary { line-height: 1.6; margin-top: 8px; }
.news-meta { color: var(--muted); font-size: 12.5px; }
.attr { font-size: 12px; margin: 8px 2px 0; }
.attr a { color: var(--muted); text-decoration: underline; }

/* Tabla de criptos */
.search { width: 100%; font: inherit; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); outline: none; }
.table-wrap { overflow-x: auto; }
table.coins { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.coins th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.coins td { padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); white-space: nowrap; }
.coins tbody tr { cursor: pointer; transition: background .12s; }
.coins tbody tr:hover, .coins tbody tr:focus { background: var(--card2); outline: none; }
.coins tbody tr:last-child td { border-bottom: 0; }
.coins .num { text-align: right; }
.c-rank { color: var(--muted); width: 36px; }
.c-coin a { display: flex; align-items: center; gap: 10px; color: var(--text); }
.c-coin a:hover { text-decoration: none; }
.c-coin small { color: var(--muted); font-weight: 500; }
.c-spark { width: 130px; }
.coin-ico { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.coin-ico.big { width: 52px; height: 52px; font-size: 22px; }
.spark { width: 110px; height: 32px; display: block; margin-left: auto; }
.spark .line { fill: none; stroke-width: 1.6; }
.spark.s-up .line { stroke: var(--up); } .spark.s-up .area { fill: color-mix(in srgb, var(--up) 14%, transparent); }
.spark.s-down .line { stroke: var(--down); } .spark.s-down .area { fill: color-mix(in srgb, var(--down) 14%, transparent); }

/* Portada */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; padding: 26px 0 8px; }
.kicker { display: inline-block; font-size: 12.5px; font-weight: 650; color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 999px; padding: 4px 12px; }
.hero h1 .grad { display: inline; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; margin: 14px 0 12px; letter-spacing: -0.025em; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 22px; max-width: 34em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; font: inherit; font-weight: 650; font-size: 14.5px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.primary { background: var(--brand); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 20px rgba(99, 102, 241, .35); }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }
.hero-chart { display: block; color: var(--text); padding: 16px 16px 8px; }
.hero-chart:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.hc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.hc-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.block { margin-top: 10px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.feature h3 { margin: 10px 0 6px; font-size: 16px; }
.feature p, .steps p { margin: 0; color: var(--muted); font-size: 14px; }
.f-ico { font-size: 22px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps h3 { margin: 8px 0 6px; font-size: 16px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; }
.notice { margin-top: 26px; border-left: 4px solid var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, var(--card)), var(--card) 60%); }
.notice h3 { margin: 0 0 6px; }
.notice p { margin: 0; color: var(--muted); }

/* Gráfico de velas */
.chart-box { position: relative; min-height: 120px; }
.chart-box.empty, .chart-box p { display: grid; place-items: center; min-height: 200px; margin: 0; text-align: center; }
.candles { display: block; max-width: 100%; touch-action: pan-y; }
.candles .grid { stroke: var(--line); stroke-width: 1; }
.candles .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.candles .c-up { fill: var(--up); stroke: var(--up); }
.candles .c-down { fill: var(--down); stroke: var(--down); }
.candles .wick { stroke-width: 1; }
.candles .vol { opacity: .28; stroke: none; }
.candles .last-line { stroke: var(--accent); stroke-dasharray: 3 3; stroke-width: 1; }
.candles .last-tag { fill: var(--accent); }
.candles .last-text { fill: var(--accent-ink); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.candles .cross { stroke: var(--muted); stroke-dasharray: 2 3; }
.chart-tip { position: absolute; top: 8px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); pointer-events: none; display: grid; gap: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; z-index: 2; }
.chart-tip[hidden] { display: none; }
.card h4 { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.tabs { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.tabs button { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--muted); padding: 4px 12px; border-radius: 7px; cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* Ficha de cripto */
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.coin-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.coin-head h1 small { color: var(--muted); font-size: 18px; font-weight: 500; }
.rank { font-size: 13px; vertical-align: middle; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.coin-price { font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; }
.coin-price .v { font-size: 17px; margin-left: 6px; }
.chart-card { margin-bottom: 14px; }
.chart-card .card-head { margin-bottom: 8px; }

.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Votación de la comunidad */
.votes { margin-bottom: 14px; }
.vote-q { font-size: 17px; font-weight: 650; margin: 10px 0; }
.vote-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.vote { font: inherit; font-weight: 700; font-size: 15px; padding: 10px 22px; border-radius: 10px; cursor: pointer; background: var(--card2); border: 1.5px solid var(--line); color: var(--text); min-width: 140px; transition: transform .1s, background .15s; }
.vote:active { transform: scale(.97); }
.vote.bull { color: var(--up); } .vote.bear { color: var(--down); }
.vote.bull:hover, .vote.bull.on { border-color: var(--up); background: color-mix(in srgb, var(--up) 14%, transparent); }
.vote.bear:hover, .vote.bear.on { border-color: var(--down); background: color-mix(in srgb, var(--down) 14%, transparent); }
.vote-bar { height: 10px; border-radius: 5px; background: var(--down); overflow: hidden; margin: 16px 0 6px; }
.vote-bar i { display: block; height: 100%; background: var(--up); transition: width .4s; }
.vote-legend { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
.votes p.small { margin: 8px 0 0; }

.senti-card { margin-bottom: 14px; }
.senti-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin: 12px 0 4px; }
.senti-k { font-weight: 650; font-size: 14px; }
.senti .vote-bar { margin-top: 12px; }
.senti p.small { margin: 8px 0 0; }
.fg-big { margin: 6px 0 8px; } .fg-big b { font-size: 24px; }
.fg-bar.wide { display: block; max-width: none; }

/* Glosario */
dl.glossary { margin: 0; }
dl.glossary dt { font-weight: 650; margin-top: 14px; }
dl.glossary dt:first-child { margin-top: 0; }
dl.glossary dd { margin: 3px 0 0; color: var(--muted); }
dl.glossary dt.hl { color: var(--accent-text); }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; align-items: stretch; }
.plan b { display: block; font-size: 15px; }
.plan .price { font-size: 26px; font-weight: 750; margin: 6px 0 4px; }
.plan .note { color: var(--muted); font-size: 13px; min-height: 2.8em; }
.plan .btn { width: 100%; margin-top: 12px; }
.plan.featured { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--brand) border-box; border: 1.5px solid transparent; }
.token { margin: 18px 0 8px; max-width: 560px; }
.token label { display: block; font-weight: 650; margin-bottom: 8px; }
.token-row { display: flex; gap: 8px; }
.token input { flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--text); }
button.link { font: inherit; background: none; border: 0; padding: 8px 0 0; color: var(--accent-text); text-decoration: underline; cursor: pointer; }

.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 60px 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 16px 0 40px; font-size: 13px; background: var(--bg2); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-m { display: none; }
}
@media (max-width: 720px) {
  .top-row { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 6px; }
  .brand { flex: 1; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .nav a { padding: 6px 10px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .hide-s { display: none; }
  .coins td, .coins th { padding: 9px 8px; }
  .stat-v { font-size: 20px; }
  .coin-price { font-size: 22px; }
  .plan-badge { display: none; }
}
@media (max-width: 420px) {
  .features, .stats, .plans { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Marca */
.f-ico { background: color-mix(in srgb, var(--accent) 12%, var(--card2)); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.hero-chart { position: relative; }
.hero-chart::before { content: ""; position: absolute; inset: -1px; border-radius: 15px; padding: 1px; background: var(--brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; flex-wrap: wrap; }
.foot-brand .logo { width: 26px; height: 26px; }
.foot-brand .muted { font-size: 13px; }

/* Cuenta de usuario */
.account { display: flex; align-items: center; gap: 8px; }
.pill.ghost { background: transparent; }
.pill.brand { background: var(--brand); color: #fff; border-color: transparent; }
.acct-menu { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand); color: #fff; font: inherit; font-weight: 750; font-size: 15px; box-shadow: 0 4px 14px rgba(99, 102, 241, .35); }
.acct-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow), 0 12px 32px rgba(0, 0, 0, .25); z-index: 20; display: grid; gap: 4px; }
.acct-pop[hidden] { display: none; }
.acct-email { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.acct-link { font: inherit; text-align: left; background: none; border: 0; padding: 7px 0 0; color: var(--accent-text); cursor: pointer; }
.auth-dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--card); color: var(--text); width: min(420px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.auth-dialog::backdrop { background: rgba(5, 7, 14, .6); backdrop-filter: blur(4px); }
.auth { display: grid; gap: 12px; padding: 26px 24px 22px; position: relative; }
.auth h2 { margin: 0; text-align: center; font-size: 21px; }
.auth-logo { width: 46px; height: 46px; margin: 0 auto; }
.auth-logo svg { width: 100%; height: 100%; }
.auth-tabs { justify-self: center; }
.auth label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.auth input { font: inherit; font-size: 15px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--text); outline: none; }
.auth input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.auth .btn { width: 100%; padding: 12px; }
.auth p { margin: 0; }
.auth-note { text-align: center; color: var(--muted); padding: 10px 0; }
.auth-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
@media (max-width: 720px) { .hide-xs { display: none; } }

/* Modo maestro */
.teach-btn { display: inline-flex; align-items: center; gap: 4px; }
.teach-btn.on { background: var(--brand); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.teach-bar { background: color-mix(in srgb, var(--accent) 14%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 13px; font-weight: 600; padding: 8px 0; color: var(--text); }
.teach-bar[hidden] { display: none; }
body.teach .teach-k { cursor: help; text-decoration: underline dotted color-mix(in srgb, var(--accent) 80%, transparent); text-decoration-thickness: 2px; text-underline-offset: 4px; border-radius: 4px; transition: background .15s; }
body.teach .teach-k:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.teach-pop { position: absolute; z-index: 40; width: min(340px, calc(100vw - 24px)); background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow), 0 14px 40px rgba(0, 0, 0, .3); font-size: 14px; line-height: 1.5; }
.teach-pop b { display: block; padding-right: 22px; margin-bottom: 4px; }
.teach-pop p { margin: 0 0 8px; color: var(--muted); }
.teach-pop a { font-weight: 600; color: var(--accent); text-decoration: none; }
.teach-pop .auth-x { position: absolute; top: 8px; right: 8px; }
.wordmark { white-space: nowrap; }
body.teach .stat-k.teach-k, body.teach .senti-k.teach-k { width: fit-content; }
@media (max-width: 420px) { .brand { font-size: 16px; gap: 8px; } .tools { gap: 6px; } .teach-btn { padding: 5px 9px; } }

/* Información legal */
.legal { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.legal-nav { position: sticky; top: 84px; display: grid; gap: 4px; }
.legal-nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 550; font-size: 14px; }
.legal-nav a:hover { color: var(--text); background: var(--card); }
.legal-nav a.on { color: var(--text); background: var(--card); box-shadow: inset 3px 0 0 var(--accent); }
.legal-doc { padding: 26px 30px; max-width: 820px; line-height: 1.65; }
.legal-doc h1 { font-size: 26px; margin: 0 0 4px; }
.legal-doc h2 { font-size: 17px; margin: 26px 0 8px; }
.legal-doc p { margin: 0 0 10px; }
.legal-doc .legal-intro { font-size: 15.5px; color: var(--text); border-left: 3px solid var(--accent); padding-left: 12px; margin: 14px 0 6px; }
.legal-list { margin: 0 0 10px; padding-left: 20px; }
.legal-list li { margin: 4px 0; }
.legal-doc a { color: var(--accent); }
mark.pending { background: color-mix(in srgb, #f59e0b 22%, transparent); color: var(--text); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; font-size: 13.5px; }
.foot-legal a { color: var(--text); opacity: .85; }
.foot-legal a:hover { opacity: 1; text-decoration: underline; }
.disclaimer a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.auth-check { display: flex !important; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400 !important; color: var(--muted); line-height: 1.45; cursor: pointer; }
.auth-check input { width: 18px !important; height: 18px; margin: 1px 0 0 !important; flex: none; accent-color: var(--accent); padding: 0 !important; }
.auth-check a { color: var(--accent); }
@media (max-width: 820px) {
  .legal { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .legal-nav a { white-space: nowrap; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .legal-nav a.on { box-shadow: none; border-color: var(--accent); }
  .legal-doc { padding: 20px 18px; }
}

/* Planes */
.plan { display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-top b { font-size: 18px; }
.plan-tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--brand); color: #fff; white-space: nowrap; }
.plan-master .plan-tag { background: linear-gradient(135deg, #f5c451, #f08a4b); color: #1a1205; }
.plan-master { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #f5c451, #8b5cf6) border-box; border: 1.5px solid transparent; }
.plan .price { font-size: 32px; font-weight: 800; margin: 2px 0 2px; letter-spacing: -0.02em; }
.plan .price small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.plan .note { min-height: 2.8em; }
.plan-period { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.plan-period select { font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a94ab' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 36px 10px 12px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.plan-period select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.plan-feats { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; flex: 1; align-content: start; }
.plan-feats li { padding-left: 24px; position: relative; }
.plan-feats li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.plan .btn { margin-top: 8px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 480px; } }

/* Zona Master */
.master-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 14px; }
.master-card { padding: 20px; }
.alert-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 6px; }
.alert-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.alert-form select, .alert-form input { font: inherit; font-size: 14px; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.alert-form select { appearance: none; -webkit-appearance: none; padding-right: 32px; background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a94ab' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 11px center / 11px; }
.alert-form select:focus, .alert-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.alert-form .btn { grid-column: 1 / -1; }
.report-form { grid-template-columns: 1fr auto; align-items: end; }
.report-form .btn { grid-column: auto; }
.alert-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.alert-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.alert-main { flex: 1; min-width: 0; }
.alert-main b { display: block; font-size: 14px; }
.chip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.chip.met { background: color-mix(in srgb, #22c55e 18%, transparent); color: #16a34a; }
.chip.wait { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.chip.paused { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.icon-btn { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 13px; flex: none; }
.icon-btn:hover { border-color: var(--accent); }
.note-box { border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 10px; padding: 8px 11px; margin: 8px 0; color: var(--muted); }
.report { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.6; }
.report h2 { font-size: 20px; margin: 4px 0 8px; }
.report h4 { margin: 14px 0 4px; font-size: 15px; }
.report p { margin: 0 0 8px; }
.report-sum { font-weight: 600; border-left: 3px solid var(--accent); padding-left: 10px; }
.report-note { margin-top: 12px !important; }
.master-hero { padding: 26px; text-align: left; background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, #f5c451, #8b5cf6) border-box; border: 1.5px solid transparent; margin-top: 14px; }
.master-hero h2 { margin: 10px 0 6px; }
.master-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.master-tag { background: linear-gradient(135deg, #f5c451, #f08a4b); color: #1a1205; }
.master-feats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.coin-head { position: relative; }
.master-pill { margin-left: auto; align-self: center; white-space: nowrap; text-decoration: none; }
@media (max-width: 900px) { .master-grid, .master-feats { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .alert-form { grid-template-columns: 1fr; } .report-form { grid-template-columns: 1fr; } }

/* --- Panel staff --- */
.staff-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.stat-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-tile { padding: 12px 14px; }
.stat-num { font-size: 24px; font-weight: 750; margin-top: 2px; }
.staff-card { margin-bottom: 14px; }
.staff-card h4 { margin: 18px 0 6px; }
.staff-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.staff-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.staff-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.staff-actions select, .staff-actions input { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); color: var(--text); }
.staff-actions input { width: 72px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, transparent); }
.plan-chip { font-weight: 650; }
.code-tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.code-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.staff-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.note-box code { font-size: 14px; user-select: all; }
@media (max-width: 900px) { .stat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .code-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .staff-table thead { display: none; }
  .staff-table tr, .staff-table td { display: block; }
  .staff-table td { border-bottom: 0; padding: 4px 0; }
  .staff-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .code-form { grid-template-columns: 1fr; }
}

/* --- Mi cuenta --- */
.profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.profile-top .btn { margin-left: auto; }
.avatar.big { width: 52px; height: 52px; font-size: 22px; cursor: default; display: grid; place-items: center; }
.profile-email { font-size: 18px; font-weight: 700; word-break: break-all; }
.profile-card { margin-bottom: 14px; }
.profile-card h3 { margin: 0 0 6px; }
.profile-card h4 { margin: 18px 0 2px; font-size: 14.5px; }
.profile-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0; font-size: 14.5px; }
.profile-dl dt { color: var(--muted); }
.profile-dl dd { margin: 0; }
.profile-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.alert-form .span2 { grid-column: 1 / -1; }
.alert-form label.check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--text); }
.alert-form label.check input { width: 18px; height: 18px; margin-top: 2px; padding: 0; accent-color: var(--accent); }
.ok-msg { color: var(--up); margin: 6px 0; }
.danger-zone { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.danger-zone h4 { color: var(--down); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- Contacto --- */
.contact-hero { margin: 6px 0 4px; }
.contact-mail { font-size: clamp(20px, 4vw, 28px); font-weight: 750; margin: 4px 0 6px; word-break: break-all; }
.contact-mail a { color: inherit; }
.contact-topic { color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.contact-topic:hover { transform: translateY(-2px); border-color: var(--accent); }
.contact-topics { margin-bottom: 14px; }

/* --- Gráfico: intervalos, periodos y precio en directo --- */
.chart-head { flex-wrap: wrap; gap: 8px; }
.tf-tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tf-tabs::-webkit-scrollbar { display: none; }
.tf-tabs button { white-space: nowrap; }
.range-tabs { margin: 0 0 8px; width: max-content; max-width: 100%; }
.live-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: var(--muted); margin-left: 8px; vertical-align: middle; text-transform: uppercase; letter-spacing: .04em; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live-dot.on { color: var(--up); }
.live-dot.on::before { background: var(--up); box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 60%, transparent); animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tick-up { animation: tick-up .9s ease-out; }
.tick-down { animation: tick-down .9s ease-out; }
@keyframes tick-up { from { color: var(--up); } }
@keyframes tick-down { from { color: var(--down); } }
@media (prefers-reduced-motion: reduce) { .live-dot.on::before, .tick-up, .tick-down { animation: none; } }

/* --- Comunidad --- */
.comm-card { margin: 14px 0; }
.comm-card .card-head { flex-wrap: wrap; gap: 8px; }
.comm-day { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.comm-day select, .comm-nick input { font: inherit; font-size: 13.5px; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; }
.comm-form, .comm-nick { margin: 10px 0 4px; }
.comm-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14.5px; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 64px; }
.comm-form textarea:focus, .comm-nick input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.comm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.comm-nick .comm-row { justify-content: flex-start; }
.comm-nick input { flex: 1; min-width: 0; max-width: 260px; }
.comm-list { list-style: none; margin: 12px 0 0; padding: 0; }
.comm-item { padding: 10px 0; border-top: 1px solid var(--line); }
.comm-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comm-meta .link-btn { margin-left: auto; }
.comm-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.comm-more { margin-top: 8px; width: 100%; }
.comm-rules { margin-top: 12px; font-size: 13px; }
.comm-rules summary { cursor: pointer; color: var(--muted); }
.link-btn { font: inherit; font-size: 12.5px; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--text); }

/* --- Banner de lanzamiento --- */
.launch-bar { background: linear-gradient(90deg, #7c3aed, #2563eb 55%, #0891b2); color: #fff; font-size: 13.5px; }
.launch-row { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; text-align: center; }
.launch-cta { font: inherit; font-weight: 700; font-size: 13px; color: #1e1b4b; background: #fff; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.launch-cta:hover { background: #e0e7ff; }
.launch-done { font-weight: 650; opacity: .95; }
.launch-ic { font-size: 34px; }
.auth label.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
.auth label.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
@media (max-width: 420px) { .launch-row { font-size: 12.5px; gap: 8px; } }
.launch-form { text-align: center; }
.launch-form label { text-align: left; }
.launch-form .launch-ic { line-height: 1; }
.auth .auth-x { position: absolute; top: 10px; right: 12px; }

/* Insignias de plan en la comunidad */
.ptag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; letter-spacing: .02em; line-height: 1; padding: 4px 8px 4px 7px; border-radius: 999px; vertical-align: 1px; white-space: nowrap; position: relative; overflow: hidden; }
.ptag > span { font-size: 10px; }
.ptag-free { color: #0f9d6b; background: color-mix(in srgb, #10b981 13%, transparent); border: 1px solid color-mix(in srgb, #10b981 40%, transparent); }
:root[data-theme="dark"] .ptag-free { color: #4ade9a; }
.ptag-pro { color: #fff; background: var(--brand) border-box; border: 1px solid transparent; box-shadow: 0 2px 10px rgba(99, 102, 241, .35); }
.ptag-master { color: #ffd76a; font-size: 11.5px; padding: 3px 10px 3px 6px; gap: 5px; background: linear-gradient(135deg, #2a1a00, #4a2f00 55%, #2a1a00) padding-box, linear-gradient(135deg, #fff1a8, #f5b301 40%, #fff1a8 60%, #d48806) border-box; border: 1.5px solid transparent; box-shadow: 0 0 12px rgba(245, 179, 1, .55); text-shadow: 0 0 8px rgba(255, 200, 60, .6); animation: ptag-glow 2.6s ease-in-out infinite; }
.ptag-master .crown { width: 20px; height: 17px; flex: none; margin-top: -3px; filter: drop-shadow(0 0 4px rgba(255, 210, 70, .9)); }
@keyframes ptag-glow { 50% { box-shadow: 0 0 20px rgba(255, 196, 0, .9); } }
.ptag-pro::after, .ptag-master::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); animation: ptag-shine 3.6s ease-in-out infinite; }
.ptag-master::after { animation-duration: 2.8s; }
@keyframes ptag-shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Precio original tachado en anual / 2 años */
.price .was { display: block; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, #ef4444 75%, transparent); margin-bottom: 2px; }

/* Botones de la cabecera: el degradado ocupa también el borde (antes se veía una raya azul)
   y al pulsarlos hay un barrido de luz con velas de mercado subiendo al fondo. */
.pill, .avatar { position: relative; overflow: hidden; isolation: isolate; transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; -webkit-tap-highlight-color: transparent; }
.pill.brand, .teach-btn.on, .avatar, .plan-badge.pro, .plan-badge.master, .btn.primary, .plan-tag, .step-n { background: var(--brand) border-box; border-color: transparent; }
.teach-btn.on { box-shadow: 0 4px 18px rgba(124, 58, 237, .38); }
.pill:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pill.brand:hover, .teach-btn.on:hover { border-color: transparent; box-shadow: 0 6px 22px rgba(99, 102, 241, .45); }
.pill:active, .avatar:active { transform: scale(.95); }
.pill::before, .avatar::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='30' viewBox='0 0 48 30'%3E%3Cg stroke-width='1.4'%3E%3Cpath d='M5 6v20' stroke='%2322c55e'/%3E%3Crect x='3' y='11' width='4' height='10' rx='1' fill='%2322c55e'/%3E%3Cpath d='M15 3v18' stroke='%23ef4444'/%3E%3Crect x='13' y='6' width='4' height='9' rx='1' fill='%23ef4444'/%3E%3Cpath d='M25 9v19' stroke='%2322c55e'/%3E%3Crect x='23' y='13' width='4' height='11' rx='1' fill='%2322c55e'/%3E%3Cpath d='M35 1v16' stroke='%2322c55e'/%3E%3Crect x='33' y='4' width='4' height='9' rx='1' fill='%2322c55e'/%3E%3Cpath d='M44 5v15' stroke='%23ef4444'/%3E%3Crect x='42' y='8' width='4' height='7' rx='1' fill='%23ef4444'/%3E%3C/g%3E%3C/svg%3E") 0 100% / 48px 30px repeat-x; }
.pill::after, .avatar::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); }
.pill.sweep::after, .avatar.sweep::after { animation: btn-sweep .6s ease-out; }
.pill.sweep::before, .avatar.sweep::before { animation: btn-candles .7s ease-out; }
@keyframes btn-sweep { to { transform: translateX(130%); } }
@keyframes btn-candles { 0% { opacity: 0; background-position: 0 220%; } 35% { opacity: .35; } 100% { opacity: 0; background-position: -24px 0; } }
@media (prefers-reduced-motion: reduce) {
  .ptag-master, .ptag-pro::after, .ptag-master::after, .pill.sweep::after, .avatar.sweep::after, .pill.sweep::before, .avatar.sweep::before { animation: none; }
  .pill:active, .avatar:active { transform: none; }
}

/* Cinta de la web de pruebas (demo.) */
.demo-ribbon { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 99; background: #f59e0b; color: #1f1300; font-weight: 800; font-size: 12.5px; letter-spacing: .04em; padding: 7px 14px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); pointer-events: none; }

/* Ficha por secciones */
.sec-nav { position: sticky; top: var(--top-h, 64px); z-index: 9; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 18px 0 14px; padding: 8px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sec-nav::-webkit-scrollbar { display: none; }
.sec-nav button { flex: none; font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; transition: color .15s, border-color .15s, background .15s; white-space: nowrap; }
.sec-nav button:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.sec-nav button.on { color: #fff; background: var(--brand) border-box; border-color: transparent; box-shadow: 0 4px 14px rgba(99, 102, 241, .35); }
.sec-tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 999px; margin-left: 3px; color: #3a2200; background: linear-gradient(135deg, #fff1a8, #f5b301); vertical-align: 1px; }
.coin-sec { min-height: 240px; animation: sec-in .25s ease-out; }
@keyframes sec-in { from { opacity: .4; transform: translateY(4px); } }
.coin-sec > .card, .coin-sec > .grid { margin-bottom: 14px; }

/* IQ Score */
.score-wrap { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 22px; align-items: center; }
.score-main { position: relative; text-align: center; }
.gauge { width: 100%; max-width: 240px; display: block; margin: 0 auto; }
.score-num { position: absolute; left: 0; right: 0; top: 44%; font-size: 40px; font-weight: 850; letter-spacing: -.03em; }
.score-num.blur { filter: blur(8px); }
.score-band { font-weight: 750; font-size: 15px; margin-top: 2px; }
.band-very_cold .score-band { color: #38bdf8; } .band-cold .score-band { color: #818cf8; } .band-neutral .score-band { color: #c084fc; }
.band-warm .score-band { color: #fb923c; } .band-very_hot .score-band { color: #ef4444; }
.sblocks { display: grid; gap: 12px; }
.sblock-h { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 650; }
.sblock.nd { opacity: .55; }
.sbar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 5px 0 4px; }
.sbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #c084fc 55%, #fb923c); }
.sparts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.sparts b { color: var(--text); font-weight: 650; }
.score-how { margin-top: 10px; font-size: 13px; }
.score-how summary { cursor: pointer; color: var(--muted); }
.locked-score .score-main { max-width: 240px; margin: 0 auto; opacity: .6; }
@media (max-width: 640px) { .score-wrap { grid-template-columns: 1fr; } }

/* Mapa de liquidaciones */
.lm-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.lm-big { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); }
.lm-big b { font-size: 20px; }
.lm-big.s { border-color: color-mix(in srgb, #22d3ee 45%, var(--line)); }
.lm-big.l { border-color: color-mix(in srgb, #f97316 45%, var(--line)); }
.lm-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.lm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lm { position: relative; padding-left: 92px; border-left: 0; }
.lm-row { position: relative; height: 7px; margin: 1px 0; }
.lm-row i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 1px; }
.lm-s, .lm-legend .lm-s { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.lm-l, .lm-legend .lm-l { background: linear-gradient(90deg, #ea580c, #fbbf24); }
.lm-p { position: absolute; left: -92px; top: -5px; width: 84px; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lm-now { position: relative; height: 0; border-top: 2px dashed var(--text); margin: 4px 0; }
.lm-now span { position: absolute; right: 0; top: -11px; font-size: 11.5px; font-weight: 750; background: var(--card); padding: 0 6px; border-radius: 6px; }
@media (max-width: 520px) { .lm { padding-left: 74px; } .lm-p { left: -74px; width: 68px; font-size: 10px; } .lm-sum { grid-template-columns: 1fr; } }

/* Calendario */
.ev-list { display: grid; gap: 14px; margin-top: 8px; }
.ev-date { font-size: 12.5px; font-weight: 750; color: var(--muted); margin-bottom: 6px; }
.ev { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); margin-bottom: 6px; }
.ev-ico { font-size: 20px; text-align: center; }
.ev-main { display: grid; gap: 2px; min-width: 0; }
.ev-main a { color: var(--text); }
.ev-imp { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.imp-high .ev-imp { color: #fff; background: #ef4444; }
.imp-medium .ev-imp { color: #3a2200; background: #fbbf24; }
.imp-low .ev-imp { color: var(--muted); border: 1px solid var(--line); }
.imp-high { border-left: 3px solid #ef4444; }
@media (max-width: 520px) { .ev { grid-template-columns: 28px 1fr; } .ev-imp { grid-column: 2; justify-self: start; } }

/* Chat con IA */
.ai-left { font-size: 12.5px; font-weight: 750; padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--brand) border-box; }
.ai-left.zero { background: var(--line); color: var(--muted); }
.ai-log { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px 2px; margin: 8px 0; }
.ai-q { justify-self: end; max-width: 85%; }
.ai-q span { display: inline-block; background: var(--brand) border-box; color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; font-size: 14px; }
.ai-a { justify-self: start; max-width: 92%; background: var(--card2); border: 1px solid var(--line); padding: 10px 13px; border-radius: 14px 14px 14px 4px; font-size: 14.5px; line-height: 1.5; }
.ai-a p { margin: 0 0 6px; } .ai-a p:last-child { margin: 0; } .ai-a ul { margin: 4px 0; padding-left: 18px; }
.ai-wait { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); background: var(--card2); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: 999px; padding: 5px 11px; }
.chip:hover { border-style: solid; }
.ai-form { display: flex; gap: 8px; margin: 6px 0; }
.ai-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); color: var(--text); outline: none; }
.ai-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
@media (prefers-reduced-motion: reduce) { .coin-sec { animation: none; } }
.shortcuts { display: grid; gap: 8px; align-content: start; }
.shortcut { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--text); cursor: pointer; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; transition: border-color .15s, transform .15s; }
.shortcut:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateX(2px); }
.shortcut b { display: block; font-size: 14px; } .shortcut small { color: var(--muted); font-size: 12.5px; }
.sc-ico { font-size: 22px; text-align: center; } .sc-go { color: var(--muted); font-weight: 700; }

/* Ballenas */
.wh-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.wh-tile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.wh-tile b { font-size: 17px; }
.wh-tile.in { border-color: color-mix(in srgb, #f97316 45%, var(--line)); }
.wh-tile.out { border-color: color-mix(in srgb, #22c55e 45%, var(--line)); }
.wh-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.wh { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.wh-ico { font-size: 20px; text-align: center; }
.wh-main { min-width: 0; } .wh-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.wh-side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.wh-kind { font-size: 11px; font-weight: 750; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.k-to_exchange { border-left: 3px solid #f97316; } .k-to_exchange .wh-kind { color: #fff; background: #f97316; border-color: transparent; }
.k-from_exchange { border-left: 3px solid #22c55e; } .k-from_exchange .wh-kind { color: #fff; background: #16a34a; border-color: transparent; }
@media (max-width: 640px) { .wh-tiles { grid-template-columns: 1fr 1fr; } .wh { grid-template-columns: 28px 1fr; } .wh-side { grid-column: 2; justify-items: start; text-align: left; } }

/* Códigos promocionales */
.auth-promo { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; }
.auth-promo summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); list-style: none; }
.auth-promo summary::-webkit-details-marker { display: none; }
.auth-promo[open] summary { margin-bottom: 8px; }
.auth-promo input { text-transform: uppercase; letter-spacing: .06em; }
.promo-card { position: relative; overflow: hidden; }
.promo-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #f5c451, #ff7ab6, #7c5cff); }
.promo-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.promo-form input { flex: 1 1 180px; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.promo-form input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; }
.promo-flash { border: 1px solid color-mix(in srgb, var(--up) 45%, transparent); background: color-mix(in srgb, var(--up) 12%, var(--card)); font-weight: 600; margin-bottom: 14px; }
.promo-batch { display: grid; gap: 4px; }
.promo-codes { max-height: 320px; overflow: auto; margin-top: 8px; }
.promo-codes td, .promo-codes th { padding: 6px 8px; font-size: 13px; }
.promo-form input { font: inherit; font-size: 15px; color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.promo-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.promo-new { margin: 10px 0; }
.promo-list { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--card2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; white-space: pre-wrap; }
.alert-row.open { border-color: var(--accent); }
.promo-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
