/* =============================================================================
   TIKVAH INVEST — Design System
   Dark por defecto · Light con [data-theme="light"] · Mobile first
   ============================================================================= */

:root {
  /* Marca */
  --navy-950: #050B16;
  --navy-900: #0A1628;   /* principal */
  --navy-800: #11213A;
  --navy-700: #1A2D4C;
  --navy-600: #253C61;
  --gold: #D4AF37;
  --gold-soft: #E9CF73;
  --gold-dim: rgba(212, 175, 55, .14);
  --green: #00C853;
  --green-dim: rgba(0, 200, 83, .14);
  --red: #FF1744;
  --red-dim: rgba(255, 23, 68, .14);
  --blue: #4FC3F7;

  /* Tema oscuro (default) */
  --bg: var(--navy-950);
  --bg-elev: var(--navy-900);
  --card: var(--navy-900);
  --card-2: var(--navy-800);
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #F4F6FA;
  --text-2: #A9B4C7;
  --text-3: #6E7C95;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -12px rgba(0,0,0,.6);
  --shadow-gold: 0 10px 30px -10px rgba(212,175,55,.45);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font: Inter, -apple-system, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F3F5F9;
  --bg-elev: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F6F8FB;
  --border: rgba(10, 22, 40, .08);
  --border-strong: rgba(10, 22, 40, .16);
  --text: #0A1628;
  --text-2: #4A5A75;
  --text-3: #8592A8;
  --gold: #B8941F;
  --gold-dim: rgba(184, 148, 31, .12);
  --shadow: 0 1px 2px rgba(10,22,40,.04), 0 12px 32px -16px rgba(10,22,40,.18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* que ningún estilo muestre lo oculto */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-wrap: break-word;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.up { color: var(--green); }
.down { color: var(--red); }
.gold { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--gold); font-weight: 600; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: 600 15px var(--font); cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent; text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #0A1628; box-shadow: var(--shadow-gold); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--card-2); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-link { background: none; border: 0; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; padding: 8px; }
.btn-link:hover { color: var(--text); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  font: 500 16px var(--font); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-dim); }
.field.has-error .input { border-color: var(--red); }
.field-error { font-size: 13px; color: var(--red); }
.phone-wrap { display: flex; align-items: stretch; }
.phone-wrap span { display: grid; place-items: center; padding: 0 12px; border-radius: 12px 0 0 12px; background: var(--card); border: 1px solid var(--border); border-right: 0; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.phone-wrap .input { border-radius: 0 12px 12px 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 400px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-row > .field { min-width: 0; }
input[type=date].input { min-height: 50px; }
.field-hint { font-size: 12px; color: var(--text-3); }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-3); cursor: pointer; padding: 8px; font-size: 13px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); margin-top: 2px; flex: none; }

.strength { height: 4px; border-radius: 4px; background: var(--card-2); overflow: hidden; margin-top: 4px; }
.strength > i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s var(--ease), background .3s; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Flash / toasts ---------- */
.flash-stack { display: grid; gap: 10px; margin-bottom: 16px; }
.flash {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; border: 1px solid var(--border); background: var(--card-2);
  animation: slide-in .4s var(--ease);
}
.flash-success { border-color: rgba(0,200,83,.35); background: var(--green-dim); }
.flash-error   { border-color: rgba(255,23,68,.35); background: var(--red-dim); }
.flash-reward  { border-color: rgba(212,175,55,.45); background: var(--gold-dim); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } }

/* =============================================================================
   LAYOUT GUEST (login / registro / onboarding)
   ============================================================================= */
.guest { min-height: 100vh; min-height: 100dvh; display: grid; }
.guest-aside { display: none; }
.guest-main {
  display: flex; flex-direction: column; width: 100%; max-width: 480px; margin: 0 auto; min-width: 0;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.guest-main > .brand { margin-bottom: 36px; }
.guest h1 { font-size: 28px; margin-bottom: 8px; }
.guest .lead { color: var(--text-2); margin-bottom: 28px; }
.guest-foot { margin-top: 24px; text-align: center; color: var(--text-2); font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

@media (min-width: 960px) {
  .guest { grid-template-columns: 1.05fr 1fr; }
  .guest-aside {
    display: flex; flex-direction: column; justify-content: space-between; padding: 48px;
    background:
      radial-gradient(1200px 600px at 110% -10%, rgba(212,175,55,.18), transparent 60%),
      radial-gradient(800px 500px at -20% 120%, rgba(0,200,83,.10), transparent 60%),
      var(--navy-900);
    border-right: 1px solid var(--border); position: relative; overflow: hidden;
  }
  .guest-main { justify-content: center; padding: 48px; }
  .guest-main > .brand { display: none; }
}
.aside-hero h2 { font-size: 44px; line-height: 1.05; letter-spacing: -.035em; color: #fff; max-width: 520px; }
.aside-hero h2 em { font-style: normal; color: var(--gold); }
.aside-hero p { color: #A9B4C7; margin-top: 16px; max-width: 440px; font-size: 16px; }
.aside-stats { display: flex; gap: 32px; color: #A9B4C7; font-size: 13px; }
.aside-stats strong { display: block; color: #fff; font-size: 22px; font-weight: 700; }

/* Ticker decorativo */
.ticker { display: grid; gap: 10px; margin-top: 40px; max-width: 420px; }
.ticker-row {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(6px); animation: float 6s ease-in-out infinite;
}
.ticker-row:nth-child(2) { animation-delay: -2s; margin-left: 28px; }
.ticker-row:nth-child(3) { animation-delay: -4s; margin-left: 10px; }
.ticker-row b { color: #fff; }
.ticker-row span { font-size: 13px; color: #A9B4C7; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.chip-up { color: var(--green); background: var(--green-dim); }
.chip-down { color: var(--red); background: var(--red-dim); }
.chip-gold { color: var(--gold); background: var(--gold-dim); }
@keyframes float { 50% { transform: translateY(-6px); } }

/* =============================================================================
   ONBOARDING — Test de perfil
   ============================================================================= */
.progress { height: 6px; background: var(--card-2); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.progress > i { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 6px; transition: width .5s var(--ease); }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-3); margin-bottom: 28px; }
.reward-hint { color: var(--gold); font-weight: 600; }

.question { animation: q-in .45s var(--ease); }
.js .question:not(.is-active) { display: none; }
.question + .question { margin-top: 40px; }
.js .question + .question { margin-top: 0; }
.q-emoji { font-size: 40px; margin-bottom: 12px; }
.q-text { font-size: 22px; font-weight: 700; margin-bottom: 20px; letter-spacing: -.02em; }
.options { display: grid; gap: 10px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--border); transition: border-color .2s, background .2s, transform .15s;
  font-weight: 500;
}
.option label:hover { border-color: var(--border-strong); }
.option label:active { transform: scale(.985); }
.option .key {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--card-2); text-transform: uppercase;
}
.option input:checked + label { border-color: var(--gold); background: var(--gold-dim); }
.option input:checked + label .key { background: var(--gold); color: #0A1628; }
.option input:focus-visible + label { box-shadow: 0 0 0 4px var(--gold-dim); }
.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
@keyframes q-in { from { opacity: 0; transform: translateX(16px); } }

/* Resultado */
.result { text-align: center; padding-top: 12px; }
.result-badge {
  width: 112px; height: 112px; margin: 0 auto 20px; border-radius: 32px; display: grid; place-items: center; font-size: 54px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: pop .7s var(--ease);
}
.result h1 { font-size: 32px; }
.bonus-card {
  margin: 28px 0; padding: 24px; border-radius: var(--radius-lg); text-align: center;
  background: radial-gradient(400px 200px at 50% 0%, rgba(212,175,55,.25), transparent 70%), var(--card);
  border: 1px solid rgba(212,175,55,.35); box-shadow: var(--shadow-gold);
}
.bonus-card .amount { font-size: 40px; font-weight: 800; color: var(--gold); letter-spacing: -.03em; margin: 6px 0; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } }

/* Avatar */
.avatar-drop {
  display: grid; place-items: center; gap: 10px; text-align: center; padding: 32px; border-radius: var(--radius-lg);
  border: 2px dashed var(--border-strong); background: var(--card); cursor: pointer; transition: border-color .2s, background .2s;
}
.avatar-drop:hover, .avatar-drop.drag { border-color: var(--gold); background: var(--gold-dim); }
.avatar-preview { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--card-2); display: grid; place-items: center; font-size: 42px; overflow: hidden; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================================================
   LAYOUT APP
   ============================================================================= */
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.app > * { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand span { display: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.cash-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.cash-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-dim); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--card);
  border: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); background: var(--card-2); }
.icon-btn svg { width: 18px; height: 18px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--navy-700); display: grid; place-items: center; font-weight: 700; color: var(--gold); font-size: 14px; border: 2px solid var(--gold-dim); overflow: hidden; }

.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left)); }

/* Navegación inferior (móvil) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--border);
}
.nav-item { display: grid; justify-items: center; gap: 3px; padding: 6px 0; color: var(--text-3); font-size: 11px; font-weight: 600; border-radius: 12px; }
.nav-item:hover { text-decoration: none; color: var(--text); }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--gold); }
.nav-item.trade svg { width: 46px; height: 46px; margin-top: -22px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #0A1628; box-shadow: var(--shadow-gold); }
.nav-item.soon { opacity: .45; pointer-events: none; }

/* Sidebar (desktop) */
.sidebar { display: none; }
@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 248px 1fr; padding-bottom: 0; }
  .bottom-nav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 24px 16px;
    border-right: 1px solid var(--border); background: var(--bg-elev);
  }
  .sidebar .brand { padding: 0 8px 24px; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14px; }
  .side-link svg { width: 20px; height: 20px; }
  .side-link:hover { background: var(--card-2); color: var(--text); text-decoration: none; }
  .side-link.active { background: var(--gold-dim); color: var(--gold); }
  .side-link.soon { opacity: .45; pointer-events: none; }
  .side-link .tag { margin-left: auto; font-size: 10px; padding: 2px 6px; border-radius: 6px; background: var(--card-2); color: var(--text-3); }
  .sidebar-foot { margin-top: auto; }
  .topbar .brand { display: none; }
  .content { padding: 28px 32px; }
}

/* =============================================================================
   DASHBOARD
   ============================================================================= */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.hello h1 { font-size: 24px; }
.hello p { color: var(--text-2); font-size: 14px; }
.profile-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card); border: 1px solid var(--border); }

.equity-card {
  position: relative; overflow: hidden; padding: 24px; border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(212,175,55,.20), transparent 60%),
    linear-gradient(160deg, var(--navy-800), var(--navy-900));
  border: 1px solid rgba(212,175,55,.22); color: #fff; box-shadow: var(--shadow);
}
.equity-card .label { color: #A9B4C7; font-size: 13px; font-weight: 600; }
.equity-card .value { font-size: clamp(32px, 8vw, 44px); font-weight: 800; letter-spacing: -.035em; margin: 6px 0 10px; }
.equity-card .value small { font-size: .5em; color: #A9B4C7; font-weight: 600; }
.equity-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.equity-split .k { font-size: 12px; color: #A9B4C7; }
.equity-split .v { font-size: 17px; font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .dash { grid-template-columns: 1.6fr 1fr; align-items: start; } }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.qa { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); color: var(--text); font-size: 12px; font-weight: 600; text-align: center; }
.qa:hover { text-decoration: none; border-color: var(--border-strong); }
.qa .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-dim); color: var(--gold); }
.qa .ico svg { width: 20px; height: 20px; }
.qa.soon { opacity: .5; pointer-events: none; }

.tx-list { list-style: none; margin: 12px 0 0; padding: 0; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.tx:first-child { border-top: 0; }
.tx-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); font-size: 18px; flex: none; }
.tx-main { flex: 1; min-width: 0; }
.tx-main b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main span { font-size: 12px; color: var(--text-3); }
.tx-amt { font-weight: 700; font-size: 14px; }

.empty { text-align: center; padding: 28px 12px; color: var(--text-2); }
.empty .big { font-size: 40px; margin-bottom: 8px; }

.roadmap { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.roadmap li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-2); }
.roadmap li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; }
.roadmap li.done { color: var(--text); }
.roadmap li.done::before { background: var(--green); box-shadow: 0 0 0 4px var(--green-dim); }

/* Errores */
.error-page { text-align: center; padding-top: 60px; }
.error-page .code { font-size: 88px; font-weight: 800; color: var(--gold); letter-spacing: -.05em; }

/* =============================================================================
   FASE 2 — Mercado, ficha, ticket, cartera
   ============================================================================= */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head .btn svg { width: 16px; height: 16px; }
