/* ───────── Tokens: claro por defecto, oscuro por sistema o por elección ───────── */
:root {
  --bg: #efefec;
  --surface: #ffffff;
  --surface2: #f5f5f2;
  --line: #ebebe7;
  --line2: #dedede;
  --ink: #111111;
  --ink2: #3b3b3b;
  --muted: #6f6f6f;
  --dim: #a3a3a3;
  --on-ink: #ffffff;
  --brand: #a855f7;
  --pa: var(--brand);
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --danger: #c2410c;
  --danger-bg: #fff4ed;
  --warn: #a16207;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --overlay: rgba(239,239,236,.85);
  --r: 24px;
  --brand-soft: #f3e8ff;
  --hero: #141414;
  --hero-ink: #ffffff;
  --rs: 8px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0c; --surface: #181818; --surface2: #222222; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
    --ink: #eeeeee; --ink2: #cfcfcf; --muted: #a0a0a0; --dim: #6b6b6b; --on-ink: #111111;
    --ok: #4ade80; --ok-bg: rgba(74,222,128,.08); --danger: #fb923c; --danger-bg: rgba(251,146,60,.08); --warn: #facc15;
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset; --overlay: rgba(12,12,12,.85); --brand-soft: rgba(168,85,247,.16); --hero: #1f1f1f; --hero-ink: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0c; --surface: #181818; --surface2: #222222; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --ink: #eeeeee; --ink2: #cfcfcf; --muted: #a0a0a0; --dim: #6b6b6b; --on-ink: #111111;
  --ok: #4ade80; --ok-bg: rgba(74,222,128,.08); --danger: #fb923c; --danger-bg: rgba(251,146,60,.08); --warn: #facc15;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset; --overlay: rgba(12,12,12,.85); --brand-soft: rgba(168,85,247,.16); --hero: #1f1f1f; --hero-ink: #ffffff;
  color-scheme: dark;
}

/* ───────── Base ───────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 'Inter Tight', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  transition: background .3s var(--ease), color .3s var(--ease);
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Inter Tight', sans-serif; font-weight: 500; letter-spacing: -.035em; line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 20px; letter-spacing: -.02em; }
h3 { font-size: 15px; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .86em; }
code { background: var(--surface2); padding: 1px 6px; border-radius: 5px; }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }
.section { padding-top: 56px; padding-bottom: 72px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 14px; }
.mt { margin-top: 28px; } .mt-s { margin-top: 14px; }
.center { text-align: center; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; gap: 28px; } }

/* ───────── Topbar ───────── */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--overlay); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 16px 'Inter Tight', sans-serif; letter-spacing: -.03em; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--brand); position: relative; flex: none; }
.logo-mark::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav > a:not(.btn) { padding: 6px 12px; border-radius: var(--rs); color: var(--muted); font-size: 14px; white-space: nowrap; transition: color .15s, background .15s; }
.nav > a:not(.btn):hover { color: var(--ink); }
.nav > a.on { color: var(--ink); background: var(--surface2); }
.nav .btn { margin-left: 6px; }
.theme-toggle { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; margin-left: 4px; transition: color .15s, background .15s, transform .3s var(--ease); }
.theme-toggle:hover { color: var(--ink); background: var(--surface2); }
.theme-toggle:active { transform: rotate(20deg); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.bare-toggle { position: fixed; top: 16px; right: 16px; z-index: 5; }
.menu { position: relative; margin-left: 6px; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); color: var(--ink); border: 1px solid var(--line2); display: grid; place-items: center; font: 600 13px 'Inter Tight', sans-serif; }
.menu-pop { position: absolute; right: 0; top: 42px; width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.25); animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface2); }
.menu-email { padding: 8px 10px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }

/* ───────── Botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; font: 500 14px 'Inter Tight', sans-serif;
  padding: 11px 20px; border-radius: 99px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: opacity .15s, transform .15s var(--ease);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 99px; }
.btn-ghost { background: var(--surface2); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { filter: none; border-color: var(--line2); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.full { width: 100%; }
.link { color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer; padding: 0; transition: color .15s; }
.link:hover { color: var(--ink); }
.danger { color: var(--danger) !important; }

/* ───────── Superficies ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 24px; }
.hoverable { display: block; transition: border-color .2s, transform .25s var(--ease); }
.hoverable:hover { border-color: var(--line2); transform: translateY(-2px); }
.accent-card { background: var(--surface2); border-color: transparent; box-shadow: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 24px; }
.eyebrow { font: 500 13px 'Inter Tight', sans-serif; letter-spacing: -.01em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pa); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 99px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.warn { color: var(--warn); }
.tag.tiny { font-size: 10px; padding: 1px 7px; margin-left: 8px; vertical-align: 1px; }
.flash { margin: 20px 0 0; padding: 11px 16px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 14px; animation: pop .25s var(--ease); }
.err { padding: 10px 14px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: 14px; }
.hint { font-size: 12px; color: var(--dim); font-weight: 400; line-height: 1.5; }

/* ───────── Formularios ───────── */
input, select, textarea {
  width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line2);
  border-radius: var(--rs); padding: 10px 12px; font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=color] { padding: 4px; height: 42px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink); }