.market-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot-live { background: var(--green); box-shadow: 0 0 0 0 rgba(0,200,83,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(0,200,83,0); } 100% { box-shadow: 0 0 0 0 rgba(0,200,83,0); } }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab.active { background: var(--gold-dim); border-color: rgba(212,175,55,.45); color: var(--gold); }

.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); background: transparent; border: 1px solid var(--border); cursor: pointer; font-family: var(--font); }
.chip-btn:hover { text-decoration: none; color: var(--text); }
.chip-btn.active { color: var(--text); background: var(--card-2); border-color: var(--border-strong); }
.input-sm { height: 38px; font-size: 14px; max-width: 220px; border-radius: 10px; }
.chip-flat { color: var(--text-3); background: var(--card-2); }

.instrument-list { list-style: none; margin: 0; padding: 4px 0; }
.instrument-list li + li { border-top: 1px solid var(--border); }
.instrument-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--text); }
.instrument-row:hover { text-decoration: none; background: var(--card-2); }
.ticker-badge {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: -.02em; color: var(--gold);
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900)); border: 1px solid rgba(212,175,55,.25);
}
.ticker-badge.lg { width: 56px; height: 56px; font-size: 14px; border-radius: 16px; }
.ir-main { flex: 1; min-width: 0; display: grid; }
.ir-main b { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ir-main .faint { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-price { display: grid; justify-items: end; gap: 4px; flex: none; }
.ir-price b { font-size: 15px; }
.pill { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--card-2); color: var(--text-2); border: 1px solid var(--border); }
.pill-gold { background: var(--gold-dim); color: var(--gold); border-color: rgba(212,175,55,.35); }
.source-note { font-size: 11px; color: var(--text-3); text-align: center; margin: 12px 0 4px; }
.flash-info { border-color: rgba(79,195,247,.35); background: rgba(79,195,247,.10); }

/* Ficha */
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.back-link svg { width: 18px; height: 18px; }
.asset-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.asset-head h1 { font-size: 28px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asset-price { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.big-price { font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.asset-layout > section > * + * { margin-top: 14px; }
@media (min-width: 1024px) {
  .asset-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .asset-layout > aside { position: sticky; top: 84px; }
}

.chart-card { padding: 14px; }
.chart-ranges { display: flex; gap: 6px; margin-bottom: 8px; }
.chart { position: relative; width: 100%; height: 200px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 13px; color: var(--text-3); padding: 0 16px; }
.chart-tip { position: absolute; top: 0; pointer-events: none; transform: translateX(-50%); padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--card-2); border: 1px solid var(--border-strong); white-space: nowrap; }
.chart-equity { height: 120px; margin: 14px 0 0; }
.chart-equity .chart-empty { color: #A9B4C7; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 0; }
.stat-grid dt { font-size: 12px; color: var(--text-3); }
.stat-grid dd { margin: 2px 0 0; font-weight: 700; }
@media (min-width: 600px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Ticket de operación */
.ticket { display: grid; gap: 14px; }
.ticket .field { margin: 0; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { text-align: center; padding: 10px 8px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s; }
.segmented input:checked + label { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.segmented input:disabled + label { opacity: .4; cursor: not-allowed; }
.segmented input:focus-visible + label { outline: 2px solid var(--gold); }
.side-switch input[value="buy"]:checked + label { background: var(--green); color: #04210f; }
.side-switch input[value="sell"]:checked + label { background: var(--red); color: #fff; }
.segmented-sm label { padding: 7px 8px; font-size: 13px; }
.stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 6px; }
.stepper button { height: 50px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); font-size: 22px; cursor: pointer; }
.stepper .input { text-align: center; font-weight: 700; font-size: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; cursor: pointer; text-decoration: underline; }
.quote { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); font-size: 14px; }
.quote > div { display: flex; justify-content: space-between; gap: 10px; color: var(--text-2); }
.quote > div b { color: var(--text); }
.quote-total { padding-top: 8px; border-top: 1px dashed var(--border-strong); font-size: 16px; }
.quote-total b { font-size: 18px; }
.quote-note { font-size: 12px; color: var(--gold); }
.quote-error { font-size: 13px; color: var(--red); }
.ticket.loading .quote { opacity: .6; }

/* Cartera */
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: grid; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 0; }
.kpi span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.kpi b { font-size: clamp(16px, 4.2vw, 20px); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi small { font-size: 12px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.link-sm { font-size: 13px; font-weight: 600; }
.strong { font-weight: 700; color: var(--text); }
.r { text-align: right; }

.table-wrap { margin: 8px -20px -8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 20px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th.r, .table td.r { text-align: right; }
/* En celulares la tabla se convierte en tarjetas: nada queda cortado */
@media (max-width: 719px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; text-align: left; }
  .table td:first-child { font-size: 16px; margin-bottom: 4px; }
  .table td:first-child::before { content: none; }
}

/* Dashboard */
.equity-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.equity-top .market-meta { color: #A9B4C7; }
.equity-changes { display: flex; gap: 8px; flex-wrap: wrap; }
.tx-link { color: var(--text); }
.tx-link:hover { text-decoration: none; }
.tx-link .r small { font-weight: 600; }
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.movers > div { min-width: 0; }
.movers-label { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.movers-label.up { color: var(--green); } .movers-label.down { color: var(--red); }
.mover { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 0; color: var(--text); font-size: 14px; border-top: 1px solid var(--border); }
.mover:hover { text-decoration: none; }
.mover .chip { font-size: 11px; padding: 3px 6px; }

/* Búsqueda */
.search-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5,11,22,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: max(16px, env(safe-area-inset-top)) 12px 12px; }
.search-overlay[hidden] { display: none; }
.search-box { width: min(560px, 100%); margin-top: 6vh; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); overflow: hidden; animation: slide-in .25s var(--ease); }
.search-input-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.search-input-wrap > svg { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.search-input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--text); font: 600 17px var(--font); outline: none; }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.search-results a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--text); }
.search-results a:hover, .search-results a.focus { background: var(--card-2); text-decoration: none; }
.search-results small { color: var(--text-3); }
.search-google { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.search-google svg { width: 18px; height: 18px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; width: min(460px, calc(100% - 32px));
  padding: 14px 16px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border-strong); box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); font-weight: 600; animation: slide-in .3s var(--ease); }
.toast.win { border-color: rgba(212,175,55,.6); }
@media (min-width: 1024px) { .toast { bottom: 32px; } }

/* =============================================================================
   FASE 3 — Perfil, interruptores, tour
   ============================================================================= */
.profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 18px; align-items: center; }
.profile-avatar label { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; overflow: visible; cursor: pointer;
  background: var(--navy-700); border: 3px solid var(--gold); font-size: 28px; font-weight: 800; color: var(--gold); }
.profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-avatar i { position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; background: var(--card); border: 1px solid var(--border-strong); }
.profile-id { min-width: 0; }
.profile-id h1 { font-size: 22px; overflow-wrap: anywhere; }
.profile-id .faint { font-size: 13px; margin-top: 2px; }
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.level-bar { grid-column: 1 / -1; }
.level-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 6px; flex-wrap: wrap; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
a.avatar:hover { text-decoration: none; }

.settings .field { margin-bottom: 18px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border-strong); transition: background .2s; }
.switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform .25s var(--ease), background .2s; }
.switch input:checked + span { background: var(--gold); border-color: var(--gold); }
.switch input:checked + span::after { transform: translateX(18px); background: #0A1628; }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--gold-dim); }
.switch b { display: block; font-size: 14px; }
.switch small { display: block; font-size: 12px; color: var(--text-3); }

.danger-zone summary { cursor: pointer; font-weight: 700; list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] { border-color: rgba(255,23,68,.35); }
.btn-danger { background: var(--red); color: #fff; }
.btn-link svg { width: 16px; height: 16px; vertical-align: -3px; }

/* Tour interactivo */
.tour-backdrop { position: fixed; inset: 0; z-index: 70; }
.tour-spot { position: fixed; z-index: 71; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 4px var(--gold), 0 0 0 9999px rgba(5,11,22,.72); transition: all .35s var(--ease); }
.tour-card { position: fixed; z-index: 72; width: min(340px, calc(100vw - 32px)); padding: 18px; border-radius: 18px;
  background: var(--bg-elev); border: 1px solid rgba(212,175,55,.45); box-shadow: 0 24px 50px -16px rgba(0,0,0,.7);
  transition: top .35s var(--ease), left .35s var(--ease); animation: slide-in .3s var(--ease); }
.tour-card .tour-step { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.tour-card h3 { font-size: 18px; margin: 6px 0; }
.tour-card p { font-size: 14px; color: var(--text-2); }
.tour-card .tour-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 8px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.tour-dots i.on { background: var(--gold); width: 16px; border-radius: 4px; }
.tour-mascot { font-size: 26px; float: right; margin: -4px 0 0 8px; }

.data-list { margin: 12px 0 0; display: grid; gap: 8px; }
.data-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.data-list dt { color: var(--text-3); }
.data-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }

.btn-google { gap: 10px; }
.btn-google svg { width: 20px; height: 20px; }
.login-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.check a { color: var(--gold); }

/* Páginas legales */
.doc-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px; border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.doc-nav { display: flex; gap: 16px; font-size: 14px; font-weight: 600; }
.doc { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.legal h1 { font-size: 30px; margin: 6px 0 10px; }
.legal h2 { font-size: 18px; margin: 30px 0 8px; color: var(--gold); }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; font-size: 15px; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal b { color: var(--text); }
.legal-meta { font-size: 12px; color: var(--text-3); }
.legal-lead { font-size: 17px !important; color: var(--text) !important; }
.legal-box { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border); }
.legal-box p { font-size: 13px; }
mark.todo { background: rgba(255,193,7,.25); color: var(--text); padding: 0 4px; border-radius: 4px; }

/* Colaborá (donaciones) */
.support { max-width: 560px; margin: 0 auto; display: grid; gap: 16px; }
.support-hero { text-align: center; padding: 8px 0 4px; }
.support-emoji { font-size: 48px; margin-bottom: 8px; animation: pop .7s var(--ease); }
.support-hero h1 { font-size: 26px; margin-bottom: 8px; }
.support-card .btn svg { width: 16px; height: 16px; }
.support-small { font-size: 12px; text-align: center; margin-top: 10px; }
.alias-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); }
.alias-box > div { display: grid; min-width: 0; }
.alias-box b { font-size: 18px; overflow-wrap: anywhere; }
.alias-box .faint { font-size: 12px; }
.support-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }
.support-cta { display: flex; align-items: center; gap: 14px; margin-top: 16px; color: var(--text); }
.support-cta:hover { text-decoration: none; border-color: rgba(212,175,55,.45); }
.support-cta > span { font-size: 26px; }
.support-cta > div { flex: 1; display: grid; }
.support-cta small { font-size: 13px; }
.support-cta svg { width: 18px; height: 18px; color: var(--text-3); }

/* =============================================================================
   ACADEMIA — Carrera Financiera
   ============================================================================= */
.academy-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.academy-hero h2 { font-size: 20px; margin-bottom: 4px; }
.academy-hero-text { flex: 1; min-width: 200px; }
.academy-hero .btn { white-space: normal; text-align: left; height: auto; min-height: 36px; padding: 8px 14px; }
.academy-ring { --p: 0; flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--card-2) 0); position: relative; }
.academy-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--card); }
.academy-ring span { position: relative; font-weight: 800; font-size: 18px; }
.academy-ring.sm { width: 52px; height: 52px; }
.academy-ring.sm::before { inset: 5px; }
.academy-ring.sm span { font-size: 12px; }

.career { display: grid; gap: 14px; }
.career-level { padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  border-top: 3px solid var(--lvl); }
.career-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.career-badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: color-mix(in srgb, var(--lvl) 16%, transparent); }
.career-step { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lvl); }
.career-head h3 { font-size: 17px; }
.career-head .faint { font-size: 13px; }
.career-count { font-weight: 800; color: var(--text-2); }
.career-path { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 6px; }
.career-path::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 3px; border-radius: 3px;
  background: var(--card-2); }
.node { position: relative; }
.node-link { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 0; border-radius: 12px; color: var(--text); margin-left: -22px; }
a.node-link:hover { text-decoration: none; background: var(--card-2); }
.node-dot { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 800;
  position: relative; z-index: 1; background: var(--card-2); border: 3px solid var(--card); }
.node-text { display: grid; min-width: 0; }
.node-text b { font-size: 15px; }
.node-text small { font-size: 12px; color: var(--text-3); }
.node-done .node-dot { background: var(--lvl); color: #0A1628; }
.node-open .node-dot { background: var(--card); border-color: var(--lvl); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lvl) 25%, transparent); animation: pulse-node 2s infinite; }
.node-open .node-text small { color: var(--lvl); font-weight: 700; }
.node-locked { opacity: .5; }
@keyframes pulse-node { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--lvl) 0%, transparent); } }
.career-finish { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-radius: var(--radius); border: 2px dashed var(--border-strong); }
.career-finish > span { font-size: 30px; filter: grayscale(1); opacity: .6; }
.career-finish.is-done { border-style: solid; border-color: var(--gold); background: var(--gold-dim); }
.career-finish.is-done > span { filter: none; opacity: 1; }
.career-finish div { display: grid; }

.library { margin-top: 28px; }
.library h2 { font-size: 20px; margin-bottom: 4px; }
.library-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.resource { display: grid; gap: 6px; color: var(--text); align-content: start; }
.resource:hover { text-decoration: none; border-color: rgba(212,175,55,.45); }
.resource-org { font-size: 12px; font-weight: 700; color: var(--text-3); display: flex; gap: 8px; align-items: center; text-transform: uppercase; letter-spacing: .04em; }
.resource b { font-size: 16px; }
.resource .faint { font-size: 13px; }
.resource-go { font-size: 13px; font-weight: 700; color: var(--gold); display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; }
.resource-go svg { width: 14px; height: 14px; }

/* Lección */
.lesson { max-width: 680px; margin: 0 auto; border-top: 3px solid var(--lvl); }
.lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.lesson-module { font-size: 13px; font-weight: 700; color: var(--lvl); }
.lesson-head { display: flex; gap: 12px; align-items: center; margin: 18px 0 8px; }
.lesson-emoji { font-size: 36px; }
.lesson-head h1 { font-size: 22px; }
.lesson-card { display: none; animation: q-in .4s var(--ease); }
.lesson-card.is-active { display: block; }
.no-js .lesson-card { display: block; margin-top: 24px; }
.lesson-count { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.lesson-card h2 { font-size: 19px; margin-bottom: 10px; }
.lesson-body { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.lesson-body p + p { margin-top: 10px; }
.lesson-body ul { padding-left: 20px; margin: 6px 0; }
.lesson-body b { color: var(--text); }
.takeaway { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--gold-dim); border: 1px solid rgba(212,175,55,.4); font-size: 15px; line-height: 1.6; }
.quiz-q { border: 0; padding: 0; margin: 0 0 18px; }
.quiz-q legend { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.quiz-q .options, .quiz-q { display: grid; gap: 8px; }
.option.is-right label { border-color: var(--green); background: var(--green-dim); }
.option.is-wrong label { border-color: var(--red); background: var(--red-dim); }
.quiz-explain { font-size: 14px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--card-2); }
.quiz-result { padding: 16px; border-radius: 14px; text-align: center; font-weight: 600; }
.quiz-result.ok { background: var(--green-dim); border: 1px solid rgba(0,200,83,.4); }
.quiz-result.ko { background: var(--red-dim); border: 1px solid rgba(255,23,68,.35); }
.quiz-result .big { font-size: 34px; display: block; margin-bottom: 4px; }
.quiz-result ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.practice { display: flex; align-items: center; gap: 12px; color: var(--text); }
.practice:hover { text-decoration: none; border-color: rgba(212,175,55,.45); }
.practice > span { font-size: 24px; }
.practice > div { flex: 1; display: grid; min-width: 0; }
.practice small { font-size: 13px; }
.practice svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.learn-cta { display: flex; align-items: center; gap: 14px; color: var(--text); }
.learn-cta:hover { text-decoration: none; border-color: rgba(212,175,55,.45); }
.learn-cta > div { display: grid; min-width: 0; }
.learn-cta small { font-size: 12px; }
.learn-emoji { font-size: 30px; }

/* =============================================================================
   FASE 4 — Juego: cofre, misiones, ranking, logros, Ver y ganar, notificaciones
   ============================================================================= */
.streak-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #FF9100; background: rgba(255,145,0,.12); border: 1px solid rgba(255,145,0,.3); }
.streak-chip:hover { text-decoration: none; }

.chest { border-color: rgba(212,175,55,.35); background: radial-gradient(500px 160px at 100% 0%, rgba(212,175,55,.14), transparent 70%), var(--card); }
.chest.is-claimed { border-color: var(--border); background: var(--card); }
.chest-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.chest-head .btn { animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(4deg); } }
.chest-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.chest-week li { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border); min-width: 0; }
.chest-week span { font-size: 18px; }
.chest-week small { font-size: 10px; color: var(--text-3); }
.chest-week b { font-size: 10px; white-space: nowrap; }
.chest-week .cw-past, .chest-week .cw-claimed { opacity: .55; }
.chest-week .cw-today { border-color: var(--gold); background: var(--gold-dim); box-shadow: 0 0 0 3px var(--gold-dim); }
.chest-week .cw-big { border-style: dashed; border-color: rgba(212,175,55,.5); }
@media (max-width: 359px) { .chest-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.missions ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.missions li a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-2); color: var(--text); font-size: 14px; font-weight: 600; }
.missions li a:hover { text-decoration: none; }
.missions li.done a { color: var(--text-3); text-decoration: line-through; }

.countdown { font-size: 13px; font-weight: 700; color: var(--gold); }
.countdown.sm { font-size: 12px; }
.rank-mini { display: grid; gap: 4px; color: var(--text); }
.rank-mini:hover { text-decoration: none; border-color: rgba(212,175,55,.45); }
.rank-mini-me { font-size: 14px; margin: 6px 0 4px; }

#alertas .tx-main b, .notif .tx-main b { white-space: normal; overflow: visible; line-height: 1.3; }
.rank-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.rank-hero b { font-size: 18px; white-space: nowrap; }
.rank-hero .rank-prizes { justify-content: space-around; padding: 10px 0; border-block: 1px solid var(--border, rgba(255,255,255,.08)); }
@media (min-width: 720px) { .rank-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .rank-hero .rank-prizes { border: 0; gap: 22px; } }
.rank-prizes { display: flex; gap: 10px; }
.rank-prizes div { display: grid; justify-items: center; font-size: 12px; }
.rank-prizes span { font-size: 22px; }
.rank-me { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; border-color: rgba(212,175,55,.45); background: var(--gold-dim); }
.rank-me.is-pending { background: var(--card); border-color: var(--border); }
.rk-pos { font-weight: 800; font-size: 18px; min-width: 44px; text-align: center; }
.rk-who { display: grid; min-width: 0; }
.rk-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-who small { font-size: 12px; }
.rk-move { font-size: 11px; font-weight: 700; margin-left: 4px; }
.rank-list { list-style: none; margin: 0; padding: 4px 0; }
.rank-list li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; }
.rank-list li + li { border-top: 1px solid var(--border); }
.rank-list li.is-me { background: var(--gold-dim); }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-bottom: 14px; }
.pod { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.pod b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .num { font-size: 13px; font-weight: 700; }
.pod-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--gold); background: var(--navy-700); border: 3px solid var(--gold); overflow: hidden; }
.pod-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pod-1 .pod-avatar { width: 64px; height: 64px; }
.pod-step { width: 100%; display: grid; place-items: center; font-size: 26px; border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--border); border-bottom: 0; }
.pod-1 .pod-step { height: 74px; border-color: rgba(212,175,55,.5); } .pod-2 .pod-step { height: 54px; } .pod-3 .pod-step { height: 40px; }

.streaks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.streak { display: grid; justify-items: center; gap: 2px; padding: 14px 6px; text-align: center; }
.streak span { font-size: 24px; } .streak b { font-size: 22px; } .streak small { font-size: 11px; color: var(--text-3); }
@media (max-width: 420px) { .streaks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ach-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .ach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .ach-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 340px) { .ach-grid { grid-template-columns: 1fr; } }
.ach { display: grid; gap: 4px; justify-items: start; opacity: .55; filter: grayscale(.7); }
.ach.is-on { opacity: 1; filter: none; }
.ach-ico { font-size: 30px; }
.ach b { font-size: 15px; }
.ach small { font-size: 12px; }
.ach-meta { margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--text-3); }
.ach.is-on .ach-meta { color: var(--green); }
.ach.is-on.tier-gold { border-color: rgba(212,175,55,.5); } .ach.is-on.tier-diamond { border-color: rgba(79,195,247,.6); }

.ads-cap-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ads-cap-head b { font-size: 22px; }
.ads-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
@media (max-width: 520px) { .ads-grid { grid-template-columns: 1fr; } }
.ad-tier { display: grid; justify-items: center; gap: 4px; padding: 20px 10px; cursor: pointer; font: inherit; color: var(--text); text-align: center; transition: transform .15s, border-color .2s; }
.ad-tier:hover:not(:disabled) { border-color: rgba(212,175,55,.5); transform: translateY(-2px); }
.ad-tier:disabled { opacity: .5; cursor: not-allowed; }
.ad-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #0A1628; font-size: 18px; }
.ad-reward { font-weight: 800; color: var(--gold); font-size: 18px; }
.ad-player { position: fixed; inset: 0; z-index: 80; background: rgba(5,11,22,.92); display: grid; place-items: center; padding: 16px; }
.ad-box { width: min(420px, 100%); display: grid; gap: 12px; }
.ad-screen { aspect-ratio: 16 / 9; border-radius: 16px; display: grid; place-content: center; text-align: center; gap: 6px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); border: 1px solid var(--border-strong); }
.ad-screen b { font-size: 18px; }
.ad-count { font-size: 44px; font-weight: 800; color: var(--gold); }