input[type=file] { padding: 22px; border-style: dashed; cursor: pointer; background: var(--surface2); }
textarea { resize: vertical; line-height: 1.55; }
.num { width: 72px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.search { max-width: 320px; }

/* ───────── Productos ───────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.prod { overflow: hidden; display: flex; flex-direction: column; }
.prod-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod-body h3 { margin: 0; font-size: 17px; }
.prod-body p { margin: 0; }
.prod-body .row { margin-top: auto; padding-top: 10px; }
.meta { font: 400 12px 'JetBrains Mono', monospace; color: var(--dim); }
.cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: color-mix(in srgb, var(--pa) 9%, var(--surface2)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; }
.cover-art::before {
  content: ''; position: absolute; width: 62%; aspect-ratio: 1; right: -14%; top: -22%; border-radius: 50%;
  background: color-mix(in srgb, var(--pa) 85%, transparent); opacity: .9; transition: transform .6s var(--ease);
}
.hoverable:hover .cover-art::before, .prod:hover .cover-art::before { transform: scale(1.06) translate(-4px, 4px); }
.cover-emoji { position: relative; font-size: 22px; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.cover-word { position: relative; font: 600 clamp(24px, 3vw, 30px) 'Inter Tight', sans-serif; letter-spacing: -.05em; line-height: 1; color: var(--ink); }
.locked .cover { filter: grayscale(.7); opacity: .75; transition: filter .3s, opacity .3s; }
.locked:hover .cover { filter: none; opacity: 1; }
.lock-pill { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 99px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.bar { height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--pa); border-radius: inherit; transition: width .6s var(--ease); }

/* ───────── Home ───────── */
.hero { padding-top: 96px; padding-bottom: 64px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero > * { max-width: 760px; }
.hero .row { justify-content: center; }
.hero-stats { margin-top: 36px; font-size: 14px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-stats b { color: var(--ink); font-weight: 500; }
.hero-stats i { color: var(--dim); font-style: normal; }
.seg { display: inline-flex; padding: 3px; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 28px; font-size: 13px; }
.seg span { padding: 5px 12px; border-radius: 7px; color: var(--muted); }
.seg span:first-child { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.display { font-size: clamp(42px, 7vw, 76px); line-height: 1.02; letter-spacing: -.05em; font-weight: 500; margin-bottom: 22px; }
.grad { color: var(--ink); }
.lead { font-size: 17px; color: var(--muted); max-width: 520px; margin: 0 auto 30px; line-height: 1.55; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 48px 0 18px; flex-wrap: wrap; }
.sec-head h1, .sec-head h2 { margin: 0; }
.section > .sec-head:first-child { margin-top: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.step { border-top: 1px solid var(--line); padding-top: 20px; }
.step-n { font: 400 12px 'JetBrains Mono', monospace; color: var(--dim); }
.step h3 { margin-top: 10px; font-size: 17px; }

/* ───────── Auth ───────── */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 28px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 24px; margin: 0; }
.auth-card p { margin: 0; }
.auth-links { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; font-size: 13px; }
.auth-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
.big-emoji { font-size: 34px; }

/* ───────── Dashboard ───────── */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hello h1 { margin: 0; }
.continue { display: flex; gap: 18px; align-items: center; padding: 20px 22px; margin-top: 28px; transition: border-color .2s, transform .25s var(--ease); }
.continue:hover { border-color: var(--line2); transform: translateY(-2px); }
.continue h3 { margin: 0 0 2px; font-size: 17px; }
.continue .eyebrow { margin-bottom: 6px; }
.continue .bar { margin-top: 12px; max-width: 320px; }
.continue-play { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; padding-left: 2px; transition: transform .25s var(--ease); }
.continue:hover .continue-play { transform: scale(1.06); }

/* ───────── Producto ───────── */
.phero { border-bottom: 1px solid var(--line); }
.phero-in { display: flex; gap: 56px; align-items: center; padding-top: 40px; padding-bottom: 56px; }
.phero-cover { width: 420px; flex: none; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.phero .bar { max-width: 400px; }
.display-s { font-size: clamp(38px, 5.5vw, 60px); letter-spacing: -.05em; margin: 4px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips > span { font: 400 12px 'JetBrains Mono', monospace; padding: 4px 10px; border-radius: 99px; background: var(--surface2); color: var(--muted); }
@media (max-width: 860px) { .phero-in { flex-direction: column-reverse; align-items: stretch; gap: 24px; padding-top: 24px; } .phero-cover { width: 100%; } }
.incl { margin: 0; padding: 0; list-style: none; }
.incl li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.incl li:last-child { border: 0; }
.body { color: var(--ink2); }
.body p:last-child { margin: 0; }
.body ul { padding-left: 20px; }
.body li { margin: 3px 0; }
.body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
.body h3 { margin-top: 16px; }

/* ───────── Temario ───────── */
.syllabus { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.mod + .mod { border-top: 1px solid var(--line); }
.mod summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; font-weight: 500; list-style: none; transition: background .15s; }
.mod summary::-webkit-details-marker { display: none; }
.mod summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.mod[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.mod summary:hover { background: var(--surface2); }
.mod-n { font: 400 12px 'JetBrains Mono', monospace; color: var(--dim); }
.mod ol { list-style: none; margin: 0; padding: 0 0 8px; }
.les { display: flex; align-items: center; gap: 12px; padding: 9px 18px; font-size: 14px; color: var(--ink2); transition: background .15s; }
a.les:hover { background: var(--surface2); }
.les.cur { color: var(--ink); font-weight: 500; background: var(--surface2); }
.les.off { color: var(--dim); }
.les-ic { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 8px; border: 1px solid var(--line2); color: var(--dim); }
.les.cur .les-ic { border-color: var(--brand); color: var(--brand); }
.les.done .les-ic { background: var(--pa); border-color: var(--pa); color: #fff; font-size: 10px; font-weight: 700; }

/* ───────── Clase ───────── */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; max-width: 1360px; margin: 0 auto; width: 100%; }
.lesson-main { padding: 28px 40px 64px; min-width: 0; }
.lesson-side { border-left: 1px solid var(--line); padding: 24px 18px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; }
.lesson-side .syllabus { border: 0; background: transparent; }
.lesson-side .mod summary, .lesson-side .les { padding-left: 6px; padding-right: 6px; border-radius: 8px; }
.lesson-side .mod + .mod { border-top: 0; }
.side-head { display: flex; justify-content: space-between; align-items: center; margin: 0 6px 12px; font-size: 13px; }
@media (max-width: 980px) { .lesson-wrap { grid-template-columns: 1fr; } .lesson-side { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); } .lesson-main { padding: 20px 16px 40px; } }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--dim); margin: 0 6px; }
.player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r); overflow: hidden; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: var(--surface2); }
.small-player { max-width: 420px; }
.lesson-head { display: flex; gap: 16px; align-items: flex-start; margin: 24px 0 20px; flex-wrap: wrap; }
.lesson-head h1 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 4px; }
.pn { display: flex; justify-content: space-between; gap: 10px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pn .btn { white-space: normal; text-align: left; }

/* ───────── Descargables ───────── */
.res { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.res-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; transition: background .15s; }
.res-item + .res-item { border-top: 1px solid var(--line); }
.res-item:hover { background: var(--surface2); }
.res-item strong { display: block; font-size: 14px; font-weight: 500; }
.res-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; font-size: 16px; }
.res-item:hover .res-ic { background: var(--surface); }
.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; margin: 8px 0 24px; padding: 3px; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; }
.tabs button, .tabs a { font: 500 13px 'Inter Tight', sans-serif; padding: 6px 12px; border-radius: 7px; background: transparent; border: 0; color: var(--muted); cursor: pointer; transition: color .15s, background .15s; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tabs .on:hover { color: var(--ink); }
.cat { margin-bottom: 28px; }
.cat-h { font: 500 11px 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 0; }

/* ───────── Admin ───────── */
.admin-tabs { margin: 16px 0 28px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { font: 500 32px 'Inter Tight', sans-serif; letter-spacing: -.04em; line-height: 1.1; }
.table { overflow: hidden; margin-top: 12px; }
.tr { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tr:last-child { border-bottom: 0; }
.pdot { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--pa) 14%, var(--surface2)); font-size: 15px; }
.mod-edit { margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.les-edit { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.les-edit:empty { display: none; }
.les-edit li { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.les-edit li:last-child { border-bottom: 0; }
.chip-form { display: inline; }
.chip-form button { font: 500 12px 'Inter Tight', sans-serif; padding: 3px 10px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.chip-form button:hover { border-color: var(--danger); color: var(--danger); }
.copy { background: var(--surface2); border: 1px dashed var(--line2); padding: 12px 14px; border-radius: 10px; cursor: pointer; word-break: break-all; transition: border-color .15s, color .15s; }
.copy.copied { border-color: var(--ok); color: var(--ok); }
.upl-status:empty { display: none; }
.upl-bar { height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.upl-bar span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* ───────── Footer ───────── */
.foot { border-top: 1px solid var(--line); margin-top: 48px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; padding: 24px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }

/* ───────── Móvil ───────── */
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 32px; padding-bottom: 48px; }
  .hero { padding-top: 64px; padding-bottom: 48px; }
  .pad { padding: 18px; }
  .auth-card { padding: 24px; }
  .topbar .logo > span:last-child { display: none; }
  .nav > a:not(.btn) { padding: 6px 9px; font-size: 13px; }
  .lesson-head { flex-direction: column; align-items: stretch; }
  .lesson-head form, .lesson-head .btn { width: 100%; }
  .continue { gap: 14px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }

/* ───────── Barra lateral estilo Whop (productos del alumno) ───────── */
.shell { display: flex; flex: 1; min-height: 0; }
.shell > main { flex: 1; min-width: 0; }
.rail { width: 68px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.rail-sep { width: 28px; height: 1px; background: var(--line2); margin: 4px 0; }
.rail-i { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--surface2); color: var(--muted); transition: border-radius .2s var(--ease), background .2s; }
.rail-i:hover { border-radius: 10px; color: var(--ink); }
.rail-i.prod-i { background: color-mix(in srgb, var(--pa) 18%, var(--surface2)); }
.rail-i.on { color: var(--ink); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.rail-i::after { content: attr(data-tip); position: absolute; left: 54px; white-space: nowrap; background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transform: translateX(-4px); transition: opacity .15s, transform .15s; z-index: 30; }
.rail-i:hover::after { opacity: 1; transform: none; }
.rail-i.add { border: 1px dashed var(--line2); background: transparent; font-size: 18px; }
.shell .foot { margin-top: 24px; }
@media (max-width: 760px) { .rail { display: none; } }

.btn-whop { background: #a855f7; color: #fff; padding: 12px 18px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ═════════ Diseño "app" (inicio, curso, perfil) ═════════ */
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-block { width: 100%; }
.ml-auto { margin-left: auto; }
.u { text-decoration: underline; text-underline-offset: 3px; }
.pad-s { padding: 8px 10px; margin: 0; }
.app { padding-top: 28px; padding-bottom: 96px; max-width: 1100px; }
.app.narrow { max-width: 560px; }
.app-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 28px; align-items: start; }
.app-grid .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; gap: 16px; } }

/* Encabezado: avatar + saludo + campana */
.app-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.app-head .grow { display: flex; flex-direction: column; line-height: 1.25; }
.hello-name { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.app-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 20px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.app-avatar.tint, .row-av.tint { background: color-mix(in srgb, var(--pa) 16%, var(--surface)); }
.app-avatar.big { width: 64px; height: 64px; font-size: 26px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer; position: relative; flex: none; list-style: none; transition: transform .15s var(--ease); }
.icon-btn:hover { transform: scale(1.05); }
.app-head > .icon-btn .ic { transform: rotate(-90deg); }
.dot-new { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--surface); }
.bell { position: relative; }
.bell summary::-webkit-details-marker { display: none; }
.bell-pop { position: absolute; right: 0; top: 50px; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px; z-index: 30; box-shadow: 0 20px 50px -16px rgba(0,0,0,.3); animation: pop .18s var(--ease); }
.bell-h { font-weight: 600; font-size: 13px; padding: 6px 10px 8px; }
.bell-i { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.bell-i:hover { background: var(--surface2); }
.bell-i b { display: block; font-size: 14px; font-weight: 500; }

/* Tarjeta oscura con número grande + anillo */
.hero-card { position: relative; overflow: hidden; background: var(--hero); color: var(--hero-ink); border-radius: 28px; padding: 22px 24px 24px; min-height: 176px; }
.hc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.62); position: relative; z-index: 1; }
.seg-mini { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 99px; padding: 3px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.seg-mini span { padding: 4px 10px; border-radius: 99px; color: rgba(255,255,255,.62); }
.seg-mini .on { background: var(--brand); color: #fff; }
.big-num { position: relative; z-index: 1; font-size: clamp(44px, 7vw, 56px); font-weight: 600; letter-spacing: -.05em; line-height: 1; margin: 22px 0 12px; font-variant-numeric: tabular-nums; }
.big-num span { color: rgba(255,255,255,.38); }
.trend { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.7); flex-wrap: wrap; }
.trend b { color: #d8b4fe; font-weight: 600; }
.trend .ic { color: #d8b4fe; }
.hc-dim { color: rgba(255,255,255,.45); }
.hero-card .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.12); }
.ring { position: absolute; right: -34px; bottom: -40px; width: 190px; height: 190px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 14; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 14; stroke-linecap: round; opacity: .9; transition: stroke-dashoffset 1s var(--ease); }

/* Acciones rápidas circulares */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); }
.qa-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s var(--ease), background .2s; }
.qa:first-child .qa-ic { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -10px var(--brand); }
.qa:hover .qa-ic { transform: translateY(-2px) scale(1.04); }
.qa-l { text-align: center; }

/* Tarjeta de meta (módulo actual) */
.goal { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px 18px; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.goal:hover { transform: translateY(-2px); }
.goal .grow { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.goal .grow b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.goal-pct { font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.goal .bar { grid-column: 1 / -1; height: 8px; background: var(--surface2); margin-top: 12px; }
.goal .bar span { background: var(--ink); }

/* Listas tipo "actividad reciente" */
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 2px 0; }
.list-head h2 { font-size: 18px; margin: 0; font-weight: 600; }
.list-head.first { margin: 0 2px 20px; }
.list-head.first h1 { margin: 0; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 6px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; transition: background .15s; }
a.row:hover { background: var(--surface2); }
.row + .row { border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.row .grow { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.row .grow b { font-weight: 500; font-size: 15px; }
.row-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface2); color: var(--ink); font-size: 17px; font-weight: 600; }
.row-amt { font-size: 17px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.row-amt span { color: var(--dim); font-weight: 500; }
.row-amt.pos { color: var(--ok); }

/* Temario con estilo de lista */
.app .syllabus { border-radius: 22px; box-shadow: var(--shadow); padding: 4px; }
.app .mod summary { border-radius: 16px; }
.app .les { border-radius: 14px; margin: 0 4px; }
.app .les-ic { width: 30px; height: 30px; background: var(--surface2); border: 0; color: var(--muted); }
.app .les.done .les-ic { background: var(--brand-soft); color: var(--brand); }
.app .les.cur .les-ic { background: var(--brand); color: #fff; }
.app .mod-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 600 11px 'Inter Tight', sans-serif; }

/* Secciones (bloques) */
.blk { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.blk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.blk-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.blk-title { font-size: 18px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.02em; }
.blk p { margin: 0; }
.pill-new { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--brand); color: #fff; }
.blk-ann { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.blk-welcome { background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); }
.blk-bonus { background: var(--hero); color: var(--hero-ink); border-color: transparent; }
.blk-bonus .muted { color: rgba(255,255,255,.6); }
.blk-bonus .blk-head { color: rgba(255,255,255,.6); }
.blk-bonus .blk-ic { background: rgba(168,85,247,.22); }
.live-row { display: flex; gap: 14px; align-items: center; }
.live-date { width: 58px; height: 64px; border-radius: 16px; background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.1; }
.live-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.live-date b { font-size: 24px; font-weight: 600; }
.countdown { color: var(--brand); margin-top: 4px; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.checks label { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.checks label:hover { background: var(--surface2); }
.checks input { position: absolute; opacity: 0; pointer-events: none; }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; color: transparent; flex: none; transition: all .2s var(--ease); }
.checks input:checked + .chk { background: var(--brand); border-color: var(--brand); color: #fff; }
.checks input:checked ~ span:last-child { color: var(--dim); text-decoration: line-through; }
.checks input:focus-visible + .chk { outline: 2px solid var(--ink); outline-offset: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.stat-cell { background: var(--surface2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; }
.stat-cell b { font-size: 26px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.stat-cell span { font-size: 12px; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 2px; cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--dim); transition: transform .2s var(--ease); flex: none; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 2px 14px; }
.blk-quote .stars { display: flex; gap: 2px; color: var(--brand); margin-bottom: 10px; }
.blk-quote .stars .ic { fill: currentColor; }
.quote { font-size: 17px; line-height: 1.5; letter-spacing: -.01em; }
.who { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.who .av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; }
.blk-img { padding: 0; overflow: hidden; }
.blk-img img { width: 100%; }
.empty-blk { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border-style: dashed; box-shadow: none; color: var(--muted); padding: 32px 20px; }
.empty-blk b { color: var(--ink); }

/* Modo edición */
.admin-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px 10px 10px 16px; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.admin-strip > span { display: flex; align-items: center; gap: 8px; }
.quick-edit { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 20px; padding: 10px; border: 1.5px dashed color-mix(in srgb, var(--brand) 50%, var(--line)); border-radius: 18px; }
.quick-edit input { flex: 1; min-width: 120px; }
.quick-edit .qe-emoji { flex: 0 0 56px; min-width: 0; text-align: center; font-size: 18px; }
.quick-edit .grow2 { flex: 2; }
.quick-edit input[type=color] { flex: 0 0 48px; min-width: 0; }
.editable { border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 28px; padding: 6px; }
.editable.is-hidden > .blk { opacity: .45; }
.edit-bar { display: flex; align-items: center; gap: 2px; padding: 2px 4px 8px 10px; }
.edit-bar form { display: contents; }
.edit-type { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--brand); margin-right: auto; }
.ib { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.ib:hover { background: var(--surface2); color: var(--ink); }
.ib:disabled { opacity: .3; cursor: default; }
.ib.danger:hover { color: var(--danger); }
.edit-form { display: flex; flex-direction: column; gap: 12px; padding: 14px 10px 8px; }
.add-block { border: 1.5px dashed var(--line2); border-radius: 24px; padding: 4px; }
.add-block summary { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: pointer; font-weight: 600; list-style: none; border-radius: 20px; }
.add-block summary::-webkit-details-marker { display: none; }
.add-block summary:hover { background: var(--surface); }
.add-plus { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 8px; }
.type-card { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, transform .15s var(--ease); }
.type-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.type-card b { font-weight: 600; font-size: 14px; }
.type-card .small { line-height: 1.35; }
.type-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }

/* Barra inferior flotante (celular) */
.tabbar { display: none; }
@media (max-width: 760px) {
  .topbar .nav > a:not(.btn) { display: none; }
  .tabbar { display: flex; position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; background: #141414; border-radius: 99px; padding: 7px; justify-content: space-between; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
  :root[data-theme="dark"] .tabbar { background: #262626; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: rgba(255,255,255,.6); font-size: 10px; font-weight: 500; padding: 2px 0; }
  .tb-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
  .tabbar a.on { color: #fff; }
  .tabbar a.on .tb-ic { background: var(--brand); color: #fff; }
  .tb-l { display: none; }
  .foot { padding-bottom: 90px; }
  .app { padding-top: 18px; }
  .quick { gap: 4px; }
  .qa-ic { width: 54px; height: 54px; }
  .bell-pop { width: min(300px, calc(100vw - 32px)); }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { background: #262626; } }
.edit-form[hidden] { display: none; }

.auth-seg { display: flex; margin: 0 0 6px; }
.auth-seg a { flex: 1; text-align: center; padding: 7px 12px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.auth-seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.magic summary { list-style: none; cursor: pointer; text-align: center; }
.magic summary::-webkit-details-marker { display: none; }

/* ═════════ Estructura estilo Whop ═════════ */
:root[data-theme="dark"] {
  --bg: #111111; --surface: #181818; --surface2: #202020; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --ink: #ededed; --ink2: #cfcfcf; --muted: #a1a1a1; --dim: #6e6e6e; --on-ink: #111111;
  --hero: #1d1d1d; --overlay: rgba(17,17,17,.88); --shadow: none;
}
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #f4f4f4; --line: #ebebeb; --line2: #dddddd;
  --ink: #111111; --muted: #6b6b6b; --overlay: rgba(255,255,255,.9); --shadow: none; --hero: #151515;
}
body { background: var(--bg); }
.mark { flex: none; }
.logo { gap: 8px; font: 700 21px 'Inter Tight', sans-serif; letter-spacing: -.045em; }
.logo-mark { display: none; }

/* Barra superior */
.wtop { position: sticky; top: 0; z-index: 30; height: 72px; display: grid; grid-template-columns: 1fr minmax(0, 400px) 1fr; align-items: center; gap: 16px; padding: 0 20px; background: var(--overlay); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.wsearch { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; color: var(--muted); transition: border-color .15s; }
.wsearch:focus-within { border-color: var(--line2); }
.wsearch input { border: 0; background: transparent; padding: 0; height: 100%; box-shadow: none !important; font-size: 16px; color: var(--ink); }
.wsearch kbd { font: 500 12px 'Inter Tight', sans-serif; color: var(--muted); border: 1px solid var(--line2); border-radius: 7px; padding: 3px 7px; }
.wsearch.big { height: 54px; }
.wtop-r { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.top-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: transparent; border: 0; cursor: pointer; margin: 0; transition: background .15s; }
.top-ic:hover { background: var(--surface2); color: var(--ink); }
.top-link { color: var(--ink); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.top-link:hover { background: var(--surface2); }
.wtop .avatar { position: relative; width: 42px; height: 42px; background: var(--surface2); color: var(--ink); border: 1px solid var(--line2); font-size: 14px; margin-left: 6px; }
.av-chev { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--muted); }
.wtop .menu-pop { top: 52px; }

/* Barra lateral */
.shell { display: flex; }
.wmain { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 72px); }
.wside { width: 272px; flex: none; position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; gap: 6px; padding: 20px 12px 14px; border-right: 1px solid var(--line); overflow-y: auto; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 4px 14px; }
.tile { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: var(--surface2); color: var(--ink); border: 1px solid var(--line); transition: transform .15s var(--ease), border-color .15s; }
.tile:hover { transform: translateY(-1px); border-color: var(--line2); }
.tile.prod { background: color-mix(in srgb, var(--pa) 18%, var(--surface2)); }
.tile.on { border: 2px solid var(--ink); }
.tile.add { color: var(--muted); }
.snav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.snav-h { font-size: 14px; color: var(--muted); padding: 8px 12px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snav { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; font-size: 16px; font-weight: 500; color: var(--ink); transition: background .15s; }
.snav:hover { background: var(--surface2); }
.snav.on { background: var(--surface2); }
.snav-ic { width: 22px; display: grid; place-items: center; color: var(--ink); flex: none; }
.snav-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wside-foot { margin-top: auto; display: flex; align-items: center; gap: 4px; padding-top: 8px; }
.wside-foot .snav { flex: 1; }
html.side-min .wside { width: 84px; }
html.side-min .wside .snav-l, html.side-min .wside .snav-h, html.side-min .wside .tiles .tile:not(.on):not(:first-child) { display: none; }
html.side-min .wside .snav { justify-content: center; padding: 12px 0; }
html.side-min .wside-foot { flex-direction: column; }
html.side-min .tiles { justify-content: center; }

/* Contenido: tarjetas planas con borde, como Whop */
.app { padding-top: 28px; }
.app-head { margin-bottom: 22px; } .hello-name { font-size: 26px; letter-spacing: -.035em; } .app-head .app-avatar { width: 52px; height: 52px; border-radius: 16px; }
.hero-card { border: 1px solid var(--line); }
.goal, .list, .blk, .app .syllabus, .card, .qa-ic { box-shadow: none; }
.blk, .list, .goal, .app .syllabus { border-radius: 20px; }
.qa:first-child .qa-ic { box-shadow: none; }
.list-head h2 { font-size: 20px; }
.app .list-head.first h1 { font-size: 28px; }
.page-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-title h1 { font-size: 28px; margin: 0; letter-spacing: -.035em; }
.page-title .tile { width: 52px; height: 52px; }
.page-title .grow { display: flex; flex-direction: column; }
.page-title .bell { margin-left: auto; }
.foot { margin-top: auto; }
.flash { margin-top: 18px; }

@media (max-width: 1100px) { .wside { width: 84px; } .wside .snav-l, .wside .snav-h { display: none; } .wside .snav { justify-content: center; padding: 12px 0; } .wside-foot { flex-direction: column; } .tiles { justify-content: center; } .wtop { grid-template-columns: auto minmax(0, 1fr) auto; } }
@media (max-width: 760px) {
  .wside { display: none; }
  .wtop { height: 62px; padding: 0 12px; gap: 10px; }
  .wtop .logo span { display: none; }
  .wsearch { height: 40px; }
  .wsearch kbd { display: none; }
  .hide-m { display: none; }
  .wmain { min-height: calc(100vh - 62px); }
}
.app.narrow .list-head { margin-top: 22px; margin-bottom: 8px; }
@media (max-width: 760px) { .app-head .tag { display: none; } }

/* Logo oficial Clipmaxxing */
.logo { gap: 10px; align-items: center; }
.logo-txt { display: flex; flex-direction: column; line-height: 1; }
.wordmark { font-family: Archivo, 'Inter Tight', sans-serif; font-stretch: 125%; font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: var(--ink); }
.tagline { font: 500 13px 'Inter Tight', sans-serif; color: var(--muted); margin-top: 8px; letter-spacing: 0; }
.logo-lg { gap: 16px; }
.logo-lg .wordmark { font-size: 30px; }
@media (max-width: 760px) { .wtop .logo .logo-txt { display: none; } }

/* Barra lateral: Configuraciones siempre fija abajo, el resto se desplaza */
.wside { overflow: hidden; height: calc(100vh - 72px); height: calc(100dvh - 72px); padding-bottom: 0; gap: 0; }
.wside-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; scrollbar-width: thin; }
.wside-foot { flex: none; margin-top: 0; padding: 10px 0 14px; border-top: 1px solid var(--line); background: var(--bg); }

/* ═════════ Gamificación ═════════ */
.lvl-chip { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 5px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); margin-right: 4px; transition: border-color .15s; }
.lvl-chip:hover { border-color: var(--line2); }
.lvl-ring { --p: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line2) 0); }
.lvl-ring b { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); font-size: 12px; font-weight: 700; }
.lvl-txt { display: flex; flex-direction: column; line-height: 1.1; }
.lvl-txt b { font-size: 13px; font-weight: 600; }
.lvl-txt span { font-size: 11px; color: var(--muted); }
.streak { font-size: 13px; font-weight: 600; white-space: nowrap; }
.streak.big { display: flex; flex-direction: column; align-items: center; font-size: 22px; line-height: 1; }
.streak.big small { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 3px; }

.level-card { display: block; }
.lc-top { display: flex; align-items: center; gap: 14px; }
.lc-top .grow { display: flex; flex-direction: column; line-height: 1.3; }
.lc-name { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.lc-badge { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(160deg, #c084fc, #7e22ce); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.lc-badge b { font-size: 24px; font-weight: 700; }
.lc-badge span { font-size: 8px; letter-spacing: .14em; opacity: .85; margin-top: 2px; }
.xp-bar { height: 10px; border-radius: 99px; background: var(--surface2); overflow: hidden; margin-top: 14px; }
.xp-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7e22ce, #c084fc); transition: width .8s var(--ease); }
.xp-bar.dark { background: rgba(255,255,255,.1); position: relative; z-index: 1; max-width: 70%; }

.challenges { display: flex; flex-direction: column; gap: 6px; }
.ch { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface2); }
.ch .grow { display: flex; flex-direction: column; gap: 6px; }
.ch b { font-weight: 500; font-size: 14px; }
.ch-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 16px; flex: none; }
.ch.ok .ch-ic { background: var(--brand); color: #fff; }
.ch-bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; display: block; }
.ch-bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.ch-xp { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600; font-size: 14px; line-height: 1.2; }
.ch-xp small { font-size: 11px; color: var(--brand); font-weight: 600; }
.ch.ok b { color: var(--muted); text-decoration: line-through; }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); opacity: .55; }
.ach.on { opacity: 1; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 75%); }
.ach-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--surface2); color: var(--muted); margin-bottom: 6px; }
.ach.on .ach-ic { background: var(--surface); }
.ach b { font-size: 14px; font-weight: 600; }
.ach .small { line-height: 1.35; }
.ach-xp { position: absolute; top: 14px; right: 12px; font-size: 11px; font-weight: 600; color: var(--brand); }
.rank { width: 32px; text-align: center; font-weight: 600; color: var(--muted); font-size: 15px; flex: none; }
.row.me { background: var(--brand-soft); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 18px 40px -14px rgba(0,0,0,.45); animation: toastIn .5s var(--ease) both; animation-delay: var(--d); transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translateX(30px); }
.toast .grow { display: flex; flex-direction: column; line-height: 1.3; }
.toast b { font-size: 14px; font-weight: 600; }
.toast .grow span { font-size: 12px; color: var(--brand); font-weight: 600; }
.toast-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--brand-soft); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@media (max-width: 760px) { .toasts { left: 16px; right: 16px; bottom: 96px; max-width: none; } .lvl-chip { padding-right: 8px; } }

/* ═════════ Perfil ═════════ */
.prof-head { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.prof-head h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.04em; }
.prof-head .grow { display: flex; flex-direction: column; gap: 4px; }
.prof-head .xp-bar { max-width: 420px; margin-top: 10px; }
.prof-av { position: relative; width: 104px; height: 104px; border-radius: 30px; display: grid; place-items: center; font-size: 44px; font-weight: 700; color: #fff; background: linear-gradient(160deg, #c084fc, #7e22ce); flex: none; }
.prof-lvl { position: absolute; right: -8px; bottom: -8px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-size: 15px; font-weight: 700; border: 4px solid var(--bg); }
.prof-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag.accent { background: var(--brand-soft); color: var(--brand); }
.pstats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.pstat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.pstat-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.pstat b { font-size: 20px; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.pstat span:last-child { font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) { .pstats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .pstats { grid-template-columns: repeat(2, 1fr); } .prof-head { gap: 16px; } .prof-av { width: 76px; height: 76px; font-size: 32px; border-radius: 22px; } .prof-head h1 { font-size: 24px; } }

.vc-num { font-size: 64px; font-weight: 700; letter-spacing: -.05em; line-height: 1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.vc-num span { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.vcount .xp-bar { margin-top: 10px; margin-bottom: 6px; }
.vc-btns { display: flex; gap: 8px; margin-top: 16px; }
.vc-btns form { display: contents; }
.vc-btns .btn { flex: 1; padding: 12px 10px; }
.vc-btns .vc-main { flex: 2; font-size: 16px; font-weight: 600; }
.vc-more { margin-top: 12px; }
.vc-more summary { list-style: none; cursor: pointer; }
.vc-more summary::-webkit-details-marker { display: none; }

.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before { content: ''; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.rs { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 9px 0; }
.rs .grow { display: flex; flex-direction: column; line-height: 1.35; padding-top: 6px; }
.rs b { font-weight: 500; font-size: 15px; }
.rs-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--dim); border: 2px solid var(--surface); flex: none; }
.rs.done .rs-dot { background: var(--brand); color: #fff; }
.rs.done b { color: var(--muted); }
.rs.cur .rs-dot { background: var(--surface); color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.rs.cur b { font-weight: 600; }
.rs-xp { font-size: 12px; font-weight: 600; color: var(--dim); padding-top: 9px; white-space: nowrap; }
.rs-xp.got { color: var(--brand); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--surface2); border: 1px solid var(--line); cursor: default; }
.only-m { display: none !important; }
@media (max-width: 760px) {
  .only-m { display: grid !important; }
  .wtop { grid-template-columns: auto 1fr; }
  .wtop .wsearch { display: none; }
  .wtop .lvl-chip .lvl-txt { display: none; }
  .wtop-r { gap: 2px; }
  .wtop .top-ic { width: 38px; height: 38px; }
}

/* Formularios dentro de tarjetas: aire entre campos y botón */
.blk.stack { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.blk.stack > .blk-head { margin-bottom: 0; }
.blk.stack > .btn { align-self: flex-start; margin-top: 6px; }

/* ═════════ Social ═════════ */
.list-head.first { align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.list-head.first > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.seg.filter { margin: 0; display: inline-flex; }
.seg.filter a { padding: 6px 14px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg.filter a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.pstats.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .pstats.four { grid-template-columns: repeat(2, 1fr); } }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 10px 0; overflow: hidden; }
.pod b { font-size: 15px; font-weight: 600; }
.pod .small { font-size: 11px; }
.pod-av { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; background: var(--surface2); margin-bottom: 6px; }
.pod.p1 .pod-av { width: 68px; height: 68px; background: linear-gradient(160deg, #c084fc, #7e22ce); color: #fff; }
.pod-medal { position: absolute; right: -6px; bottom: -6px; font-size: 20px; }
.pod-step { width: 100%; margin-top: 12px; padding: 10px 0; font-size: 22px; font-weight: 700; color: var(--muted); background: var(--surface2); }
.pod.p1 .pod-step { padding: 22px 0; color: var(--brand); background: var(--brand-soft); }
.pod.p2 .pod-step { padding: 14px 0; }

.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.chart-head h3 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.chart-total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.chart-total b { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.chart-total span { font-size: 11px; color: var(--muted); }
.cc { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 170px auto; column-gap: 8px; }
.cc-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); text-align: right; transform: translateY(-6px); height: calc(100% + 12px); }
.cc-plot { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; height: 100%; }
.cc-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.cc-grid i { display: block; height: 1px; background: var(--line); }
.cc-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; border-radius: 6px; }
.cc-col:hover, .cc-col:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.cc-bar { position: relative; z-index: 1; width: min(24px, 60%); min-height: 0; background: var(--brand); border-radius: 4px 4px 0 0; transition: height .6s var(--ease); }
.cc-val { position: absolute; z-index: 2; font-size: 11px; font-weight: 600; color: var(--ink); }
.cc-x { grid-column: 2; display: grid; grid-template-columns: repeat(14, 1fr); margin-top: 8px; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; }
.cc-tip { position: fixed; z-index: 80; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 500; pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap; }
.chart-table { margin-top: 12px; }
.chart-table summary { list-style: none; cursor: pointer; }
.chart-table summary::-webkit-details-marker { display: none; }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.chart-table td:last-child, .chart-table th:last-child { text-align: right; }
@media (max-width: 600px) { .cc-x span:nth-child(4n+2) { visibility: hidden; } }

.board-tabs { margin: 4px 0 0; }
.board .grow { gap: 6px; }
.hbar { display: block; height: 6px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.feed-t { font-size: 14px; line-height: 1.35; }
.feed-t b { font-weight: 600; }

/* ═════════ Menú del curso en la barra lateral ═════════ */
.snav { position: relative; }
.snav-badge { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.snav-ext { margin-left: auto; color: var(--dim); }
.course-nav .snav-h { font-weight: 600; color: var(--ink); font-size: 15px; }
.cn-progress { margin: 2px 4px 8px; padding: 12px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cn-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.cn-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.cn-bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.cn-continue { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--brand); color: #fff; }
.cn-continue:hover { filter: brightness(1.08); }
.cn-continue .grow { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cn-continue b { font-size: 13px; }
.cn-continue .grow span { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-continue.done { background: var(--brand-soft); color: var(--ink); }
.cn-play { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.cn-eps summary { list-style: none; cursor: pointer; }
.cn-eps summary::-webkit-details-marker { display: none; }
.cn-chev { color: var(--dim); transition: transform .2s var(--ease); margin-left: 4px; }
.cn-eps[open] .cn-chev { transform: rotate(180deg); }
.cn-mods { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px 22px; }
.cn-mod-h { font-size: 12px; color: var(--muted); padding: 6px 8px 2px; display: flex; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-mod-h span { color: var(--dim); font-family: 'JetBrains Mono', monospace; }
.cn-ep { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14px; color: var(--ink2); }
.cn-ep:hover { background: var(--surface2); }
.cn-ep.on { background: var(--surface2); color: var(--ink); font-weight: 500; }
.cn-ep.done { color: var(--muted); }
.cn-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; color: #fff; }
.cn-ep.done .cn-dot { background: var(--brand); border-color: var(--brand); }
.cn-ep.on .cn-dot { border-color: var(--brand); }
html.side-min .wside .cn-progress, html.side-min .wside .cn-mods, html.side-min .wside .snav-badge, html.side-min .wside .snav-ext, html.side-min .wside .cn-chev { display: none; }
@media (max-width: 1100px) { .wside .cn-progress, .wside .cn-mods, .wside .snav-badge, .wside .snav-ext, .wside .cn-chev { display: none; } }

/* ═════════ Certificado ═════════ */
.cert-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cert-name input { width: 220px; }
.cert { background: #fffdf8; color: #151515; border-radius: 20px; padding: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); aspect-ratio: 1.414; max-width: 980px; margin: 0 auto; }
.cert-in { height: 100%; border: 2px solid #151515; border-radius: 10px; outline: 1px solid #151515; outline-offset: -8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4% 6%; position: relative; background:
  radial-gradient(600px 300px at 0% 0%, rgba(168,85,247,.08), transparent 60%), radial-gradient(600px 300px at 100% 100%, rgba(126,34,206,.08), transparent 60%); }
.cert-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4%; }
.cert-logo .wordmark { color: #151515; font-size: 20px; }
.cert-kicker { font: 600 13px 'Inter Tight', sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #7e22ce; }
.cert-small { margin: 3% 0 0; color: #555; font-size: 15px; }
.cert-name-big { font-family: Archivo, 'Inter Tight', sans-serif; font-stretch: 112%; font-weight: 800; font-size: clamp(30px, 5.5vw, 58px); letter-spacing: -.03em; margin: 1% 0 0; color: #151515; line-height: 1.05; }
.cert-course { font-size: clamp(20px, 3vw, 30px); font-weight: 600; margin: 1% 0 0; color: #151515; letter-spacing: -.02em; }
.cert-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; width: 100%; margin-top: 6%; }
.cert-foot > div:not(.cert-seal) { display: flex; flex-direction: column; border-top: 1px solid #151515; padding-top: 8px; font-size: 14px; }
.cert-foot span { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: .14em; margin-top: 2px; }
.cert-seal { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: linear-gradient(160deg, #c084fc, #7e22ce); box-shadow: 0 0 0 6px #fffdf8, 0 0 0 8px #7e22ce; }
.cert-locked { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 24px; }
.cert-locked .xp-bar { width: 100%; max-width: 320px; }
.cert-lock { font-size: 40px; }
@media (max-width: 600px) { .cert { aspect-ratio: auto; padding: 10px; } .cert-in { padding: 28px 16px; } .cert-foot { gap: 12px; } .cert-seal { width: 52px; height: 52px; font-size: 24px; } }
@media print {
  @page { size: landscape; margin: 0; }
  body { background: #fff !important; }
  .wtop, .wside, .tabbar, .foot, .no-print, .flash, .toasts { display: none !important; }
  .app { padding: 0 !important; max-width: none; }
  .cert { box-shadow: none; border-radius: 0; max-width: none; height: 100vh; aspect-ratio: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Barra inferior del celular: blanca en modo claro, gris oscuro en modo oscuro */
@media (max-width: 760px) {
  .tabbar { background: var(--surface) !important; border: 1px solid var(--line); box-shadow: 0 12px 34px -10px rgba(0,0,0,.22); }
  .tabbar a { color: var(--muted); }
  .tabbar a.on { color: var(--ink); }
  :root[data-theme="dark"] .tabbar { background: #1f1f1f !important; border-color: rgba(255,255,255,.08); box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); }
}

/* ═════════ Menú del curso en celular ═════════ */
.cm-wrap { display: none; }
@media (max-width: 760px) {
  .cm-wrap { display: block; position: sticky; top: 62px; z-index: 25; background: var(--overlay); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .cm-bar { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
  .cm-bar::-webkit-scrollbar { display: none; }
  .cm-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); color: var(--ink); font: 500 13px 'Inter Tight', sans-serif; white-space: nowrap; cursor: pointer; }
  .cm-chip.main { background: var(--ink); color: var(--on-ink); border-color: transparent; }
  .cm-chip.accent { background: var(--brand); color: #fff; border-color: transparent; }
  .cm-pct { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--on-ink) 18%, transparent); }
  .cm-sheet { position: fixed; inset: 0; z-index: 70; }
  .cm-sheet[hidden] { display: none; }
  .cm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fadeIn .2s ease; }
  .cm-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line2); padding: 10px 12px calc(24px + env(safe-area-inset-bottom)); animation: sheetUp .28s var(--ease); }
  .cm-grab { width: 42px; height: 5px; border-radius: 99px; background: var(--line2); margin: 0 auto 6px; }
  .cm-close { position: absolute; top: 10px; right: 10px; }
  .cm-close .ic { transform: rotate(45deg); }
  .cm-panel .course-nav { margin: 0; }
  .cm-panel .snav-h { padding-right: 48px; font-size: 17px; }
  .cm-panel .cn-mods { padding-left: 14px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ═════════ VERSIÓN MORADA · solo oscuro, con resplandor ═════════ */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  --bg: #0b0912; --surface: #13101b; --surface2: #1b1626; --line: rgba(196,163,255,.09); --line2: rgba(196,163,255,.17);
  --ink: #f1edf9; --ink2: #d3cbe4; --muted: #a39cb6; --dim: #6c6580; --on-ink: #0b0912;
  --brand: #a855f7; --pa: #a855f7; --brand-soft: rgba(168,85,247,.16); --hero: #171124; --hero-ink: #ffffff;
  --overlay: rgba(11,9,18,.82); --ok: #4ade80; --ok-bg: rgba(74,222,128,.08);
  --glow: 0 0 0 1px rgba(168,85,247,.35), 0 10px 40px -10px rgba(168,85,247,.65);
  color-scheme: dark;
}
.theme-toggle, .bare-toggle { display: none !important; }
body { background: radial-gradient(900px 500px at 85% -10%, rgba(168,85,247,.14), transparent 60%), radial-gradient(700px 500px at -10% 110%, rgba(126,34,206,.12), transparent 60%), var(--bg); background-attachment: fixed; }
.btn { background: linear-gradient(135deg, #c084fc, #a855f7 45%, #7e22ce); box-shadow: 0 10px 30px -10px rgba(168,85,247,.85), inset 0 1px 0 rgba(255,255,255,.22); }
.btn:hover { filter: brightness(1.12); box-shadow: 0 14px 40px -8px rgba(168,85,247,1), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-ghost { background: var(--surface2); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; }
.mark { filter: drop-shadow(0 0 10px rgba(168,85,247,.55)); }
.wtop { background: rgba(11,9,18,.78); }
.hero-card { background: radial-gradient(420px 220px at 100% 0%, rgba(168,85,247,.28), transparent 70%), linear-gradient(160deg, #1c1430, #120d1d); border-color: rgba(168,85,247,.25); box-shadow: 0 30px 70px -40px rgba(168,85,247,.7); }
.ring-fg { stroke: url(#none); stroke: #b77cfb; filter: drop-shadow(0 0 8px rgba(168,85,247,.8)); }
.qa:first-child .qa-ic, .continue-play, .cn-continue, .goal-ic { box-shadow: 0 0 24px -4px rgba(168,85,247,.75); }
.qa-ic { background: var(--surface2); }
.tile.on, .rail-i.on { border-color: #c084fc; box-shadow: 0 0 18px -4px rgba(168,85,247,.8); }
.lvl-ring { background: conic-gradient(#c084fc calc(var(--p) * 1%), var(--line2) 0); }
.lvl-chip { box-shadow: 0 0 0 1px rgba(168,85,247,.25); }
.xp-bar span, .bar span, .cn-bar span, .ch-bar span, .hbar span, .cc-bar { background: linear-gradient(90deg, #7e22ce, #a855f7, #c084fc); box-shadow: 0 0 12px rgba(168,85,247,.6); }
.blk, .list, .goal, .card, .app .syllabus, .pstat, .ach, .pod, .vt { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.blk:hover, .ach.on, .row.me { border-color: rgba(168,85,247,.35); }
.lc-badge, .prof-av, .pod.p1 .pod-av { background: linear-gradient(160deg, #c084fc, #7e22ce); box-shadow: 0 0 30px -6px rgba(168,85,247,.85); }
.tabbar, :root[data-theme="dark"] .tabbar { background: rgba(23,17,36,.92) !important; border: 1px solid rgba(168,85,247,.25) !important; box-shadow: 0 16px 40px -12px rgba(0,0,0,.8), 0 0 30px -10px rgba(168,85,247,.5) !important; }
.tabbar a.on .tb-ic { box-shadow: 0 0 20px -2px rgba(168,85,247,.9); }
.toast { border-color: rgba(168,85,247,.5); box-shadow: 0 18px 40px -14px rgba(0,0,0,.6), 0 0 30px -10px rgba(168,85,247,.7); }
.cert-in { background: radial-gradient(600px 300px at 0% 0%, rgba(168,85,247,.10), transparent 60%), radial-gradient(600px 300px at 100% 100%, rgba(126,34,206,.10), transparent 60%); }
.cert-kicker { color: #7e22ce; }
.cert-seal { background: linear-gradient(160deg, #c084fc, #7e22ce); box-shadow: 0 0 0 6px #fffdf8, 0 0 0 8px #7e22ce; }
.auth-card { box-shadow: 0 40px 90px -40px rgba(168,85,247,.55); border-color: rgba(168,85,247,.2); }
.flash { background: rgba(168,85,247,.12); color: #e9d5ff; }


/* ════════════ DARK EDITORIAL TECH (app) ════════════
   Inter Tight (títulos y texto) · Instrument Serif itálica (palabra clave / subtítulos) · JetBrains Mono (metadata y botones) */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  --bg: #0E0B14; --surface: #17121F; --surface2: #1C1626; --line: #2A2236; --line2: #3A3245;
  --ink: #F2EFEA; --ink2: #CFC9D6; --muted: #8A8296; --dim: #5E566B; --on-ink: #0E0B14;
  --brand: #9B5CFF; --pa: #9B5CFF; --brand-soft: rgba(155,92,255,.12); --hero: #17121F; --hero-ink: #F2EFEA;
  --overlay: rgba(14,11,20,.86); --shadow: none; --glow: #5B2A9E;
}
body { background: var(--bg) !important; font-family: 'Inter Tight', system-ui, sans-serif; letter-spacing: -.005em; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: .035; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
h1, h2, h3, .hello-name, .blk-title, .lc-name, .prof-head h1, .display, .display-s { font-family: 'Inter Tight', sans-serif; font-weight: 800; letter-spacing: -.045em; }
h1 { line-height: .95; }
h2, .list-head h2 { font-weight: 700; letter-spacing: -.035em; }
.row .grow b, .snav, .goal .grow b { letter-spacing: -.015em; }

/* Serif itálica: subtítulos y frases con personalidad */
.app-head .grow > .muted.small, .tagline, .lead, .auth-card > p.muted, .hc-dim { font-family: 'Instrument Serif', Georgia, serif !important; font-style: italic; font-size: 19px !important; letter-spacing: -.005em; color: var(--ink2) !important; }

/* Mono: metadata, etiquetas, numeraciones y botones */
.eyebrow, .snav-h, .blk-label, .hc-top > span, .seg-mini, .tag, .pill-new, .meta, .lbl, .menu-email, .crumbs, .bell-h, .cn-row, .cn-mod-h,
.stat-cell span, .pstat span:last-child, .ch-xp small, .rs-xp, .list-head .link, .list-head > .muted, .snav-badge, .lock-pill, .tb-l,
.qa-l, .edit-type, .chart-total span, .cc-y, .cc-x, .kick, .doc-meta, .wsearch kbd, .av-chev, .trend, .vc-num span, .mod-n, .step-n, .live-date span {
  font-family: 'JetBrains Mono', monospace !important; text-transform: uppercase; letter-spacing: .16em; font-weight: 500; }
.eyebrow, .snav-h, .blk-label, .hc-top > span, .tag, .meta, .lbl, .crumbs, .cn-row, .list-head .link, .list-head > .muted, .qa-l, .trend { font-size: 10.5px !important; color: var(--muted); }
.eyebrow::before { background: var(--brand); }
.snav-h { padding-top: 14px; }
.course-nav .snav-h { font-family: 'Inter Tight', sans-serif !important; text-transform: none; letter-spacing: -.02em; font-size: 15px !important; color: var(--ink); font-weight: 700; }

/* Botones: píldora en acento, mono mayúscula oscura */
.btn { background: var(--brand); color: #0E0B14; border: 1px solid var(--brand); border-radius: 99px; box-shadow: none !important; filter: none !important;
  font: 600 11.5px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; }
.btn:hover { background: #A873FF; transform: translateY(-1px); }
.btn-ghost, .btn-dark { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover, .btn-dark:hover { background: var(--surface2); border-color: var(--line2); }
.btn-whop { background: var(--brand); color: #0E0B14; }
.btn-sm { font-size: 10.5px; padding: 8px 14px; }

/* Superficies con borde de 1px, sin sombras ni brillos */
.card, .blk, .list, .goal, .app .syllabus, .pstat, .ach, .pod, .hero-card, .bell-pop, .menu-pop, .toast, .level-card, .cn-progress, .tabbar, .lvl-chip, .icon-btn, .tile, .qa-ic, .avatar, .stat-cell, .ch {
  box-shadow: none !important; filter: none !important; }
.card, .blk, .list, .goal, .app .syllabus, .pstat, .ach, .pod { background: var(--surface); border: 1px solid var(--line); }
.blk:hover, .ach.on, .row.me, .hoverable:hover { border-color: var(--line2); }
.hero-card { background: radial-gradient(380px 220px at 100% 0%, rgba(91,42,158,.45), transparent 70%), var(--surface) !important; border: 1px solid var(--line) !important; }
.blk-welcome, .blk-bonus { background: radial-gradient(360px 200px at 100% 0%, rgba(91,42,158,.35), transparent 70%), var(--surface); color: var(--ink); }
.blk-bonus .muted, .blk-bonus .blk-head { color: var(--muted); }
.blk-ic, .goal-ic, .pstat-ic, .type-ic, .ch-ic, .row-av { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.big-num { font-family: 'Inter Tight', sans-serif; font-weight: 800; letter-spacing: -.055em; color: var(--ink); }
.big-num span { color: var(--line2); }
.trend b, .trend .ic { color: var(--brand); }
.seg-mini { background: transparent; border: 1px solid var(--line); }
.seg-mini .on { background: var(--brand); color: #0E0B14; }
.qa-ic { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.qa:first-child .qa-ic { background: var(--brand); color: #0E0B14; border-color: var(--brand); }
.ring-fg { stroke: var(--brand); filter: none !important; }
.ring-bg { stroke: rgba(242,239,234,.05); }
.xp-bar span, .bar span, .cn-bar span, .ch-bar span, .hbar span, .cc-bar, .goal .bar span { background: var(--brand) !important; box-shadow: none !important; }
.goal .bar span { background: var(--ink) !important; }
.lc-badge, .prof-av, .pod.p1 .pod-av { background: transparent !important; border: 1px solid var(--brand); color: var(--ink); box-shadow: none !important; }
.lc-badge b, .prof-av { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; color: var(--brand); }
.prof-av { font-size: 56px; }
.prof-lvl { background: var(--brand); color: #0E0B14; border-color: var(--bg); font-family: 'JetBrains Mono', monospace; }
.tile.on, .rail-i.on { border: 1px solid var(--brand); box-shadow: none !important; }
.tile.prod { background: var(--surface2); }
.snav.on { background: var(--surface2); box-shadow: inset 2px 0 0 var(--brand); }
.cn-continue { background: var(--brand); color: #0E0B14; box-shadow: none !important; }
.cn-continue .grow span { opacity: .7; }
.lvl-ring { background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0); }
.lvl-ring b { background: var(--bg); }
.lvl-chip { background: transparent; border: 1px solid var(--line); }
.lvl-txt b { font-family: 'JetBrains Mono', monospace; letter-spacing: .08em; font-size: 11px; }
.tabbar, :root[data-theme="dark"] .tabbar { background: rgba(23,18,31,.95) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.tabbar a.on .tb-ic { background: var(--brand); color: #0E0B14; box-shadow: none !important; }
.toast { border-color: var(--line); }
.toast .grow span { color: var(--brand); font-family: 'JetBrains Mono', monospace; letter-spacing: .1em; font-size: 11px; }
.toast-ic { background: transparent; border: 1px solid var(--line); }
.pill-new { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
.les.done .les-ic, .cn-ep.done .cn-dot { background: var(--brand); border-color: var(--brand); color: #0E0B14; }
.les.cur .les-ic { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
.app .mod-n { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.chk { border-color: var(--line2); }
.checks input:checked + .chk { background: var(--brand); border-color: var(--brand); color: #0E0B14; }
.mark { filter: none !important; }
.wtop { background: rgba(14,11,20,.86) !important; }
.wsearch { background: transparent; border: 1px solid var(--line); }
.auth-card { background: var(--surface); border: 1px solid var(--line); box-shadow: none !important; }
.flash { background: transparent; border: 1px solid var(--line); color: var(--ink); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.flash::before { content: '● '; color: var(--brand); }
.err { background: transparent; border: 1px solid rgba(251,146,60,.35); }
input, select, textarea { background: var(--bg); border-color: var(--line); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(155,92,255,.15); }
.cover { background: radial-gradient(120% 90% at 100% 0%, rgba(91,42,158,.5), transparent 60%), var(--surface2) !important; }
.cover-art::before { display: none; }
.cover-word { font-family: 'Inter Tight', sans-serif; font-weight: 800; letter-spacing: -.05em; }
.cover-emoji { background: transparent; border: 1px solid var(--line); }
.cert-name-big { font-family: 'Inter Tight', sans-serif; font-weight: 800; letter-spacing: -.05em; }
.cert-course { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
.stat-cell b, .pstat b, .ar-n, .goal-pct, .row-amt, .vc-num, .stat, .chart-total b, .cd b { font-family: 'Inter Tight', sans-serif; font-weight: 800; letter-spacing: -.045em; }
.foot-in { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ch-ic, .tile.prod, .row-av.tint, .app-avatar.tint, .cover-emoji, .rank, .streak, .badge, .ach-ic, .toast-ic { filter: grayscale(1) brightness(1.15) !important; }
.ach.on .ach-ic { filter: none !important; }

/* ===== Interacción nativa: toasts flotantes, botones en curso, sin saltos ===== */
.toast.mini { padding: 10px 14px 10px 10px; }
.toast.mini .toast-ic { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; filter: none !important; color: var(--brand); }
.toasts { pointer-events: none; } .toast { pointer-events: auto; animation: toastIn .28s var(--ease, ease) both; transition: opacity .3s, transform .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
form.busy button { opacity: .55; pointer-events: none; }
button:active:not(:disabled), .btn:active { transform: scale(.97); }
.vc-num.bump { animation: vcBump .35s var(--ease, ease); }
@keyframes vcBump { 40% { transform: scale(1.06); color: var(--brand); } }
html { overflow-anchor: auto; -webkit-tap-highlight-color: transparent; }
.prof-head { position: relative; }
.prof-cfg { position: absolute; top: 0; right: 0; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; }
.res-item[hidden], [data-catblock][hidden] { display: none !important; }
[id] { scroll-margin-top: 84px; }
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast:nth-child(n+3) { display: none; }
}