.bell { position: relative; }
.bell:hover { text-decoration: none; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif.is-new { background: var(--gold-dim); border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.push-cta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.push-cta > span { font-size: 26px; }
.push-cta > div { flex: 1; display: grid; min-width: 180px; }
.alert-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.alert-form .input-sm { max-width: none; }
@media (max-width: 360px) { .alert-form { grid-template-columns: 1fr 1fr; } .alert-form .btn { grid-column: 1 / -1; } }

.celebrate { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(5,11,22,.75); backdrop-filter: blur(4px); }
.celebrate-box { width: min(380px, 100%); padding: 24px; border-radius: 22px; background: var(--bg-elev); border: 1px solid rgba(212,175,55,.5);
  box-shadow: var(--shadow-gold); display: grid; gap: 16px; text-align: center; animation: pop .6s var(--ease); max-height: 90vh; overflow-y: auto; }
.celebrate-item { display: grid; justify-items: center; gap: 4px; }
.celebrate-emoji { font-size: 52px; }
.celebrate-item b { font-size: 19px; }

/* =============================================================================
   PANEL DE ADMINISTRACIÓN (Fase 5)
   ============================================================================= */
.is-admin .app { padding-bottom: 0; }
.admin-badge { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold);
  background: var(--gold-dim); border: 1px solid rgba(212,175,55,.35); padding: 3px 8px; border-radius: 6px; }
.sidebar .admin-badge { margin: -14px 8px 16px; align-self: flex-start; }
.admin-topbar { justify-content: flex-start; }
.admin-topbar .topbar-right { margin-left: auto; }
.admin-topbar form { display: contents; }
.admin-tabs { padding: 10px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); margin: 0; border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.side-btn { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; }
@media (min-width: 1024px) { .admin-tabs { display: none; } .admin-topbar .admin-badge { display: none; } }
.admin-content .card-title { margin-bottom: 12px; }
.admin-content .card-head .card-title { margin-bottom: 0; }
.admin-content .card-head { margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { display: contents; }
.pill-green { background: var(--green-dim); color: var(--green); border-color: rgba(0,200,83,.35); }
.pill-red { background: var(--red-dim); color: var(--red); border-color: rgba(255,23,68,.35); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; font-size: 13px; }

/* KPIs */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.kpis .kpi { gap: 4px; color: var(--text); }
a.kpi:hover { text-decoration: none; border-color: var(--border-strong); }
.kpis .kpi > span { text-transform: uppercase; letter-spacing: .05em; }
.kpis .kpi b { font-size: clamp(20px, 5vw, 24px); }
.kpis .kpi small { font-weight: 500; line-height: 1.35; }

/* Mini gráficos de barras (una serie cada uno: sin leyenda, el título la nombra) */
.mini-charts { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.mini-chart { margin: 0; min-width: 0; }
.mini-chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.mini-chart figcaption b { color: var(--text); font-size: 18px; }
.mini-chart svg { display: block; width: 100%; height: 86px; overflow: visible; }
.mini-chart .base { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mini-chart .mark { fill: var(--gold); opacity: .85; }
.mini-chart .hit { fill: transparent; }
.mini-chart .bar:hover .mark { opacity: 1; }
.mini-chart .bar:hover .hit { fill: var(--gold-dim); }
.mini-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 6px; }
.table-toggle { margin-top: 14px; font-size: 13px; }
.table-toggle summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.table-toggle .table-wrap { margin-top: 8px; max-height: 320px; overflow: auto; }

/* Embudo */
.funnel-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 7px 0; font-size: 14px; border-top: 1px solid var(--border); }
.funnel-row:first-of-type { border-top: 0; }
.meter { grid-column: 1 / -1; height: 6px; background: var(--card-2); border-radius: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 6px; }

/* Chequeos de salud */
.health-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.health-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.health-list li:first-child { border-top: 0; }
.health-list li > div { min-width: 0; display: grid; gap: 2px; }
.health-list b { font-weight: 600; }
.health-list small { font-size: 12px; overflow-wrap: anywhere; }
.h-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.h-ok .h-ico { background: var(--green-dim); color: var(--green); }
.h-warn .h-ico { background: var(--card-2); color: var(--text-2); }
.h-todo .h-ico { background: var(--gold-dim); color: var(--gold); }
.h-ok b { color: var(--text-2); font-weight: 500; }

/* Filtros */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-bar .input { flex: 1 1 160px; min-width: 0; height: 44px; }
.filter-bar .input[type=search] { flex: 2 1 240px; }
.filter-bar .btn { flex: none; }
.filter-bar .check { flex: none; }

/* Tablas del panel en celular: etiqueta a la izquierda, valores a la derecha */
.admin-content .table td::before { margin-right: auto; }
.admin-content .table td { flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) { .admin-content .table td:first-child::before { display: none; } .admin-content .table td:first-child { justify-content: flex-start; } }
/* Usuarios */
.user-cell { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.user-cell:hover { text-decoration: none; }
.user-cell > span:last-child { min-width: 0; display: grid; }
.user-cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-cell small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; flex: none; }
.user-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; margin-bottom: 16px; }
.user-head h1 { font-size: 22px; overflow-wrap: anywhere; }
.user-head p { font-size: 13px; overflow-wrap: anywhere; }
.user-head-main { min-width: 0; }
.user-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px 16px; margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.user-facts dt { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.user-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }
.admin-detail { align-items: start; }
@media (min-width: 1100px) { .admin-detail { grid-template-columns: minmax(0, 1fr) 340px; } }
.admin-actions form { display: grid; gap: 10px; }
.admin-actions .card > form + form { margin-top: 12px; }
.admin-actions .btn-row form { display: contents; }
.money-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.money-row select { width: 64px; }
.money-row select[hidden] + .input { grid-column: 1 / -1; }
.money-row .btn { height: 50px; }
.danger-zone { border-color: rgba(255,23,68,.28); }
.audit-row { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.audit-row:first-of-type { border-top: 0; }
.audit-row small { font-size: 12px; overflow-wrap: anywhere; }
textarea.input { height: auto; padding-top: 12px; padding-bottom: 12px; resize: vertical; line-height: 1.45; }
.log-list .tx { align-items: center; }
.log-list .tx-main span { white-space: normal; }
.log-list .tx-main b { white-space: normal; }
.radio-list { display: grid; gap: 8px; }

/* Ranking */
.period-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.period-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; color: var(--text); }
.period-list a:hover { text-decoration: none; background: var(--card-2); }
.period-list a.active { background: var(--gold-dim); }
.period-list a > span:first-child { display: grid; min-width: 0; }
.period-list small { font-size: 12px; }

/* Mercado */
.instr-list { display: grid; }
.instr { border-top: 1px solid var(--border); }
.instr:first-child { border-top: 0; }
.instr summary { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 12px 0; cursor: pointer; list-style: none; }
.instr summary::-webkit-details-marker { display: none; }
.instr summary::after { content: '▾'; color: var(--text-3); margin-left: 4px; }
.instr[open] summary::after { content: '▴'; }
.instr-main { min-width: 0; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.instr-side { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.instr-body { display: grid; gap: 10px; padding: 0 0 16px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--card-2); }
.inline-form .input-sm { flex: 1 1 140px; max-width: none; background: var(--card); }
.inline-form .input-xs { flex: 0 0 64px; text-align: center; }
.inline-form .check { font-size: 13px; }

/* Configuración */
.settings-form { display: grid; gap: 0; }
.setting { display: grid; gap: 10px 24px; padding: 16px 0; border-top: 1px solid var(--border); }
.setting:first-of-type { border-top: 0; }
@media (min-width: 900px) { .setting { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.setting-label { display: grid; gap: 4px; min-width: 0; }
.setting-label label { font-weight: 600; font-size: 14px; }
.setting-label small { font-size: 12px; line-height: 1.4; }
.setting-input { display: grid; gap: 6px; min-width: 0; }
.setting.has-error .input { border-color: var(--red); }
.affix { display: flex; align-items: stretch; }
.affix > span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border); background: var(--card-2); color: var(--text-2); font-weight: 600; }
.affix > span:first-child { border-radius: 12px 0 0 12px; border-right: 0; }
.affix .input { border-radius: 0 12px 12px 0; min-width: 0; }
.affix-end .input { border-radius: 12px 0 0 12px; }
.affix-end > span { border-radius: 0 12px 12px 0; border-left: 0; border-right: 1px solid var(--border); }
.mini-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); }
.mini-grid.cols-7 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 92px), 1fr)); }
.mini-grid label { display: grid; gap: 4px; min-width: 0; align-content: end; }
.mini-grid small, .prize-table small, .tier-table small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.prize-table { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.tier-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 46px; height: 26px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-3); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + span { background: var(--gold-dim); border-color: var(--gold); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--gold); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch em { font-style: normal; font-weight: 600; }
.settings-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0 4px; margin-top: 8px; border-top: 1px solid var(--border);
  background: linear-gradient(to top, var(--card) 80%, transparent); }
@media (max-width: 360px) { .prize-table { grid-template-columns: repeat(3, minmax(0, 1fr)); } .prize-table > span:first-child { display: none; }
  .prize-table > small:nth-child(4n+5) { grid-column: 1 / -1; margin-top: 4px; } .settings-actions .btn { flex: 1; } }

.cleanup { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 16px; font-size: 14px; border-color: rgba(212,175,55,.3); }
.cleanup > span { flex: 1 1 260px; }
.ad-box { margin: 16px 0; padding: 8px; border-radius: var(--radius); border: 1px dashed var(--border-strong); min-height: 60px; }
.ad-label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.verify-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; margin-bottom: 16px; border-radius: 14px;
  background: rgba(79,195,247,.10); border: 1px solid rgba(79,195,247,.35); font-size: 14px; }
.verify-bar > span { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.live-stack { position: fixed; z-index: 95; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 24px));
  display: grid; gap: 8px; pointer-events: none; }
.live-note { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px;
  background: var(--bg-elev); border: 1px solid rgba(212,175,55,.45); box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); color: var(--text);
  opacity: 0; transform: translateY(-12px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.live-note.in { opacity: 1; transform: none; }
.live-note:hover { text-decoration: none; }
.ln-ico { font-size: 22px; }
.ln-txt { display: grid; gap: 2px; min-width: 0; }
.ln-txt b { font-size: 14px; }
.ln-txt small { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-cta { position: relative; padding-right: 40px; }
@keyframes flashUp { from { background: var(--green-dim); color: var(--green); } to { background: transparent; } }
@keyframes flashDown { from { background: var(--red-dim); color: var(--red); } to { background: transparent; } }
.flash-up { animation: flashUp 1.6s var(--ease); border-radius: 6px; }
.flash-down { animation: flashDown 1.6s var(--ease); border-radius: 6px; }
/* Guía del panel */
.help-link { float: right; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 8px 12px; }
.help-link svg { width: 16px; height: 16px; }
.help-link:hover { color: var(--gold); text-decoration: none; }
.guide-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; line-height: 1.5; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.guide-sec { margin-top: 16px; scroll-margin-top: 90px; font-size: 14px; line-height: 1.55; }
.guide-sec p { margin: 0 0 10px; color: var(--text-2); }
.guide-sec p b { color: var(--text); }
.guide-sec .btn { margin-top: 4px; }
.guide-grid { display: grid; gap: 0 16px; }
@media (min-width: 900px) { .guide-grid { grid-template-columns: 1fr 1fr; } }
.guide-sec details { border-top: 1px solid var(--border); padding: 10px 0; }
.guide-sec details:first-of-type { border-top: 0; }
.guide-sec summary { cursor: pointer; font-weight: 600; color: var(--text); }
.guide-sec ol { margin: 10px 0 2px; padding-left: 22px; display: grid; gap: 6px; color: var(--text-2); }
.g-cant b { color: var(--red) !important; }
.g-can b { color: var(--green) !important; }
.guide-sec code { font-family: var(--mono); font-size: 12px; background: var(--card-2); padding: 1px 6px; border-radius: 6px; }

/* =============================================================================
   APP INSTALABLE (PWA)
   ============================================================================= */
.install-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; position: relative; padding-right: 36px; }
.install-card img { border-radius: 12px; }
.install-card > div { display: grid; gap: 2px; min-width: 0; }
.install-card small { font-size: 12px; }
.install-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-radius: 8px; }
.install-x:hover { background: var(--card-2); color: var(--text); }
@media (max-width: 360px) { .install-card { grid-template-columns: auto minmax(0, 1fr); } .install-card .btn { grid-column: 1 / -1; } }
.install-page { display: grid; gap: 16px; text-align: center; }
.install-icon { justify-self: center; border-radius: 22px; box-shadow: var(--shadow-gold); }
.install-steps { display: grid; gap: 12px; text-align: left; }
.install-steps h2 { font-size: 16px; margin-bottom: 8px; }
.install-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.install-steps .is-mine { border-color: rgba(212,175,55,.45); }
.install-done { color: var(--green); font-weight: 600; font-size: 14px; }
.app-card .btn-row .btn { flex: 1 1 160px; }
@media (display-mode: standalone) { .topbar { padding-top: max(12px, env(safe-area-inset-top)); } }

/* Cartel "Instalá la app" (arriba de todo) */
.install-banner { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 44px 10px max(16px, env(safe-area-inset-left)); background: linear-gradient(90deg, rgba(212,175,55,.22), rgba(212,175,55,.08));
  border-bottom: 1px solid rgba(212,175,55,.35); color: var(--text); z-index: 25; }
.install-banner img { border-radius: 9px; }
.install-banner > span { display: grid; min-width: 0; line-height: 1.25; font-size: 14px; }
.install-banner small { font-size: 12px; color: var(--text-2); }
.install-banner .install-x { top: 50%; transform: translateY(-50%); right: 8px; }
.guest > .install-banner, body > .install-banner { grid-column: 1 / -1; }
@media (max-width: 340px) { .install-banner small { display: none; } }

/* Invitá y ganá */
.invite-mini { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; color: var(--text);
  border-color: rgba(212,175,55,.35); background: linear-gradient(135deg, var(--gold-dim), var(--card) 60%); }
.invite-mini:hover { text-decoration: none; }
.invite-mini > div { display: grid; gap: 2px; min-width: 0; }
.invite-mini small { font-size: 12px; }
.invite-emoji { font-size: 30px; }
.invite-hero { display: grid; gap: 16px; border-color: rgba(212,175,55,.3); }
.invite-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invite-stats > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); min-width: 0; }
.invite-stats span { font-size: 12px; font-weight: 600; }
.invite-stats b { font-size: clamp(20px, 6vw, 28px); overflow-wrap: anywhere; }
.invite-stats small { font-size: 12px; }
.invite-next .level-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-bottom: 6px; }
.invite-link { display: grid; gap: 6px; }
.invite-link label { font-size: 13px; }
.code-pill { font-family: var(--mono); color: var(--gold); background: var(--gold-dim); padding: 1px 8px; border-radius: 6px; letter-spacing: .06em; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.copy-row .input { font-size: 14px; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.invite-actions .btn { flex: 1 1 180px; }
.btn-whatsapp { background: #25D366; color: #06290F; }
.btn-whatsapp:hover { filter: brightness(1.05); text-decoration: none; }
.invite-card canvas { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); background: var(--card-2); aspect-ratio: 1080 / 1350; }
.milestones { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.milestones li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font-size: 14px; }
.milestones li.next { outline: 1px solid rgba(212,175,55,.5); }
.milestones li.done b { color: var(--green); }
.ms-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--card); border: 1px solid var(--border-strong); }
.milestones li.done .ms-ico { background: var(--green-dim); color: var(--green); border-color: transparent; }
.invite-rules { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.ref-landing { display: grid; gap: 14px; text-align: center; }
.ref-avatar { position: relative; justify-self: center; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; font-weight: 800;
  color: var(--gold); background: var(--navy-700); border: 3px solid var(--gold); }
.ref-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ref-avatar span { position: absolute; right: -6px; bottom: -4px; font-size: 28px; }
.ref-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.ref-perks li { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); font-size: 14px; }

/* =============================================================================
   PÁGINAS PÚBLICAS (inicio y Academia abierta)
   ============================================================================= */
.is-public { background: var(--bg); }
.pub-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left)); }
.pub-header .brand span { display: none; }
@media (min-width: 560px) { .pub-header .brand span { display: inline; } }
.pub-nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; font-weight: 600; }
.pub-nav a:not(.btn) { color: var(--text-2); }
.pub-main { max-width: 1100px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); display: grid; gap: 28px; }
.pub-hero { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 24px 0 4px; }
.pub-hero h1 { font-size: clamp(32px, 8vw, 58px); line-height: 1.05; letter-spacing: -.03em; max-width: 820px; }
.pub-hero h1 em { font-style: normal; color: var(--gold); }
.pub-hero .lead { max-width: 680px; color: var(--text-2); font-size: clamp(15px, 3.6vw, 18px); line-height: 1.55; }
.free-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--green-dim); color: var(--green); font-weight: 700; font-size: 13px; }
.pub-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pub-features { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.pub-features .card { display: grid; gap: 8px; }
.pub-features span { font-size: 30px; }
.pub-features h2 { font-size: 18px; }
.pub-features p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.pub-steps h2, .pub-academy > h2 { font-size: 22px; text-align: center; margin-bottom: 14px; }
.pub-steps ol { max-width: 640px; margin: 0 auto; display: grid; gap: 10px; padding-left: 22px; color: var(--text-2); line-height: 1.5; }
.pub-modules { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pub-modules .card { border-top: 3px solid var(--lvl, var(--gold)); }
.pub-modules h2, .pub-modules h3 { font-size: 17px; margin-bottom: 4px; }
.pub-modules p { font-size: 13px; margin-bottom: 10px; }
.pub-modules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.pub-modules a { color: var(--text); }
.pub-crumbs { font-size: 13px; color: var(--text-3); }
.pub-lesson { max-width: 760px; width: 100%; justify-self: center; border-top: 3px solid var(--lvl, var(--gold)); display: grid; gap: 18px; }
.pub-lesson header { display: grid; gap: 6px; }
.pub-lesson h1 { font-size: clamp(24px, 6vw, 34px); letter-spacing: -.02em; }
.pub-lesson h2 { font-size: 18px; margin-bottom: 6px; }
.pub-lesson .lesson-body { color: var(--text-2); line-height: 1.6; font-size: 15px; }
.pub-practice { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; border-radius: 14px; background: var(--gold-dim); font-size: 14px; }
.pub-practice .btn { margin-left: auto; }
.pub-pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; max-width: 760px; width: 100%; justify-self: center; }
.pub-final { padding: 28px 16px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--gold-dim), transparent); }
.pub-final h2 { font-size: clamp(22px, 5vw, 30px); }
.pub-foot { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; text-align: center; display: grid; gap: 10px; }
.pub-foot nav { display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; font-size: 13px; }
.pub-foot a { color: var(--text-2); }

/* =============================================================================
   RESPONSIVE: de 280px (Galaxy Fold cerrado) a escritorio, centrado siempre
   ============================================================================= */

/* Pantallas muy angostas (Fold cerrado, celulares chicos) */
@media (max-width: 359px) {
  body { font-size: 14px; }
  .guest h1 { font-size: 24px; }
  .q-text { font-size: 19px; }
  .option label { padding: 13px 12px; gap: 10px; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .equity-card { padding: 20px 16px; }
  .equity-split { grid-template-columns: 1fr; gap: 10px; }
  .topbar-right { gap: 6px; }
  .topbar .icon-btn[data-theme-toggle] { display: none; }   /* sigue disponible en Perfil */
  .cash-pill { padding: 0 10px; font-size: 13px; }
  .hello { flex-wrap: wrap; align-items: flex-start; }
  .nav-item span { font-size: 10px; }
  .ticker-row:nth-child(2), .ticker-row:nth-child(3) { margin-left: 0; }
}

/* Tablet / plegable abierto (Z Fold, Pixel Fold, iPad mini) sin sidebar:
   una columna centrada y legible, sin estirarse de borde a borde */
@media (min-width: 600px) and (max-width: 1023px) {
  .content { max-width: 720px; }
  .bottom-nav { left: 50%; right: auto; width: min(560px, 100%); transform: translateX(-50%);
    border: 1px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; }
  .guest-main { max-width: 520px; justify-content: center; }
}

/* Escritorio grande: el contenido no se desparrama */
@media (min-width: 1600px) {
  .content { max-width: 1320px; }
}

/* Celular en horizontal (poca altura) */
@media (max-height: 500px) and (orientation: landscape) {
  .guest-main { justify-content: flex-start; }
  .result-badge { width: 72px; height: 72px; font-size: 36px; border-radius: 22px; }
  .q-emoji { font-size: 28px; margin-bottom: 6px; }
}

/* Plegables con bisagra / doble pantalla (Viewport Segments API):
   cada mitad muestra un bloque completo y nada cae sobre la bisagra */
@media (horizontal-viewport-segments: 2) {
  .guest { grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0);
    column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); }
  .guest-aside { display: flex; padding: 32px; }
  .guest-main > .brand { display: none; }
  .dash { grid-template-columns: 1fr 1fr;
    column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + 32px); }
}
@media (vertical-viewport-segments: 2) {
  /* Plegado tipo "laptop": todo arriba, nada cortado por el pliegue */
  .guest-main, .content { max-height: env(viewport-segment-height 0 0); overflow-y: auto; }
}

/* Confetti canvas */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.btn-sell { background: linear-gradient(180deg, #ff5a78, var(--red)); color: #fff; box-shadow: 0 10px 30px -10px rgba(255,23,68,.45); }

/* ---------------------------------------------------------------- Cauciones */
.caucion-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .caucion-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.range { width: 100%; accent-color: var(--gold); height: 28px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2); }
.closed-banner { display: flex; gap: 12px; align-items: flex-start; }
.closed-banner .why { font-weight: 700; }

/* ---------------------------------------------------------------- Bienvenida (celular) y guías con premio */
.welcome-sheet { position: fixed; inset: 0; z-index: 75; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 10, 20, .55); padding: 16px; animation: fadeIn .25s var(--ease); }
.ws-card { position: relative; width: min(420px, 100%); padding: 26px 20px 18px; border-radius: 22px; background: var(--card);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,.4)); text-align: center;
  margin-bottom: max(8px, env(safe-area-inset-bottom)); animation: sheetUp .35s var(--ease); }
.ws-card .tour-mascot { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); }
.ws-card h3 { font-size: 20px; margin: 8px 0 6px; }
.ws-card p { color: var(--text-2); font-size: 15px; margin-bottom: 16px; }
.ws-actions { display: grid; gap: 8px; justify-items: center; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 900px) { .welcome-sheet { align-items: center; } }

.guides-card .guide-list { display: grid; gap: 8px; margin-top: 10px; }
.guide-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; }
.guide-item:hover { text-decoration: none; border-color: var(--border-strong); }
.guide-item small { margin-left: auto; color: var(--gold); font-weight: 700; }
.guide-item.is-done { opacity: .6; }
.guide-item.is-done small { color: var(--green); }

/* ---------------------------------------------------------------- Mercado cerrado: el juego sigue */
.closed-play .cp-head { display: flex; gap: 10px; align-items: flex-start; }
.closed-play .cp-head span { font-size: 26px; line-height: 1; }
.cp-grid { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 600px) { .cp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cp-tile { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); color: var(--text); }
.cp-tile:hover { text-decoration: none; border-color: var(--gold); }
.cp-tile b { font-size: 14px; }
.cp-tile small { color: var(--text-3); font-size: 12px; }
.cp-tile .e { font-size: 22px; }
.courses { margin-top: 28px; }
.courses h2 { font-size: 20px; margin-bottom: 4px; }
.editor-block { border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin: 0 0 10px; display: grid; gap: 8px; }
.editor-block legend { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 0 6px; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row input[type=radio] { accent-color: var(--green); width: 18px; height: 18px; flex: none; }
.equity-split .v a { color: inherit; text-decoration: underline dotted; }
.rate-list { display: grid; margin-top: 8px; }
.rate-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; align-items: center; }
.rate-row > :nth-child(2) { min-width: 64px; text-align: right; }
.rate-row > :nth-child(3) { min-width: 96px; text-align: right; }
.rate-head { border-top: 0; font-size: 12px; color: var(--text-3); font-weight: 600; padding-top: 0; }
.tx-main b.wrap { white-space: normal; }

/* ---------------------------------------------------------------- Vista simple (estilo home broker, sin perder lo divertido) */
.qtable { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.qtable th { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.qtable td { padding: 10px 4px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.qtable tr:last-child td { border-bottom: 0; }
.qtable .r { text-align: right; }
.qtable td small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.qtable td a { color: var(--text); }
.qtable tr[data-href] { cursor: pointer; }
.qtable tr[data-href]:hover td { background: var(--card-2); }
.qtable .tx-emoji { margin-right: 6px; }
.qtable td:first-child { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { .hide-sm { display: none; } }

.note-bar { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.note-bar p { margin: 0; }
.note-bar b { color: var(--text); }

.today { padding: 12px; }
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.today-cell { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--card-2); color: var(--text); text-align: center; min-width: 0; }
.today-cell:hover { text-decoration: none; }
.today-cell small { font-size: 11px; color: var(--text-3); }
.today-cell b { font-size: 16px; }
.today-cell .btn { margin-top: 2px; padding: 5px 10px; font-size: 12px; }
.today-cell.is-ready { box-shadow: inset 0 0 0 1px rgba(212,175,55,.5); }
.today-ico { font-size: 22px; line-height: 1.1; }
.today-more { margin-top: 10px; }
.today-more summary { cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 600; padding: 4px 2px; }
.simple-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.simple-list a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-2); color: var(--text); font-size: 14px; }
.simple-list li.done a { opacity: .6; text-decoration: line-through; }

.menu-list { display: grid; margin-top: 6px; }
.menu-list a { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px; }
.menu-list a:last-child { border-bottom: 0; }
.menu-list a:hover { text-decoration: none; color: var(--gold); }
.menu-list a b { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-list a small { color: var(--text-3); font-weight: 700; }
.menu-list a small.gold { color: var(--gold); }
.menu-list a::after { content: '›'; color: var(--text-3); font-size: 18px; margin-left: 4px; }
.menu-list a.is-done { display: none; }

/* Mercado como tabla de broker: en compu se ven puntas, anterior, mín, máx y monto */
.market-table .ir-head { display: none; }
.market-table .ir-col { display: none; }
@media (min-width: 900px) {
  .market-table .ir-head, .market-table .instrument-row { display: grid; grid-template-columns: minmax(150px, 1.7fr) repeat(8, minmax(64px, 1fr)); gap: 10px; align-items: center; }
  .market-table .ir-head { padding: 10px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
  .market-table .ir-head span:not(:first-child), .market-table .ir-col { text-align: right; }
  .market-table .instrument-row { padding: 9px 16px; }
  .market-table .ir-price { display: contents; }
  .market-table .ir-price b, .market-table .ir-price .chip { justify-self: end; }
  .market-table .ir-col { display: block; font-size: 13px; color: var(--text-2); }
  .market-table .ir-bid { color: var(--green); }
  .market-table .ir-ask { color: var(--red); }
}
.puntas { display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; margin-bottom: 12px; }
.puntas > div { display: grid; gap: 2px; padding: 12px 14px; }
.puntas small { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.puntas b { font-size: 18px; }
.puntas .p-buy { background: var(--green-dim); }
.puntas .p-buy b { color: var(--green); }
.puntas .p-sell { background: var(--red-dim); }
.puntas .p-sell b { color: var(--red); }
.qtable td.r { white-space: nowrap; }

/* ---------------------------------------------------------------- Inicio en solapas (celular) */
.dash-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tabs button { flex: 1 0 auto; border: 0; background: transparent; color: var(--text-2); font: 600 13px/1 var(--font); padding: 10px 10px; border-radius: 10px; cursor: pointer; white-space: nowrap; position: relative; }
.dash-tabs button.is-active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.dot-badge { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); vertical-align: 6px; margin-left: 2px; }
@media (max-width: 1023px) {
  .dash-panel:not(.is-active) { display: none; }
  .dash-panel { animation: fadeIn .2s var(--ease); }
}
@media (min-width: 1024px) { .dash-tabs { display: none; } }
.start-card { margin-bottom: 16px; }

/* ---------------------------------------------------------------- Perfil en desplegables (como Ajustes) */
.acc-list { display: grid; gap: 8px; }
.acc { border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.acc > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: '›'; margin-left: auto; font-size: 20px; color: var(--text-3); transition: transform .2s var(--ease); }
.acc[open] > summary::after { transform: rotate(90deg); }
.acc > summary > span:nth-child(2) { display: grid; min-width: 0; }
.acc > summary b { font-size: 15px; }
.acc > summary small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); font-size: 18px; flex: none; }
.acc-body { padding: 0 16px 16px; border-top: 1px solid var(--border); padding-top: 14px; }
@media (min-width: 900px) { .acc-list { grid-template-columns: 1fr 1fr; align-items: start; } }
.dash-tabs button { flex: 1 1 0; padding: 10px 4px; font-size: 12.5px; }

/* Inicio: capital más compacto en el celular y pie discreto */
@media (max-width: 599px) {
  .equity-card { padding: 18px; }
  .equity-card .value { font-size: 30px; margin: 4px 0 8px; }
  .equity-split { margin-top: 12px; padding-top: 12px; }
  .equity-split .v { font-size: 15px; }
}
.dash-foot { display: grid; justify-items: center; gap: 10px; margin: 26px 0 8px; }
.donate-link { font-size: 13px; color: var(--text-3); }
.donate-link:hover { color: var(--gold); text-decoration: none; }
.logout-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--text-3); font: 500 12px var(--font); cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.logout-link:hover { color: var(--red); background: var(--card-2); }
.logout-link svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- Academia: trofeos arriba, lo pendiente primero */
.trophy-shelf { margin-bottom: 14px; }
.shelf { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.trophy { flex: 0 0 86px; display: grid; justify-items: center; text-align: center; gap: 2px; color: var(--text); scroll-snap-align: start; }
.trophy:hover { text-decoration: none; }
.trophy:hover .medal { transform: translateY(-2px) rotate(-4deg); }
.trophy b { font-size: 12px; line-height: 1.2; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trophy small { font-size: 10px; color: var(--text-3); max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medal { display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); transition: transform .25s var(--ease); }
.medal.is-locked { filter: grayscale(1); opacity: .5; }
.next-lesson { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--text); border: 1px solid rgba(212,175,55,.45); }
.next-lesson:hover { text-decoration: none; border-color: var(--gold); }
.nl-emoji { font-size: 30px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-dim); flex: none; }
.nl-text { flex: 1; min-width: 0; display: grid; }
.nl-text small { font-size: 12px; color: var(--text-3); }
.nl-text b { font-size: 16px; }
.academy-block { margin-bottom: 22px; }
.ab-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.ab-head h2 { font-size: 18px; }
.career-level.is-compact { padding: 12px 16px; box-shadow: none; }
.career-level.is-compact .career-head { margin-bottom: 0; }
.career-level.is-compact .career-badge { width: 38px; height: 38px; font-size: 19px; }
.career-level.is-compact h3 { font-size: 15px; }
.career-level.is-locked { opacity: .6; }
details.career-level > summary { list-style: none; cursor: pointer; }
details.career-level > summary::-webkit-details-marker { display: none; }
details.career-level[open] > summary { margin-bottom: 12px; }
details.career-level > summary .career-count::after { content: ' ›'; color: var(--text-3); }
details.career-level[open] > summary .career-count::after { content: ' ⌄'; }
.acc-plain > summary { list-style: none; cursor: pointer; }
.acc-plain > summary::-webkit-details-marker { display: none; }
.acc-plain > summary h2 { display: inline; font-size: 18px; }
.acc-plain > summary::after { content: ' ›'; color: var(--text-3); font-size: 18px; }
.acc-plain[open] > summary::after { content: ' ⌄'; }
.career-next { padding: 12px 16px; border-radius: var(--radius); border: 1px dashed var(--border-strong); font-size: 13px; color: var(--text-3); }

/* ---------------------------------------------------------------- Ventanas emergentes chicas (confirmar orden, alertas) */
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 12px;
  background: rgba(4, 10, 20, 0); transition: background .18s var(--ease); }
.sheet.is-in { background: rgba(4, 10, 20, .55); }
.sheet-panel { width: min(420px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 16px 16px 14px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
  margin-bottom: max(6px, env(safe-area-inset-bottom)); transform: translateY(30px); opacity: 0; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.sheet.is-in .sheet-panel { transform: none; opacity: 1; }
@media (min-width: 900px) { .sheet { align-items: center; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-head b { font-size: 17px; }
.sheet-sub { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
body.sheet-open { overflow: hidden; }
.sheet .alert-form { margin-top: 10px; }

.ticket-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; margin: 6px 0 10px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.ticket-sum b { font-size: 18px; color: var(--text); }

.asset-price { position: relative; }
.alert-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-2); font: 600 12px var(--font); cursor: pointer; position: relative; }
.alert-btn:hover { color: var(--gold); border-color: var(--gold); }
.alert-btn i { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--gold); color: #0A1628;
  font: 700 10px/16px var(--font); font-style: normal; text-align: center; padding: 0 4px; }
.chart.loading { opacity: .5; }
.quote-error.is-warn { color: var(--text-2); font-size: 12px; }
.chart-note { position: absolute; right: 4px; top: 2px; margin: 0; font-size: 11px; color: var(--text-3); pointer-events: none; }
/* Medallas propias de los logros */
.ach { justify-items: center; text-align: center; }
.ach:not(.is-on) { filter: none; opacity: .8; }
.ach-medal { width: 76px; height: 76px; display: block; transition: transform .25s var(--ease); }
.ach.is-on .ach-medal { filter: drop-shadow(0 6px 10px rgba(212,175,55,.25)); }
.ach.is-on:hover .ach-medal { transform: translateY(-3px) rotate(-5deg); }
.celebrate-medal { width: 120px; height: 120px; animation: medal-pop .6s var(--ease) both; }
@keyframes medal-pop { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 70% { transform: scale(1.1) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.career-badge img { width: 40px; height: 40px; display: block; }
.gift-link { font-size: 11px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.course-medal { background: transparent; width: 44px; height: 44px; }
.course-medal img, .course-title img { display: block; }
.course-title { display: flex; align-items: center; gap: 10px; }
.nowrap { white-space: nowrap; }

/* ===== Íconos de la Academia: ficha azul noche + dorado ===== */
.ph { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.licon {
  --acc: #D4AF37; --s: 40px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3);
  color: #EBCB6B;
  background:
    radial-gradient(120% 90% at 18% 0%, color-mix(in srgb, var(--acc) 34%, transparent) 0%, transparent 58%),
    linear-gradient(155deg, #1A2D4F 0%, #0A1628 70%);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,.38), inset 0 1px 0 rgba(255,255,255,.10), 0 6px 14px -6px rgba(10,22,40,.45);
}
.licon::after { /* brillo superior */
  content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent); pointer-events: none;
}
.licon-svg { width: 58%; height: 58%; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
.licon-xs { --s: 24px; } .licon-sm { --s: 32px; } .licon-md { --s: 40px; } .licon-lg { --s: 56px; } .licon-xl { --s: 72px; }
.licon-xl .licon-svg { width: 54%; height: 54%; }
.licon.is-locked { filter: grayscale(1); opacity: .45; }
.licon-check {
  position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center; background: #00C853; color: #fff;
  box-shadow: 0 0 0 2px var(--card, #fff);
}
.licon-check svg { width: 12px; height: 12px; }
.licon-xs .licon-check { width: 12px; height: 12px; right: -3px; bottom: -3px; } .licon-xs .licon-check svg { width: 9px; height: 9px; }
.title-ico { display: inline-flex; align-items: center; gap: 8px; }
.title-ico .ph { color: #D4AF37; }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.icon-picker label { cursor: pointer; display: grid; place-items: center; padding: 3px; border-radius: 14px; border: 2px solid transparent; }
.icon-picker input { position: absolute; opacity: 0; pointer-events: none; }
.icon-picker input:checked + .licon { outline: 3px solid #D4AF37; outline-offset: 2px; }
.icon-picker input:focus-visible + .licon { outline: 3px solid #4FC3F7; outline-offset: 2px; }

/* ===== Academia: camino en etapas (Básico → Master → Diploma) ===== */
.road { position: relative; display: grid; gap: 18px; margin-bottom: 26px; }
.road::before { content: ""; position: absolute; left: 31px; top: 40px; bottom: 40px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 15%, transparent)); opacity: .5; }
.road-step { position: relative; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.road-step.is-current { border-color: rgba(212,175,55,.55); }
.road-step.is-locked .road-head { opacity: .78; }
.road-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 12px; }
.road-medal { width: 64px; height: 64px; filter: drop-shadow(0 6px 10px rgba(10,22,40,.25)); margin: -6px 0; }
.road-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.road-text h2 { font-size: 19px; line-height: 1.2; }
.road-text .faint { font-size: 13px; margin-top: 2px; }
.road-count { font-weight: 800; color: var(--text-2); font-size: 15px; }
.road-step.is-done .road-count { color: var(--green, #00C853); }
.road-step > .progress { margin-bottom: 14px; }
.road-review > summary { cursor: pointer; list-style: none; font-size: 14px; color: var(--text-2); font-weight: 600; }
.road-review > summary::-webkit-details-marker { display: none; }
.road-review[open] > summary { margin-bottom: 12px; }
.road-lock { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--card-2); font-size: 13px; color: var(--text-2); }
.road-lock .ph { margin-top: 2px; color: var(--gold); }
.road-prize { font-size: 13px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.road-prize .ph, .career-next .ph { color: var(--gold); }
.road-seal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #EBCB6B;
  background: radial-gradient(circle at 30% 20%, #26406B, #0A1628 70%); box-shadow: inset 0 0 0 2px rgba(212,175,55,.6), 0 6px 14px -4px rgba(10,22,40,.4); }
.road-seal .ph { width: 32px; height: 32px; }
.road-diploma .road-head { margin-bottom: 0; }
.road-diploma.is-locked .road-seal { filter: grayscale(.85); opacity: .7; }
.road-diploma.is-done { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, var(--card)), var(--card)); border-color: var(--gold); }
.career-badge.is-medal { background: none; width: 46px; height: 46px; }
.career-badge.is-medal img { width: 46px; height: 46px; filter: drop-shadow(0 3px 6px rgba(10,22,40,.2)); }
.career-level.is-compact .career-badge.is-medal img { width: 38px; height: 38px; }
.node-dot { background: none !important; border: 0 !important; box-shadow: none !important; width: 44px; height: 44px; animation: none !important; }
.node-open .node-dot .licon { box-shadow: 0 0 0 3px color-mix(in srgb, var(--lvl) 45%, transparent), inset 0 0 0 1px rgba(212,175,55,.38); animation: pulse-licon 2s infinite; }
@keyframes pulse-licon { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--lvl) 0%, transparent), inset 0 0 0 1px rgba(212,175,55,.38); } }
.next-lesson .licon { flex: none; }
@media (max-width: 560px) {
  .road::before { left: 27px; }
  .road-step { padding: 14px 12px; }
  .road-medal, .road-seal { width: 54px; height: 54px; }
  .road-head { gap: 10px; }
  .road-text h2 { font-size: 17px; }
}

/* Lección: portada */
.lesson-hero { position: relative; overflow: hidden; display: flex; gap: 16px; align-items: center; margin: 16px 0 10px; padding: 18px;
  border-radius: 18px; color: #fff;
  background:
    radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--lvl) 38%, transparent), transparent 60%),
    radial-gradient(70% 90% at 100% 100%, rgba(212,175,55,.22), transparent 60%),
    linear-gradient(140deg, #13284A, #0A1628 70%);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,.28); }
.lesson-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.lesson-hero-art { position: absolute; right: -18px; bottom: -26px; color: #D4AF37; opacity: .14; pointer-events: none; filter: grayscale(1) brightness(1.8); }
.lesson-hero-art .ph { width: 150px; height: 150px; }
.lesson-hero .licon { box-shadow: inset 0 0 0 1px rgba(212,175,55,.55), 0 10px 24px -8px rgba(0,0,0,.6); }
.lesson-hero-text { position: relative; min-width: 0; }
.lesson-hero-text p { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #E6C65C; }
.lesson-hero-text h1 { font-size: 22px; line-height: 1.2; color: #fff; margin-top: 3px; }
@media (max-width: 560px) { .lesson-hero { padding: 14px; gap: 12px; } .lesson-hero .licon { --s: 58px; } .lesson-hero-text h1 { font-size: 19px; } }
.takeaway .ph { color: var(--gold); }

/* ===== Diploma Master Tikvah ===== */
.diploma-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.diploma { max-width: 900px; margin: 0 auto 30px; padding: 14px; border-radius: 6px; color: #0A1628;
  background: linear-gradient(135deg, #0A1628, #1B2F52 50%, #0A1628); box-shadow: 0 24px 60px -20px rgba(10,22,40,.55); }
.diploma-frame { position: relative; padding: 44px 48px 30px; text-align: center; border-radius: 3px;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(212,175,55,.12), transparent 70%),
    repeating-linear-gradient(45deg, rgba(10,22,40,.018) 0 2px, transparent 2px 6px),
    #FFFDF7;
  outline: 2px solid #C9A227; outline-offset: -10px; box-shadow: inset 0 0 0 14px #FFFDF7, inset 0 0 0 15px rgba(201,162,39,.45); }
.diploma-corner { position: absolute; width: 64px; height: 64px; color: #C9A227; }
.diploma-corner.tl { top: 18px; left: 18px; } .diploma-corner.tr { top: 18px; right: 18px; transform: scaleX(-1); }
.diploma-corner.bl { bottom: 18px; left: 18px; transform: scaleY(-1); } .diploma-corner.br { bottom: 18px; right: 18px; transform: scale(-1); }
.diploma-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.diploma-logo { width: 52px; height: 52px; }
.diploma-brand { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #6B5A1E; }
.diploma-kicker { margin-top: 22px; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: #9A7A16; font-weight: 700; }
.diploma-title { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 44px; line-height: 1.05; color: #0A1628; margin-top: 8px; }
.diploma-title span { display: inline-block; margin-top: 6px; font-size: 26px; font-style: italic; font-weight: 400; color: #9A7A16; }
.diploma-lead { margin-top: 26px; font-size: 14px; color: #5B6577; }
.diploma-name { font-family: Georgia, 'Times New Roman', serif; font-size: 38px; font-style: italic; color: #0A1628; margin: 4px auto 0;
  padding: 0 24px 8px; border-bottom: 1.5px solid #C9A227; display: inline-block; min-width: 60%; }
.diploma-text { max-width: 620px; margin: 16px auto 0; font-size: 14px; line-height: 1.6; color: #2E3A4F; }
.diploma-modules { list-style: none; margin: 18px auto 0; padding: 0; max-width: 700px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.diploma-modules li { font-size: 11.5px; color: #2E3A4F; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(212,175,55,.12); border: 1px solid rgba(201,162,39,.35); display: inline-flex; gap: 6px; align-items: center; }
.diploma-modules li span { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #0A1628; color: #EBCB6B; font-size: 10px; font-weight: 800; }
.diploma-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; margin-top: 26px; }
.diploma-sign { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid rgba(10,22,40,.35); }
.diploma-sign b { font-size: 14px; color: #0A1628; }
.diploma-sign small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6B7280; }
.diploma-seal { width: 110px; height: 110px; filter: drop-shadow(0 8px 12px rgba(10,22,40,.3)); margin-bottom: -6px; }
.diploma-note { margin-top: 18px; font-size: 10.5px; color: #8A93A3; }
@media (max-width: 640px) {
  .diploma { padding: 8px; }
  .diploma-frame { padding: 34px 18px 22px; outline-offset: -6px; box-shadow: inset 0 0 0 8px #FFFDF7, inset 0 0 0 9px rgba(201,162,39,.45); }
  .diploma-corner { width: 36px; height: 36px; } .diploma-corner.tl, .diploma-corner.tr { top: 10px; } .diploma-corner.bl, .diploma-corner.br { bottom: 10px; }
  .diploma-corner.tl, .diploma-corner.bl { left: 10px; } .diploma-corner.tr, .diploma-corner.br { right: 10px; }
  .diploma-title { font-size: 30px; } .diploma-title span { font-size: 19px; } .diploma-name { font-size: 27px; min-width: 80%; }
  .diploma-foot { grid-template-columns: 1fr 1fr; } .diploma-seal { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: 86px; height: 86px; }
}
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body * { visibility: hidden; }
  .diploma, .diploma * { visibility: visible; }
  .diploma { position: absolute; left: 0; top: 0; width: 100%; max-width: none; margin: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none !important; }
}
.diploma-verify { display: flex; gap: 10px; align-items: center; justify-content: flex-end; text-align: left; }
.diploma-verify div { display: grid; gap: 3px; }
.diploma-verify b { font-size: 12.5px; color: #0A1628; letter-spacing: .04em; }
.diploma-verify small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6B7280; }
.diploma-qr { width: 84px; height: 84px; padding: 4px; background: #fff; border: 1px solid rgba(201,162,39,.6); border-radius: 6px; image-rendering: pixelated; }
.diploma-foot .diploma-sign { text-align: left; }
@media (max-width: 640px) { .diploma-verify { justify-content: flex-start; } .diploma-qr { width: 72px; height: 72px; } }
.verify { max-width: 560px; margin: 30px auto; text-align: center; padding: 28px 22px; }
.verify-icon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; color: #fff; background: var(--text-3); }
.verify-icon .ph { width: 34px; height: 34px; }
.verify-ok .verify-icon { background: #00C853; } .verify-revoked .verify-icon { background: #FF1744; }
.verify-kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.verify-ok .verify-kicker { color: #00A844; } .verify-revoked .verify-kicker { color: #FF1744; }
.verify h1 { font-size: 22px; margin: 4px 0 14px; }
.verify-data { display: grid; gap: 8px; text-align: left; margin: 0 auto; max-width: 400px; }
.verify-data div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.verify-data dt { color: var(--text-3); font-size: 13px; } .verify-data dd { margin: 0; font-weight: 700; text-align: right; }
.verify-note { font-size: 12px; margin-top: 14px; }
/* Íconos del set clásico: tamaño por defecto (si ningún contenedor lo fija) */
:where(svg.ico) { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.req-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.req-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
.req-check { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); font-size: 12px; font-weight: 900; color: #fff; }
.req-list li.is-ok { color: var(--text); } .req-list li.is-ok .req-check { background: #00C853; border-color: #00C853; }
.req-list b { font-size: 12px; color: var(--text-3); }
.exam-wait { display: flex; gap: 14px; align-items: flex-start; }
.exam-wait p { margin: 6px 0 10px; font-size: 14px; }
.exam-rules { font-size: 13px; margin: -4px 0 12px; }
.lesson.is-exam { border-color: rgba(212,175,55,.55); }
.practice-tasks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 5px; }
.practice-tasks li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-2); padding: 6px 8px; border-radius: 8px; background: var(--card-2); font-weight: 500; }
.practice-tasks li.is-ok { color: var(--text); } .practice-tasks li.is-ok .req-check { background: #00C853; border-color: #00C853; }
.practice-tasks .req-check { width: 17px; height: 17px; font-size: 10px; }
.practice-tasks b { font-size: 11px; color: var(--text-3); }
.node-practice .node-link { align-items: flex-start; }
.node-exam .node-text b::after { content: " · examen"; color: var(--gold); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #FF1744; color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.dip-list { list-style: none; margin: 0; padding: 0; display: grid; }
.dip-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.dip-row:first-child { border-top: 0; }
.dip-who { display: grid; gap: 2px; min-width: 220px; }
.dip-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dip-send { display: flex; gap: 8px; align-items: center; }
.dip-send .check { font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); }
.diploma-pending { text-align: center; max-width: 620px; margin: 10px auto; padding: 30px 22px; }
.diploma-pending img { width: 120px; height: 120px; margin: 0 auto 6px; display: block; filter: drop-shadow(0 10px 16px rgba(10,22,40,.3)); }
.diploma-pending h1 { font-size: 26px; margin: 6px 0; }
.diploma-pending p { font-size: 15px; color: var(--text-2); }
.red { color: var(--red); }
.unit-note { font-size: 12px; margin: -6px 0 8px; }
.pub-page { max-width: 760px; margin: 18px auto 0; display: grid; gap: 16px; }
.pub-text h2 { font-size: 19px; margin: 18px 0 6px; } .pub-text h2:first-child { margin-top: 0; }
.pub-text p, .pub-text li { font-size: 15px; line-height: 1.65; color: var(--text-2); }
.pub-text ul { padding-left: 20px; display: grid; gap: 6px; }
.pub-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.contact-mail { margin: 8px 0 6px; }
.legal-list { display: grid; gap: 8px; margin-top: 16px; }
.legal-sec { border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.legal-sec > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 15px; display: flex; gap: 10px; align-items: center; color: var(--text); }
.legal-sec > summary::-webkit-details-marker { display: none; }
.legal-sec > summary::after { content: '›'; margin-left: auto; color: var(--text-3); font-size: 20px; transition: transform .2s; }
.legal-sec[open] > summary::after { transform: rotate(90deg); }
.legal-n { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--gold-dim); color: var(--gold); font-size: 12px; font-weight: 800; flex: none; }
.legal-body { padding: 0 16px 14px 50px; }
@media (max-width: 560px) { .legal-body { padding-left: 16px; } }
@media print { .legal-sec { break-inside: avoid; } }
.psi-head { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 14px; }
.psi-head td { border: 1px solid var(--border-strong); padding: 6px 8px; color: var(--text-2); vertical-align: middle; }
.psi-code { font-weight: 800; text-align: center; white-space: nowrap; }
.psi-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.psi-table th, .psi-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; color: var(--text-2); }
.psi h3 { font-size: 14px; margin: 14px 0 4px; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.psi-cat { margin-top: 10px; border-left: 3px solid var(--gold); padding-left: 12px; }
.psi-cat > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--text); padding: 4px 0; }
.psi-obj { font-size: 14px; margin: 6px 0; }
.psi-controls { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.psi-controls li { font-size: 14px; line-height: 1.6; }
.psi-ref { font-weight: 800; color: var(--gold); font-size: 12px; margin-right: 4px; }
.psi-toc { font-size: 14px; padding-left: 20px; } .psi-toc ol { font-size: 12.5px; color: var(--text-3); padding-left: 18px; list-style: none; }
.psi-foot { font-size: 11px; margin-top: 18px; }
.legal-hub { margin-top: 18px; }
.legal-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); }
.legal-card:hover { text-decoration: none; border-color: var(--gold); }
.legal-card span:last-child { display: grid; gap: 3px; } .legal-card small { color: var(--text-3); font-size: 13px; }
@media (max-width: 560px) { .psi-head { font-size: 10.5px; } }
.ach:not(.is-on) .ach-medal.is-tyo { filter: grayscale(1); opacity: .55; }

/* ===================== Toros & Osos ===================== */
.tyo { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.tyo-lobby, .tyo-stage { display: grid; gap: 14px; }
.tyo-closed { justify-self: start; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 4px 12px 4px 6px; }
.tyo-portada { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--border); }
.tyo-hero { display: flex; gap: 14px; align-items: center; }
.tyo-icon { flex: none; width: 92px; height: 92px; border-radius: 24px; animation: tyo-glow 2.2s ease-in-out infinite; }
.tyo-icon img { display: block; width: 100%; height: 100%; }
@keyframes tyo-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.55); } 50% { box-shadow: 0 0 0 12px rgba(212,175,55,0); } }
.tyo-title { font-size: 32px; line-height: .95; font-style: italic; font-weight: 900; letter-spacing: -.01em; }
.tyo-title .u { color: var(--green); } .tyo-title .d { color: var(--red); }
.tyo-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tyo-stat { display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 8px 10px; min-width: 0; }
.tyo-stat img { flex: none; }
.tyo-stat span { display: grid; min-width: 0; }
.tyo-stat small { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.tyo-stat b { font-size: 16px; } .tyo-stat em { font-style: normal; font-size: 10.5px; }
.tyo-league-bar { display: grid; gap: 4px; }
.tyo-big { font-size: 17px; display: flex; gap: 10px; justify-content: center; align-items: center; padding: 14px; }
.tyo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tyo-row .btn { display: inline-flex; gap: 6px; justify-content: center; align-items: center; }
.tyo-small { font-size: 12.5px; }
.tyo-section .card-head { margin-bottom: 8px; }
.tyo-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tyo-badge { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--border); opacity: .55; }
.tyo-badge img { flex: none; filter: grayscale(1); }
.tyo-badge.is-on { opacity: 1; border-color: var(--gold); } .tyo-badge.is-on img { filter: none; }
.tyo-badge span { display: grid; min-width: 0; } .tyo-badge b { font-size: 13px; } .tyo-badge small { font-size: 11px; line-height: 1.3; }
.tyo-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tyo-top li { display: grid; grid-template-columns: 22px 32px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 4px; border-radius: 10px; font-size: 14px; }
.tyo-top li.is-me { background: var(--gold-dim); }
/* duelo */
.tyo-search { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 34px 16px; }
.tyo-search .progress { width: 100%; }
.tyo-vs { font-size: 46px; font-weight: 900; font-style: italic; color: var(--gold); animation: tyo-pop .6s ease-out; }
.tyo-vs.sm { font-size: 20px; animation: none; }
@keyframes tyo-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.tyo-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.tyo-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.tyo-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tyo-side.r { align-items: flex-end; text-align: right; }
.tyo-nm { font-weight: 700; font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; border-width: 1px; flex: none; }
.tyo-pips { display: flex; gap: 5px; flex-wrap: wrap; }
.tyo-side.r .tyo-pips { justify-content: flex-end; }
.tyo-pip { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); }
.tyo-pip.ok { background: var(--green); border-color: var(--green); } .tyo-pip.no { background: var(--red); border-color: var(--red); }
.tyo-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; animation: tyo-deal .35s ease-out; box-shadow: var(--shadow); }
@keyframes tyo-deal { from { transform: translateY(18px) rotate(-1.5deg); opacity: .2; } to { transform: none; opacity: 1; } }
.tyo-card.is-sd { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.tyo-chead { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--card-2); }
.tyo-chead h2 { font-size: 17px; line-height: 1.2; }
.tyo-medal { flex: none; width: 68px; height: 68px; border-radius: 16px; background: #0A1628; border: 1px solid var(--gold); overflow: hidden; }
.tyo-medal img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tyo-cbody { padding: 16px; display: grid; gap: 12px; }
.tyo-news { font-size: 19px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.tyo-dato { border-left: 3px solid var(--gold); padding-left: 10px; color: var(--text-2); font-size: 14px; }
.tyo-chart { background: var(--bg, #0A1628); border-radius: 12px; padding: 6px; color: var(--text-2); }
[data-theme="light"] .tyo-chart { background: #EEF2F8; }
.tyo-chart svg { display: block; width: 100%; height: auto; }
.tyo-out { stroke-dasharray: 160; stroke-dashoffset: 160; animation: tyo-draw .9s ease-out forwards; }
@keyframes tyo-draw { to { stroke-dashoffset: 0; } }
.tyo-timer { height: 8px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.tyo-timer i { display: block; height: 100%; width: 100%; background: var(--gold); border-radius: 99px; transition: width .1s linear; }
.tyo-timer.hot i { background: var(--red); }
.tyo-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tyo-ch { border-radius: 18px; padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 900; font-size: 20px; letter-spacing: .02em;
  background: #0A1628; border: 3px solid; cursor: pointer; transition: transform .12s; font-family: inherit; }
.tyo-ch img { width: 92px; height: 92px; object-fit: contain; }
.tyo-ch.up { border-color: var(--green); color: var(--green); } .tyo-ch.dn { border-color: var(--red); color: #FF5A78; }
.tyo-ch:hover { transform: translateY(-3px); } .tyo-ch:active { transform: scale(.96); }
.tyo-ch:disabled { opacity: .45; cursor: default; transform: none; } .tyo-ch.picked { opacity: 1; box-shadow: 0 0 0 4px rgba(212,175,55,.6); }
.tyo-why { display: grid; gap: 10px; }
.tyo-verdict { font-size: 24px; font-weight: 900; font-style: italic; }
.tyo-verdict.ok { color: var(--green); } .tyo-verdict.no { color: var(--red); }
.tyo-tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--gold); color: #0A1628; border-radius: 6px; padding: 3px 8px; }
.tyo-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tyo-trap { display: inline-flex; gap: 4px; align-items: center; color: var(--gold); font-weight: 700; }
.tyo-acad { font-weight: 600; color: var(--gold); font-size: 13.5px; }
.tyo-result { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 22px 16px; }
.tyo-result .tyo-big { font-size: 44px; font-weight: 900; font-style: italic; padding: 0; line-height: 1; }
.tyo-result.win .tyo-big { color: var(--green); } .tyo-result.loss .tyo-big { color: var(--red); }
.tyo-up { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; color: var(--gold); }
.tyo-runhead { display: flex; justify-content: space-between; align-items: center; }
.tyo-runscore { font-size: 26px; font-weight: 900; }
.tyo-lives { display: inline-flex; gap: 4px; } .tyo-lives img { width: 30px; height: 30px; } .tyo-lives img.off { filter: grayscale(1); opacity: .35; }
.tyo-ov { position: fixed; inset: 0; background: rgba(5,10,20,.82); display: grid; place-items: center; padding: 20px; z-index: 90; }
.tyo-ov-box { max-width: 400px; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.tyo-ov-box .btn { width: 100%; }
.tyo-sd { font-size: 40px; font-weight: 900; font-style: italic; color: var(--gold); line-height: 1; animation: tyo-pop .5s ease-out; }
.tyo-copy { background: var(--card-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 10px; font-size: 13.5px; user-select: all; text-align: left; }
/* en Inicio y en el ticket fuera de horario */
.tyo-promo { display: flex; gap: 12px; align-items: center; color: var(--text); border: 1px solid rgba(212,175,55,.5);
  background: radial-gradient(120% 140% at 0% 0%, rgba(212,175,55,.16), transparent 55%), var(--card); }
.tyo-promo:hover { text-decoration: none; border-color: var(--gold); }
.tyo-promo-logo { flex: none; border-radius: 16px; animation: tyo-glow 2.2s ease-in-out infinite; }
.tyo-promo-text { flex: 1; min-width: 0; display: grid; }
.tyo-promo-text small { font-size: 11.5px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.tyo-promo-text b { font-size: 16px; }
.tyo-mini { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin: -4px 0 12px; border-radius: 14px; border: 1px solid rgba(212,175,55,.5); background: var(--card); color: var(--text); }
.tyo-mini:hover { text-decoration: none; border-color: var(--gold); }
.tyo-mini span:nth-child(2) { flex: 1; display: grid; } .tyo-mini small { font-size: 12px; color: var(--text-3); }
.menu-img { width: 22px; height: 22px; flex: none; }
@media (prefers-reduced-motion: reduce) { .tyo-icon, .tyo-card, .tyo-out, .tyo-sd, .tyo-vs, .tyo-promo-logo { animation: none; } .tyo-out { stroke-dashoffset: 0; } }
@media (max-width: 400px) { .tyo-stats { grid-template-columns: 1fr 1fr; } .tyo-stat:last-child { grid-column: 1 / -1; } .tyo-ch img { width: 76px; height: 76px; } }
.tx.is-off { opacity: .5; }

/* Toros & Osos: íconos ilustrados (reemplazan emojis) */
.tyo-ic { display: inline-block; vertical-align: middle; border-radius: 22%; flex: none; object-fit: cover; }
.tyo .btn .tyo-ic { margin-right: 2px; }
.tyo-pulse { margin: 6px auto; animation: tyo-pop .6s ease-out, tyo-breath 1.6s ease-in-out .6s infinite; }
@keyframes tyo-breath { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .tyo-pulse { animation: none; } }

/* ===== Guías, glosario y página pública de Toros & Osos ===== */
.pub-sub { text-align: center; max-width: 680px; margin: -6px auto 14px; }
.pub-guides > h2, .gd-related > h2, .pt-cards > h2 { font-size: 22px; text-align: center; margin-bottom: 10px; }
.gd-cat { display: grid; gap: 12px; }
.gd-cat header h2 { font-size: 21px; letter-spacing: -.01em; }
.gd-cat header p { font-size: 14px; }
.gd-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-bottom: 12px; }
.gd-card { display: grid; gap: 6px; align-content: start; color: var(--text); text-decoration: none; transition: transform .15s ease, border-color .15s ease; border: 1px solid var(--border); }
.gd-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.gd-card h3 { font-size: 16px; line-height: 1.3; }
.gd-card p { font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.gd { max-width: 780px; width: 100%; justify-self: center; display: grid; gap: 20px; border-top: 3px solid var(--gold); }
.gd-head { display: grid; gap: 8px; }
.gd-head h1 { font-size: clamp(25px, 6vw, 36px); line-height: 1.15; letter-spacing: -.02em; }
.gd-head .lead { color: var(--text-2); font-size: 16px; line-height: 1.55; }
.gd-meta { font-size: 12.5px; }
.gd-toc { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; background: var(--surface-2, transparent); }
.gd-toc summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.gd-toc ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 5px; font-size: 14px; }
.md { display: grid; gap: 14px; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.md h2 { font-size: 21px; color: var(--text); margin-top: 14px; line-height: 1.3; scroll-margin-top: 80px; }
.md h3 { font-size: 17px; color: var(--text); margin-top: 6px; }
.md p, .md li { overflow-wrap: anywhere; }
.md b { color: var(--text); }
.md ul, .md ol { padding-left: 22px; display: grid; gap: 7px; margin: 0; }
.md a, .gd-sources a, .pt-rules a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.md blockquote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--gold-dim); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text); font-size: 15px; }
.md-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
.md table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.md th, .md td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.md th { color: var(--text); font-weight: 700; background: var(--gold-dim); }
.md tr:last-child td { border-bottom: 0; }
.gd-sources, .gd-terms { display: grid; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.gd-sources h2, .gd-terms h2 { font-size: 16px; }
.gd-sources ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.gd-sources .faint { font-size: 12px; }
.chips a.chip { text-decoration: none; }
.glos-letters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.glos-letters a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); font-weight: 700; color: var(--text); text-decoration: none; }
.glos-letters a:hover { border-color: var(--gold); color: var(--gold); }
.glos-list { display: grid; gap: 14px; }
.glos-letter { font-size: 26px; color: var(--gold); margin-bottom: 6px; scroll-margin-top: 80px; }
.glos-list dl, .term-rel { display: grid; gap: 12px; margin: 0; }
.glos-list dt, .term-rel dt { font-weight: 700; }
.glos-list dt a, .term-rel dt a { color: var(--text); }
.glos-list dd, .term-rel dd { margin: 2px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.term-guide { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--gold); background: var(--gold-dim); text-decoration: none; color: var(--text); }
.term-guide .muted { font-size: 14px; }
.pub-tyo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); border: 1px solid var(--gold); }
.pub-tyo img { border-radius: 18px; flex: none; }
.pub-tyo span:nth-child(2) { display: grid; gap: 3px; flex: 1; }
.pub-tyo small { font-size: 13.5px; line-height: 1.45; }
.pub-tyo .gold { font-weight: 800; white-space: nowrap; }
.pt-logo { border-radius: 24px; }
.pub-hero .up-t { color: var(--green); } .pub-hero .dn-t { color: var(--red); }
.pt-cover { width: 100%; max-width: 960px; height: auto; justify-self: center; border-radius: var(--radius-lg); }
.pt-rules { max-width: 780px; width: 100%; justify-self: center; display: grid; gap: 8px; }
.pt-cards { display: grid; gap: 10px; }
.pt-cards > p { text-align: center; }
.pt-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.pt-card { display: grid; gap: 10px; align-content: start; }
.pt-card header { display: flex; gap: 10px; align-items: center; }
.pt-card header img { border-radius: 12px; }
.pt-card header span { display: grid; }
.pt-card h3 { font-size: 17px; line-height: 1.3; }
.pt-dato { font-size: 14px; color: var(--text-2); border-left: 3px solid var(--gold); padding-left: 10px; line-height: 1.5; }
.pt-chart { width: 100%; height: auto; background: var(--surface-2, rgba(127,127,127,.06)); border-radius: 10px; }
.pt-card details { display: grid; gap: 8px; }
.pt-card summary { list-style: none; width: 100%; }
.pt-card summary::-webkit-details-marker { display: none; }
.pt-card details[open] summary { margin-bottom: 8px; }
.pt-card details p { font-size: 14px; line-height: 1.55; color: var(--text-2); margin-top: 6px; }
.pt-ans { font-weight: 800; font-size: 16px !important; color: var(--text) !important; }
.pt-ans.up { color: var(--green) !important; } .pt-ans.dn { color: var(--red) !important; }
.pt-ans .tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--gold-dim); color: var(--gold); margin-left: 6px; vertical-align: middle; }
.gd-toc { display: block; }
.gd-toc summary { display: list-item; }
