/* IA Kids & Teens — sistema visual
 * Marca verificada en kids.ia.university: Poppins, violeta oklch(0.52 0.23 279) ≈ #5647E7,
 * lima oklch(0.9 0.19 118) ≈ #D4EE40, marino oklch(0.19 0.05 270) ≈ #0B122A.
 * Naranja #FF5B00 de IA University solo para acentos institucionales.
 */
:root {
  --violet: #5647E7; --violet-strong: #4234D2; --violet-soft: #EEEDFD; --on-violet: #FFFFFF;
  --lime: #D4EE40; --lime-soft: #F3F9CF; --on-lime: #1D2400;
  --navy: #090C27; --navy-2: #151A45;
  --orange: #FF5B00; --orange-ink: #B84200;
  --ink: #0B122A; --ink-2: #3A4163; --muted: #5A6080;
  --paper: #FCFDFF; --surface: #FFFFFF; --surface-2: #F4F5FC; --line: #E1E3F1; --line-2: #CDD1E6;
  --ok: #117A4B; --ok-soft: #DDF4E8; --warn: #9A5B00; --warn-soft: #FFF1D6; --bad: #B42318; --bad-soft: #FDE4E1;
  --info-soft: #EEEDFD;
  --pp-paper: #F7F4EC; --pp-line: #E5DFCF; --pp-ink: #2A2B3D;
  --stamp-bg: transparent; --radius: 20px; --radius-s: 12px; --shadow: 0 1px 2px rgba(11, 18, 42, .05), 0 8px 24px -12px rgba(11, 18, 42, .12);
  --fs-base: 15px;
  --font: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --violet: #7B6DFF; --violet-strong: #9488FF; --violet-soft: #221F55; --on-violet: #FFFFFF;
    --lime-soft: #2A3108; --ink: #EEF0FF; --ink-2: #C5C9E8; --muted: #A2A7CC;
    --paper: #090C27; --surface: #11163A; --surface-2: #181E4A; --line: #252B5C; --line-2: #343B72;
    --ok: #5BD69A; --ok-soft: #0F3325; --warn: #F5B94D; --warn-soft: #3A2A0A; --bad: #FF8A7A; --bad-soft: #3D1512; --info-soft: #221F55;
    --orange-ink: #FF8A4C; --stamp-bg: #F2EEE2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --violet: #7B6DFF; --violet-strong: #9488FF; --violet-soft: #221F55; --on-violet: #FFFFFF;
  --lime-soft: #2A3108; --ink: #EEF0FF; --ink-2: #C5C9E8; --muted: #A2A7CC;
  --paper: #090C27; --surface: #11163A; --surface-2: #181E4A; --line: #252B5C; --line-2: #343B72;
  --ok: #5BD69A; --ok-soft: #0F3325; --warn: #F5B94D; --warn-soft: #3A2A0A; --bad: #FF8A7A; --bad-soft: #3D1512; --info-soft: #221F55;
  --orange-ink: #FF8A4C; --stamp-bg: #F2EEE2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--fs-base); line-height: 1.55; }
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 800; }
h2 { font-size: 1.45rem; }
.h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.h4 { font-size: .98rem; display: flex; align-items: center; gap: 6px; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .strong { font-weight: 600; } .block { display: block; } .center { text-align: center; justify-content: center; }
.tnum { font-variant-numeric: tabular-nums; } .mono { font-family: var(--mono); }
.grow { flex: 1; }
.lead { color: var(--ink-2); font-size: 1.02rem; max-width: 62ch; margin-top: 6px; }
.eyebrow { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--violet); }
.ic { width: 1.15em; height: 1.15em; flex: none; stroke-width: 2; vertical-align: -0.2em; }
svg.lucide { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.ic-lg, svg.ic-lg { width: 28px; height: 28px; } .ic-xl, svg.ic-xl { width: 44px; height: 44px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.between, .between { justify-content: space-between; }
.gap-s { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; } .stack-s { display: flex; flex-direction: column; gap: 4px; } .stack-l { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.link { color: var(--violet); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }

/* ───────── Botones ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; white-space: normal; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--violet); color: var(--on-violet); box-shadow: 0 6px 16px -8px rgba(86, 71, 231, .7); }
.btn-primary:hover { background: var(--violet-strong); }
.btn-lime { background: var(--lime); color: var(--on-lime); }
.btn-lime:hover { filter: brightness(.96); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: 1rem; }
.btn-xl { min-height: 56px; padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.on { background: var(--violet); color: #fff; border-color: var(--violet); }
.icon-btn .dot { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--orange); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.icon-btn.lang { font-weight: 700; font-size: .8rem; }
.chip-btn { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; font-size: .86rem; }
.chip-btn.on, .chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ───────── Chips de estado (icono + texto, nunca solo color) ───────── */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.chip .ic, .chip svg { width: 14px; height: 14px; }
.chip-soft { background: var(--surface-2); color: var(--ink-2); }
.chip-violet { background: var(--violet-soft); color: var(--violet); }
.chip-lime { background: var(--lime); color: var(--on-lime); }
.chip-orange { background: #FFE9DC; color: #A33A00; }
.st-available { background: var(--violet-soft); color: var(--violet); }
.st-progress { background: var(--lime-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--lime); }
.st-review { background: var(--warn-soft); color: var(--warn); }
.st-changes { background: var(--bad-soft); color: var(--bad); }
.st-completed { background: var(--ok-soft); color: var(--ok); }
.st-locked { background: var(--surface-2); color: var(--muted); }
.area-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.area-tag .ic, .area-tag svg { color: var(--violet); }

/* ───────── Barras de progreso ───────── */
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), #8B7DFF); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* ───────── Barra de demostración ───────── */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px; background: #1B1F3F; color: #E6E8FF; font-size: .8rem; border-bottom: 2px dashed #FF5B00; }
.demo-tag { display: inline-flex; align-items: center; line-height: 0; }
.demo-tag img { height: 24px; width: auto; display: block; }
.demo-tag:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.demo-f { display: inline-flex; align-items: center; gap: 6px; }
.demo-f select { background: #2A2F5E; color: #fff; border: 1px solid #454B85; border-radius: 8px; padding: 4px 8px; min-height: 32px; }
.demo-chk input { accent-color: #FF5B00; width: 18px; height: 18px; }
.demo-b { background: transparent; color: #fff; border: 1px solid #454B85; border-radius: 8px; padding: 4px 10px; min-height: 32px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.demo-b:hover { background: #2A2F5E; }
.demo-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; color: var(--orange-ink); background: color-mix(in srgb, var(--orange) 8%, transparent); border: 1px dashed color-mix(in srgb, var(--orange) 50%, transparent); padding: 8px 12px; border-radius: 10px; }
.demo-badge { position: absolute; top: 12px; left: 12px; background: rgba(9, 12, 39, .7); color: #FFB48A; font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; }

/* ───────── Estructura ───────── */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #E8EAFF; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; overflow-y: auto; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-lockup .logo-img { height: 30px; width: auto; }
.brand-kids { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; white-space: nowrap; }
.side .brand-kids, .on-dark .brand-kids { color: #fff; }
.iau-mark { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: #fff; }
.iau-mark i { color: var(--orange); font-style: normal; }
.iau-name { color: var(--orange-ink); }
.side-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.side-nav.sec { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; color: #C9CCF2; text-decoration: none; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: var(--violet); color: #fff; box-shadow: 0 8px 20px -10px #5647E7; }
.side-nav a.on .ic, .side-nav a.on svg { color: var(--lime); }
.side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side-me .small { display: block; color: #AEB2DC; }
.role-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--lime); color: var(--on-lime); }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 28px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-brand { display: none; }
.top-search { flex: 1; max-width: 460px; }
.save-state { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
.only-m { display: none; }
#view { padding: 28px; outline: none; flex: 1; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 28px 28px; border-top: 1px solid var(--line); }
.offline-bar { display: flex; align-items: center; gap: 8px; padding: 10px 28px; background: var(--warn-soft); color: var(--warn); font-weight: 500; font-size: .9rem; }
.page { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .9rem; min-height: 32px; }
.back:hover { color: var(--ink); }
.search-field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); }
.search-field:focus-within { border-color: var(--violet); }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); min-height: 40px; }
.tabbar, .help-tab { display: none; }
.help-tab { position: fixed; right: 0; top: 46%; z-index: 30; writing-mode: vertical-rl; transform: rotate(180deg); background: var(--violet); color: #fff; border: 0; border-radius: 0 12px 12px 0; padding: 14px 9px; font-weight: 600; cursor: pointer; gap: 6px; align-items: center; box-shadow: var(--shadow); }
@media (min-width: 961px) { .help-tab { display: inline-flex; } }

/* ───────── Ilustraciones de misión ───────── */
.illus { position: relative; overflow: hidden; background: var(--tint); display: grid; place-items: center; border-radius: 16px; min-height: 120px; isolation: isolate; }
.illus .blob { position: absolute; border-radius: 50%; background: var(--ink); opacity: .12; z-index: -1; }
.illus .b1 { width: 55%; aspect-ratio: 1; }
.illus .b2 { width: 32%; aspect-ratio: 1; background: #D4EE40; opacity: .7; }
.illus .spark { position: absolute; color: var(--ink); opacity: .7; }
.illus .s1 { top: 14%; right: 18%; } .illus .s2 { bottom: 16%; left: 14%; transform: scale(.7); }
.illus-ic { width: 38%; max-width: 110px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 30%; background: #fff; color: var(--ink); box-shadow: 0 10px 24px -12px rgba(11, 18, 42, .45); transform: rotate(-6deg); }
.illus-ic svg { width: 52%; height: 52%; }
.illus-sm { min-height: 110px; } .illus-md { min-height: 160px; } .illus-lg { min-height: 220px; height: 100%; } .illus-xl { min-height: 260px; }

/* ───────── Inicio ───────── */
.home-greet { display: flex; align-items: center; gap: 16px; }
.hero-mission { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.6fr) minmax(170px, .7fr); gap: 24px; padding: 20px; align-items: stretch; border: 2px solid var(--violet); }
.hm-c { background: linear-gradient(135deg, var(--surface) 60%, var(--violet-soft)); }
.hm-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding-block: 6px; }
.hm-main h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; }
.hm-main h2 a { text-decoration: none; }
.hm-main h2 a:hover { color: var(--violet); }
.hm-tag { color: var(--ink-2); }
.hm-progress { display: flex; flex-direction: column; gap: 6px; }
.hm-cta { margin-top: auto; }
.hm-reward { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; border-radius: 16px; background: var(--lime-soft); }
.next-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.next-step > .ic, .next-step > svg { width: 24px; height: 24px; color: var(--violet); margin-top: 2px; }
.next-step .label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.step-title { font-weight: 700; font-size: 1.05rem; }
.step-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--violet); color: #fff; flex: none; }
.warn-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--bad-soft); color: var(--ink); }
.warn-box > .ic, .warn-box > svg { color: var(--bad); width: 24px; height: 24px; flex: none; }
.ok-box { background: var(--ok-soft); } .ok-box > svg { color: var(--ok); }
.quote { font-style: italic; color: var(--ink-2); }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-grid > .card { display: flex; flex-direction: column; gap: 14px; }
.lv-row { display: flex; align-items: center; gap: 12px; }
.lv-badge { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--lime); font-weight: 800; font-size: 1.2rem; }
.lv-name { display: block; font-size: 1.15rem; }
.pp-strip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stamp-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; }
.event { display: flex; gap: 12px; align-items: flex-start; }
.date-block { flex: none; width: 56px; text-align: center; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.date-block span { display: block; background: var(--orange); color: #fff; font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.date-block strong { display: block; font-size: 1.4rem; padding: 2px 0 4px; }
.event-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event-sm .date-block { width: 46px; } .event-sm .date-block strong { font-size: 1.1rem; }
.community-peek { display: flex; flex-direction: column; gap: 14px; }
.peek-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.peek { padding: 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.peek:hover { border-color: var(--violet); }
.peek-img { border-radius: 12px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.peek-b { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }

/* ───────── Misiones ───────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.toolbar .search-field { width: min(100%, 300px); }
.m-group { display: flex; flex-direction: column; gap: 14px; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.m-feature { display: grid; }
.m-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; text-decoration: none; transition: transform .15s, border-color .15s; }
.m-card:hover { transform: translateY(-2px); border-color: var(--violet); }
.m-card-big { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; }
.m-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 6px; }
.m-body h3 { font-size: 1.12rem; }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); align-items: center; }
.m-meta span { display: inline-flex; align-items: center; gap: 4px; }
.is-locked .illus { filter: grayscale(.85); opacity: .7; }
.lock-note { font-size: .84rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.diff { display: inline-flex; align-items: center; gap: 3px; }
.diff i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.diff i.on { background: var(--violet); }
.diff span { margin-left: 4px; }
.m-hero { display: grid; grid-template-columns: minmax(220px, 1fr) 1.6fr; gap: 24px; padding: 18px; }
.m-hero-b { display: flex; flex-direction: column; gap: 12px; padding-block: 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: .92rem; }
.m-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.side-stamp { display: flex; align-items: center; gap: 12px; }
.side-stamp > div:last-child { display: flex; flex-direction: column; gap: 2px; }
.ticks, .dots { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ticks li, .dots li { position: relative; padding-left: 26px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); box-shadow: inset 0 0 0 4px var(--lime), inset 0 0 0 16px var(--on-lime); transform: scale(.75); }
.dots li::before { content: ''; position: absolute; left: 6px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
.stage { padding: 6px; }
.stage-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.stage-h > div { flex: 1; }
.stage-n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: var(--lime); font-weight: 800; }
.lessons { list-style: none; margin: 0; padding: 0; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; min-height: 56px; }
a.lesson-row:hover { background: var(--surface-2); }
.lesson-row.next { background: var(--violet-soft); }
.l-state { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.lesson-row.done .l-state { background: var(--ok-soft); color: var(--ok); }
.lesson-row.next .l-state { background: var(--violet); color: #fff; }
.l-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.l-title { font-weight: 600; }
.req-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-list li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.req-list li > svg { color: var(--muted); margin-top: 3px; }
.req-list li.ok > svg { color: var(--ok); }
.req-list.inline { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; }
.lock-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.ok-line, .info-line, .warn-line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ok-line { color: var(--ok); } .info-line { color: var(--violet); } .warn-line { color: var(--bad); }
.unlock-line { display: flex; gap: 8px; color: var(--ink-2); border-top: 1px dashed var(--line-2); padding-top: 12px; }

/* ───────── Lección ───────── */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.lesson-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 12px; }
.nav-lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nl-stage { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 0 4px; }
.nl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: .88rem; }
.nl:hover { background: var(--surface-2); }
.nl.cur { background: var(--violet-soft); color: var(--violet); font-weight: 600; }
.nl.done svg { color: var(--ok); }
.player { border-radius: var(--radius); overflow: hidden; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.player-screen { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; }
.player-screen .illus { position: absolute; inset: 0; border-radius: 0; opacity: .85; }
.player-screen.rec { background: var(--navy-2); min-height: 220px; }
.player-host { position: absolute; bottom: 14px; right: 14px; border-radius: 50%; border: 3px solid #fff; overflow: hidden; line-height: 0; }
.player-big { position: relative; z-index: 2; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); transition: opacity .2s, transform .15s; }
.player-big svg { width: 36px; height: 36px; }
.player.playing .player-big { opacity: 0; } .player.playing:hover .player-big, .player.playing .player-big:focus-visible { opacity: .9; }
.captions { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(86%, 620px); text-align: center; background: rgba(9, 12, 39, .82); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 1rem; z-index: 2; min-height: 1em; }
.captions:empty { display: none; }
.player-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #0E1233; }
.player-bar .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .2); color: #fff; }
.player-bar .icon-btn.on { background: var(--violet); }
.player-bar .chip-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.track { flex: 1; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); cursor: pointer; position: relative; }
.track span { position: absolute; inset: 0 auto 0 0; background: var(--lime); border-radius: 6px; }
.resume { display: flex; gap: 8px; align-items: center; color: var(--violet); font-weight: 500; }
.reading p + p { margin-top: 12px; }
.reading { font-size: 1.04rem; max-width: 70ch; }
.resource { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.res-thumb { width: 120px; aspect-ratio: 3/4; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--violet); font-size: .75rem; }
.resource > div:last-child { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 12px; }
.quiz { display: flex; flex-direction: column; gap: 22px; }
.q { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.q legend { font-weight: 600; font-size: 1.05rem; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.q-n { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--navy); color: var(--lime); display: grid; place-items: center; font-size: .85rem; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line-2); cursor: pointer; background: var(--surface); }
.opt:hover { border-color: var(--violet); }
.opt input { width: 20px; height: 20px; accent-color: var(--violet); flex: none; }
.opt:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.q.right .opt:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.q.wrong .opt:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
.q-fb { display: flex; align-items: center; gap: 6px; font-weight: 500; min-height: 1.2em; }
.q.right .q-fb { color: var(--ok); } .q.wrong .q-fb { color: var(--bad); }
.checklist { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--violet); flex: none; }
.check.big { padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); min-height: 52px; align-items: center; }
.check.big:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.check.disabled { opacity: .7; cursor: not-allowed; }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--violet-soft); }
.tip p { margin-top: 4px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ───────── Formularios ───────── */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend, fieldset.av-group legend { font-weight: 600; font-size: .92rem; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field textarea, .field select, .prefs select {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px var(--violet-soft); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.field.inline input { max-width: 110px; }
.hint { font-size: .8rem; color: var(--muted); }
.err { color: var(--bad); font-size: .84rem; font-weight: 500; }
.err-box { display: flex; gap: 8px; align-items: center; color: var(--bad); background: var(--bad-soft); padding: 10px 12px; border-radius: 12px; font-weight: 500; }
.upload { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 14px; border-radius: 16px; border: 2px dashed var(--line-2); cursor: pointer; text-align: center; color: var(--ink-2); background: var(--surface-2); }
.upload:hover, .upload:focus-within { border-color: var(--violet); }
.upload img { max-height: 200px; border-radius: 10px; object-fit: contain; }
.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-track { flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; margin-top: 1px; }
.sw-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + .sw-track { background: var(--violet); }
.switch input:checked + .sw-track::after { transform: translateX(18px); }
.switch input:focus-visible + .sw-track { outline: 3px solid var(--violet); outline-offset: 2px; }
.switch.disabled { opacity: .6; cursor: not-allowed; }
.prefs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; align-items: start; margin: 12px 0; }
.timeline { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.timeline li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .8rem; color: var(--muted); position: relative; }
.timeline li > svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--surface-2); }
.timeline li.done { color: var(--ok); } .timeline li.done > svg { background: var(--ok-soft); }
.timeline li.cur { color: var(--violet); font-weight: 600; } .timeline li.cur > svg { background: var(--violet); color: #fff; }
.timeline li.warn { color: var(--bad); } .timeline li.warn > svg { background: var(--bad); color: #fff; }
.sub-sum { display: grid; gap: 10px; margin: 16px 0; }
.sub-sum div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sub-sum dt { color: var(--muted); font-size: .85rem; } .sub-sum dd { margin: 0; overflow-wrap: anywhere; }
.sub-img { max-height: 220px; border-radius: 12px; }

/* ───────── Sellos ───────── */
.stamp { position: relative; width: var(--s); height: var(--s); flex: none; transform: rotate(var(--rot, 0deg)); color: var(--ink); max-width: 100%; }
.stamp svg { display: block; width: 100%; height: 100%; }
.stamp-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
.stamp-ic svg { width: 30%; height: 30%; stroke-width: 2.2; }
.stamp:not(.stamp-empty) { opacity: .94; border-radius: 50%; background: radial-gradient(circle closest-side, var(--stamp-bg) 0 96%, transparent 100%); }
.pp-page .stamp, .sd-top .stamp, .cel-page .stamp, .stamp-admin .stamp { mix-blend-mode: multiply; --stamp-bg: transparent; }
.stamp-empty { color: var(--line-2); }
.stamp-q { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--s) * .3); font-weight: 800; color: var(--muted); }
.stamp-q svg { width: 30%; height: 30%; opacity: .6; }
.stamp-drop { animation: stampDrop .7s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes stampDrop { 0% { transform: scale(1.9) rotate(-18deg); opacity: 0; } 60% { transform: scale(.94) rotate(var(--rot)); opacity: 1; } 100% { transform: scale(1) rotate(var(--rot)); } }
/* Los sellos usan su tinta propia: var(--ink) se redefine en línea para cada sello */

/* ───────── Pasaporte ───────── */
.passport { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.pp-cover { position: sticky; top: 88px; background: var(--navy); color: #fff; border-radius: 24px 10px 10px 24px; padding: 22px; display: flex; flex-direction: column; gap: 20px; box-shadow: inset -10px 0 0 rgba(255, 255, 255, .04), var(--shadow); background-image: radial-gradient(circle at 110% -10%, #5647E7 0 38%, transparent 39%), radial-gradient(circle at -20% 120%, rgba(212, 238, 64, .18) 0 30%, transparent 31%); }
.pp-cover-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pp-word { text-align: right; font-weight: 800; letter-spacing: .18em; font-size: .9rem; color: var(--lime); line-height: 1.3; }
.pp-word small { letter-spacing: .12em; font-size: .62rem; color: #C9CCF2; }
.pp-id { display: flex; gap: 16px; align-items: flex-start; background: rgba(255, 255, 255, .06); padding: 14px; border-radius: 16px; }
.pp-photo { border-radius: 14px; overflow: hidden; line-height: 0; border: 3px solid var(--lime); flex: none; }
.pp-data { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .82rem; min-width: 0; }
.pp-data dt { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: #9EA3D6; }
.pp-data dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mrz { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: #C9CCF2; background: rgba(0, 0, 0, .25); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; white-space: nowrap; }
.pp-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.pp-page { --ink: #2A2B3D; background: var(--pp-paper); color: var(--pp-ink); border-radius: 10px 20px 20px 10px; padding: 18px; border: 1px solid var(--pp-line); box-shadow: var(--shadow); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(42, 43, 61, .05) 27px 28px), radial-gradient(circle at 85% 85%, var(--tint) 0 30%, transparent 31%); display: flex; flex-direction: column; gap: 12px; }
.pp-page-h { display: flex; align-items: center; gap: 10px; border-bottom: 1.5px dashed rgba(42, 43, 61, .25); padding-bottom: 10px; }
.pp-page-h h2 { font-size: 1rem; flex: 1; text-transform: uppercase; letter-spacing: .08em; }
.pp-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: #2A2B3D; }
.pp-slots { display: flex; flex-wrap: wrap; gap: 14px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: 130px; text-decoration: none; color: inherit; padding: 6px; border-radius: 14px; }
a.slot:hover, button.slot:hover { background: rgba(42, 43, 61, .05); }
.slot-l { font-weight: 600; font-size: .8rem; line-height: 1.3; }
.slot-h { font-size: .72rem; color: #6B6C80; line-height: 1.35; }
.pp-page .stamp-empty { color: rgba(42, 43, 61, .3); }
.pp-page .stamp-q { color: rgba(42, 43, 61, .45); }
.stamp-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; }
.sd-top { background: var(--pp-paper); border-radius: 16px; display: grid; place-items: center; padding: 24px; background-image: radial-gradient(circle, var(--tint) 0 45%, transparent 46%); }
.sd-body { display: flex; flex-direction: column; gap: 10px; }
.creation { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; }
.creation img, .creation .illus { border-radius: 12px; min-height: 90px; }
.fb { margin: 6px 0 0; padding: 12px 14px; border-left: 4px solid var(--lime); background: var(--surface-2); border-radius: 0 12px 12px 0; font-style: italic; }
.fb cite { display: block; font-style: normal; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.share-img { border-radius: 16px; max-height: 60vh; width: auto; margin: 12px auto; display: block; }

/* ───────── Celebración ───────── */
.celebrate { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cel-page { width: 100%; display: grid; place-items: center; padding: 26px; border-radius: 18px; background: var(--pp-paper); background-image: radial-gradient(circle, var(--tint) 0 40%, transparent 41%); }
.cel-name { font-size: 1.3rem; font-weight: 800; color: var(--violet); }
.cel-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.unlocked { display: flex; gap: 12px; text-align: left; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--lime-soft); width: 100%; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.confetti i { position: absolute; top: 55%; width: 9px; height: 14px; border-radius: 2px; animation: conf 1.5s ease-out forwards; }
@keyframes conf { to { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }

/* ───────── Comunidad ───────── */
.safety { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 500; font-size: .9rem; }
.c-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab .count { background: var(--orange); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.post { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.post.featured { border: 2px solid var(--lime); }
.post-h { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.post-h > div { flex: 1; min-width: 150px; }
.post h3 { font-size: 1.08rem; }
.post-img { border-radius: 14px; max-height: 360px; object-fit: cover; }
.post-art .illus { min-height: 180px; }
.mission-link { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--violet); text-decoration: none; align-self: flex-start; background: var(--violet-soft); padding: 4px 10px; border-radius: 999px; }
.post-f { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.react { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: .84rem; font-weight: 500; }
.react.on { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.comments { display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); padding: 14px; border-radius: 14px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment p { margin-top: 2px; }
.comment.helpful > div { border-left: 3px solid var(--lime); padding-left: 10px; }
.c-form { display: flex; gap: 8px; }
.c-form input { flex: 1; min-width: 0; min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); }
.helpers { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.helpers li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rules ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }

/* ───────── Perfil y portafolio ───────── */
.profile-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.profile-head > .stack-s { flex: 1; min-width: 200px; }
.levels { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.levels li { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); }
.levels li.cur { border-color: var(--violet); background: var(--violet-soft); }
.levels li.past .lv-badge { background: var(--ok); color: #fff; }
.levels li:not(.cur):not(.past) .lv-badge { background: var(--surface-2); color: var(--muted); }
.recs, .ledger { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.recs li { display: flex; gap: 12px; align-items: flex-start; }
.rec-ic { width: 40px !important; height: 40px !important; padding: 9px; border-radius: 12px; background: var(--lime); color: var(--on-lime); }
.ledger li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ledger strong { color: var(--ok); }
details summary { cursor: pointer; font-weight: 600; margin-top: 14px; color: var(--violet); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.pf-item { overflow: hidden; }
.pf-item .illus { border-radius: 0; }
.pf-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.res { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.res > div { display: flex; flex-direction: column; }
.search-big { display: flex; gap: 10px; flex-wrap: wrap; }
.search-big .search-field { flex: 1; min-width: 220px; }

/* ───────── Avatar editor ───────── */
.avatar { display: block; flex: none; border-radius: 50%; }
.av-editor { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start; }
.av-preview { display: grid; place-items: center; padding: 14px; border-radius: 20px; background: var(--surface-2); position: sticky; top: 90px; }
.av-controls { display: flex; flex-direction: column; gap: 14px; }
.av-group { border: 0; padding: 0; margin: 0; }
.av-group legend { margin-bottom: 8px; }
.av-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.av-opt { min-width: 44px; min-height: 44px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 3px; }
.av-opt.sel { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.av-opt:disabled { opacity: .55; cursor: not-allowed; }
.av-acc { padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; font-weight: 500; }
.sw { width: 32px; height: 32px; border-radius: 10px; display: block; border: 1px solid rgba(0, 0, 0, .1); }
.sw-txt { display: grid; place-items: center; background: #C9D2E8; color: #0B122A; }

/* ───────── Registro ───────── */
.ob { min-height: 100vh; background: var(--navy); background-image: radial-gradient(circle at 100% 0, #5647E7 0 22%, transparent 23%), radial-gradient(circle at 0 100%, rgba(212, 238, 64, .16) 0 24%, transparent 25%); padding: 20px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ob-head { width: min(100%, 860px); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: #fff; }
.ob-steps { width: min(100%, 860px); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; color: #AEB2DC; }
.ob-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .75rem; }
.ob-steps li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); font-weight: 700; }
.ob-steps li.cur { color: #fff; } .ob-steps li.cur span { background: var(--lime); color: var(--on-lime); }
.ob-steps li.done span { background: var(--violet); color: #fff; }
.ob-steps em { font-style: normal; }
.ob-body { width: min(100%, 860px); padding: clamp(20px, 4vw, 40px); display: flex; flex-direction: column; gap: 18px; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 8px; }
.ob-actions.center { justify-content: center; }
.age-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.age { min-height: 56px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.age.sel { background: var(--violet); color: #fff; border-color: var(--violet); }
.route-pick { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--lime-soft); }
.route-pick.r-c { background: var(--violet-soft); }
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.interest { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; min-height: 104px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.interest.sel { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.interest .tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; }
.interest .tick svg { width: 14px; height: 14px; }
.welcome { display: flex; flex-direction: column; gap: 20px; }
.welcome-david { display: flex; gap: 14px; align-items: flex-start; }
.bubble { background: var(--violet-soft); padding: 14px 16px; border-radius: 4px 18px 18px 18px; }
.welcome-grid { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: center; }
.welcome-pp { background: var(--navy); color: #fff; }
.pp-mini { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px; text-align: center; }
.pp-mini-t { font-weight: 800; letter-spacing: .2em; font-size: .75rem; color: var(--lime); text-transform: uppercase; }
.pp-mini span { font-size: .85rem; color: #C9CCF2; }
.pp-mini-s { font-size: .75rem !important; }
.how { display: flex; gap: 12px; align-items: flex-start; }
.how-n { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--lime); font-weight: 800; }
.first-mission { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; padding: 12px; border: 2px solid var(--violet); }

/* ───────── Familia / mentor / admin ───────── */
.kids-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.kid { display: flex; gap: 14px; align-items: flex-start; padding: 16px; text-align: left; cursor: pointer; }
.kid > .stack-s { flex: 1; min-width: 0; gap: 8px; }
.kid.sel { border: 2px solid var(--violet); }
.kid.add { flex-direction: column; align-items: center; justify-content: center; text-align: center; border-style: dashed; box-shadow: none; color: var(--ink-2); }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.fam-grid > .card { display: flex; flex-direction: column; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kpis > div { background: var(--surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.kpis strong { font-size: 1.6rem; font-weight: 800; }
.kpis span { font-size: .8rem; color: var(--muted); }
.kpis.big > div { background: var(--surface); }
.kpis.big strong { font-size: 2rem; color: var(--violet); }
.fam-missions, .fam-subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fam-missions li { display: grid; grid-template-columns: 1fr auto 44px; gap: 10px; align-items: center; }
.fam-subs li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.membership { display: flex; flex-direction: column; gap: 16px; }
.mentor-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.q-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; text-align: left; cursor: pointer; width: 100%; }
.q-item.sel { border: 2px solid var(--violet); }
.muted-item { box-shadow: none; opacity: .85; }
.review { display: flex; flex-direction: column; gap: 16px; }
.auto-checks { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.mod-item { display: flex; flex-direction: column; gap: 10px; }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 88px; }
.admin-nav button { display: flex; gap: 10px; align-items: center; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 500; color: var(--ink-2); }
.admin-nav button:hover { background: var(--surface-2); }
.admin-nav button.on { background: var(--violet-soft); color: var(--violet); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.yes { color: var(--ok); } .no { color: var(--line-2); }
.stamp-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.stamp-admin .card { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--pp-paper); color: var(--pp-ink); }
.stamp-admin .muted { color: #6B6C80; }
.hotmart { display: flex; flex-direction: column; gap: 14px; }

/* ───────── Vacíos, modales y avisos ───────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px; color: var(--ink-2); }
.empty > svg { color: var(--violet); opacity: .8; }
.empty p { max-width: 42ch; color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9, 12, 39, .6); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(100%, 520px); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); color: var(--ink); border-radius: 24px; padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); animation: pop .22s ease-out; outline: none; }
.modal-wide .modal-card { width: min(100%, 780px); }
.modal-x { position: absolute; top: 12px; right: 12px; }
.modal-card > h2 { padding-right: 44px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.drawer { place-items: stretch end; padding: 0; }
.drawer .modal-card { width: min(100%, 420px); height: 100%; max-height: none; border-radius: 24px 0 0 24px; animation: slide .25s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.help { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.help-h { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.help-q { display: flex; flex-direction: column; gap: 8px; }
.help-chip { text-align: left; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; }
.help-chip.on, .help-chip:hover { border-color: var(--violet); background: var(--violet-soft); }
.help-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.notifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.notifs a { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; text-decoration: none; }
.notifs a:hover { background: var(--surface-2); }
.notifs a.unread { background: var(--violet-soft); font-weight: 600; }
#toast-root { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-radius: 16px; background: var(--navy); color: #fff; font-weight: 500; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); animation: pop .2s ease-out; transition: opacity .3s, transform .3s; }
.toast-xp svg { color: var(--lime); } .toast-ok svg { color: #7BE3AE; } .toast-warn svg { color: #FFB48A; }
.toast.out { opacity: 0; transform: translateY(8px); }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .2), rgba(255, 255, 255, .08)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.boot { min-height: 100vh; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; background: #090C27; color: #fff; }
.boot-mark { font-weight: 800; font-size: 1.6rem; }
.sheet { background: #fff; color: #0B122A; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 14px; border: 1px solid #E1E3F1; }
.sheet-h span { font-size: .75rem; color: #5A6080; text-transform: uppercase; letter-spacing: .08em; }
.sheet-row { display: flex; flex-direction: column; gap: 6px; }
.sheet-line { border-bottom: 1.5px dotted #9AA0C4; height: 22px; }
.sheet-box { border: 1.5px dashed #9AA0C4; border-radius: 10px; height: 140px; }

/* ───────── Ruta Explorers: texto más grande y más apoyo visual ───────── */
.route-explorers { --fs-base: 16.5px; font-size: var(--fs-base); }
.route-explorers .lesson-row { min-height: 62px; }
.route-explorers .opt { min-height: 60px; font-size: 1.05rem; }
.route-explorers .hm-main h2 { font-weight: 800; }
.route-creators .hero-mission { border-color: var(--navy); }
:root[data-theme="dark"] .route-creators .hero-mission { border-color: var(--line-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .route-creators .hero-mission { border-color: var(--line-2); } }

/* ───────── Movimiento reducido ───────── */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ───────── Tableta ───────── */
@media (max-width: 1180px) {
  .hero-mission { grid-template-columns: minmax(0, 1fr) minmax(160px, .5fr); }
  .hm-art { display: none; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid > :last-child { grid-column: 1 / -1; }
  .passport { grid-template-columns: 1fr; }
  .pp-cover { position: static; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { padding: 10px 16px; }
  .top-brand { display: block; }
  .top-brand .brand-kids { color: var(--ink); }
  .top-brand .brand-lockup { background: var(--navy); padding: 6px 12px; border-radius: 999px; }
  .top-brand .brand-kids { color: #fff; font-size: .9rem; }
  .top-brand .logo-img { height: 22px; }
  .top-search { display: none; }
  .only-m { display: inline-grid; }
  .save-state { display: none; }
  #view { padding: 20px 16px 110px; }
  .role-parent #view, .role-mentor #view, .role-admin #view { padding-bottom: 32px; }
  .foot { padding: 16px 16px 100px; }
  .role-parent .foot, .role-mentor .foot, .role-admin .foot { padding-bottom: 24px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 24px -16px rgba(11, 18, 42, .3); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 54px; justify-content: center; text-decoration: none; font-size: .68rem; font-weight: 500; color: var(--muted); border-radius: 12px; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--violet); font-weight: 700; }
  .tabbar a.on svg { background: var(--violet-soft); border-radius: 10px; padding: 2px 10px; width: 44px; box-sizing: content-box; height: 22px; }
  .help-tab { display: inline-flex; top: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); writing-mode: horizontal-tb; transform: none; border-radius: 999px 0 0 999px; padding: 10px 14px; }
  .m-layout, .lesson-layout, .c-layout, .mentor-layout, .admin-layout { grid-template-columns: 1fr; }
  .sticky, .lesson-side, .admin-nav { position: static; }
  .lesson-side { order: 2; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .admin-nav button { white-space: nowrap; }
  .m-hero { grid-template-columns: 1fr; }
  .m-hero .illus-xl { min-height: 170px; }
}
/* ───────── Celular ───────── */
@media (max-width: 640px) {
  .hero-mission { grid-template-columns: 1fr; padding: 16px; }
  .hm-reward { flex-direction: row; text-align: left; justify-content: flex-start; }
  .hm-reward .stamp { --s: 72px !important; }
  .hm-cta .btn { width: 100%; }
  .home-grid, .peek-grid { grid-template-columns: 1fr; }
  .m-card-big { grid-template-columns: 1fr; }
  .stamp-detail { grid-template-columns: 1fr; }
  .sub-sum div { grid-template-columns: 1fr; gap: 2px; }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .age-grid { grid-template-columns: repeat(5, 1fr); }
  .ob-steps em { display: none; }
  .welcome-grid, .first-mission, .av-editor { grid-template-columns: 1fr; }
  .av-preview { position: static; }
  .pp-id { flex-direction: column; align-items: center; }
  .slot { width: calc(50% - 8px); }
  .lesson-nav .btn { width: 100%; }
  .modal-card { padding: 20px; border-radius: 20px; }
  .fam-missions li { grid-template-columns: 1fr auto; }
  .fam-missions li .tnum { display: none; }
  .demo-bar { gap: 6px 10px; padding: 8px 12px; }
  .demo-f > span { display: none; }
  .home-greet .avatar { width: 44px; height: 44px; }
  .captions { font-size: .85rem; bottom: 10px; }
  .player-host { display: none; }
}
.player-screen .illus-ic, .player-screen .spark { display: none; }
@media (max-width: 960px) {
  .help-tab span { display: none; }
  .help-tab { padding: 12px; border-radius: 999px; right: 12px; }
  .help-tab svg { width: 22px; height: 22px; }
}
@media (max-width: 640px) {
  .top { gap: 6px; }
  .top-brand { flex: 1; min-width: 0; }
  .top-brand .brand-lockup { gap: 6px; padding: 6px 10px; max-width: 100%; }
  .top-brand .brand-kids { font-size: .78rem; }
  .top .icon-btn { width: 40px; height: 40px; }
  .top a.icon-btn[data-go="calendario"] { display: none; }
}

/* ───────── Misión 1: dibujo, pizarra y video ───────── */
.draw-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.draw-opt { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 20px; cursor: pointer; border: 2px solid var(--line); }
.draw-opt:hover, .draw-opt:focus-visible { border-color: var(--violet); background: var(--violet-soft); }
.draw-opt > svg { color: var(--violet); }
.draw-opt strong { font-size: 1.15rem; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.steps-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.steps-list li > svg { color: var(--violet); width: 22px; height: 22px; flex: none; }
.wb { display: flex; flex-direction: column; gap: 12px; }
.wb-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.wb-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wb-color { width: 38px; height: 38px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-2); cursor: pointer; }
.wb-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--violet); transform: scale(1.08); }
.wb-size { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.wb-size span { width: var(--d); height: var(--d); border-radius: 50%; background: var(--ink); }
.wb-size[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); }
.wb-wrap { border-radius: 16px; overflow: hidden; border: 2px solid var(--line-2); background: #fff; line-height: 0; }
#wb-canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; touch-action: none; cursor: crosshair; display: block; }
.art-saved { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 20px; align-items: center; }
.art-img { border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.art-mini { width: 96px; height: 72px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.an-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.an-style input { position: absolute; opacity: 0; }
.an-style > span { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 12px; border-radius: 16px; border: 2px solid var(--line); cursor: pointer; background: var(--surface); height: 100%; }
.an-style > span > svg { color: var(--violet); }
.an-style input:checked + span { border-color: var(--violet); background: var(--violet-soft); }
.an-style input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.an-stage { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.an-screen { border-radius: 16px; overflow: hidden; background: var(--navy); line-height: 0; }
.an-screen canvas, .an-screen video { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; }
.an-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.an-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); opacity: .55; transition: opacity .3s, background .3s; }
.an-steps li > svg { width: 26px; height: 26px; flex: none; color: var(--muted); }
.an-steps li.cur { opacity: 1; background: var(--violet-soft); }
.an-steps li.cur > svg { color: var(--violet); }
.an-steps li.done { opacity: 1; }
.an-steps li.done > svg { color: var(--ok); }
#an-done { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; }
.how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.how-grid figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface-2); min-height: 150px; }
.how-grid img { max-height: 110px; object-fit: contain; border-radius: 8px; }
.how-grid figcaption { font-size: .8rem; font-weight: 600; text-align: center; }
.how-grid .checker img { background: repeating-conic-gradient(#E1E3F1 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.how-grid .frames { flex-direction: row; flex-wrap: wrap; }
.how-grid .frames img { width: 30%; }
.how-grid .frames figcaption { width: 100%; }
.how-grid figure > svg { color: var(--violet); }
.flip { display: flex; flex-direction: column; gap: 12px; }
.flip-screen { position: relative; border-radius: 16px; overflow: hidden; line-height: 0; max-width: 560px; }
.flip-screen canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.flip-n { position: absolute; top: 10px; right: 10px; background: rgba(9, 12, 39, .75); color: #fff; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; line-height: 1.4; }
.flip input[type="range"] { accent-color: var(--violet); min-height: 44px; }
.flip-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.flip-strip img { width: 100%; border-radius: 6px; border: 1px solid var(--line); grid-row: 1; }
.flip-strip span { grid-row: 2; text-align: center; font-size: .7rem; color: var(--muted); }
@media (max-width: 760px) {
  .an-stage, .art-saved { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flip-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flip-strip span { display: none; }
}

/* ───────── Mapa de aventura ───────── */
.quest { padding: 20px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--surface), var(--violet-soft)); overflow: hidden; }
.qm-path { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-block: 8px; }
.qm-row { display: flex; align-items: center; gap: 14px; transform: translateX(var(--off)); width: 280px; }
.qm-stage { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--on-lime); background: var(--lime); padding: 4px 14px; border-radius: 99px; margin: 10px 0 2px; }
.qm-node { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; background: var(--surface-2); color: var(--muted); border: 3px solid var(--line-2); box-shadow: 0 5px 0 var(--line-2); transition: transform .15s; }
.qm-node svg { width: 28px; height: 28px; }
a.qm-node:hover { transform: translateY(-2px); }
.qm-node.done { background: var(--lime); color: var(--on-lime); border-color: #A9C020; box-shadow: 0 5px 0 #A9C020; }
.qm-node.cur { background: var(--violet); color: #fff; border-color: var(--violet-strong); box-shadow: 0 5px 0 var(--violet-strong), 0 0 0 8px color-mix(in srgb, var(--violet) 22%, transparent); animation: qmPulse 1.6s ease-in-out infinite; }
.qm-me { position: absolute; top: -30px; right: -26px; border-radius: 50%; border: 3px solid var(--surface); animation: qmHop 1.2s ease-in-out infinite; }
.qm-chest { width: 76px; height: 76px; background: var(--navy); color: var(--lime); border-color: var(--navy-2); box-shadow: 0 5px 0 #000; }
.qm-chest.done { background: var(--lime); color: var(--on-lime); }
.qm-label { font-weight: 600; font-size: .9rem; line-height: 1.3; display: flex; flex-direction: column; }
.qm-label b { color: var(--violet); font-size: .78rem; }
@keyframes qmPulse { 50% { box-shadow: 0 5px 0 var(--violet-strong), 0 0 0 14px color-mix(in srgb, var(--violet) 10%, transparent); } }
@keyframes qmHop { 50% { transform: translateY(-6px); } }
.route-creators .qm-row { --off: 0px !important; }
@media (max-width: 640px) { .qm-row { width: 230px; transform: translateX(calc(var(--off) * .45)); } .qm-node { width: 56px; height: 56px; } }

/* ───────── Maestros ───────── */
.mt-hero { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 26px; border-radius: 24px; background: var(--navy); color: #fff; background-image: radial-gradient(circle at 100% 0, #5647E7 0 30%, transparent 31%), radial-gradient(circle at 0 110%, rgba(212, 238, 64, .22) 0 25%, transparent 26%); }
.mt-hero .eyebrow { color: var(--lime); display: inline-flex; gap: 6px; align-items: center; }
.mt-hero h1 { color: #fff; margin-top: 6px; }
.mt-hero .lead { color: #C9CCF2; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.mt-tool { position: relative; display: flex; }
.mt-open { flex: 1; display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 18px 18px 18px; padding-right: 54px; border: 0; background: none; cursor: pointer; border-radius: var(--radius); }
.mt-tool:hover { border-color: var(--violet); transform: translateY(-2px); transition: transform .15s; }
.mt-fav { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; }
.mt-fav.on { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.mt-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); }
.mt-ic.big { width: 56px; height: 56px; } .mt-ic.big svg { width: 28px; height: 28px; }
.mt-ic.c-eval { background: #DDF4E8; color: #117A4B; } .mt-ic.c-dif { background: #FFE6DA; color: #B8431A; } .mt-ic.c-com { background: #E1E6FA; color: #1F2A6B; } .mt-ic.c-crear { background: var(--lime); color: var(--on-lime); }
.mt-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.mt-result { display: flex; flex-direction: column; min-height: 420px; }
.mt-result-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mt-out { padding: 18px 22px; line-height: 1.65; overflow-wrap: anywhere; flex: 1; }
.mt-out h2, .mt-out h3, .mt-out h4 { margin: 18px 0 8px; } .mt-out h2 { font-size: 1.3rem; } .mt-out h3 { font-size: 1.1rem; } .mt-out h4 { font-size: 1rem; }
.mt-out p { margin: 8px 0; } .mt-out ul, .mt-out ol { margin: 8px 0; padding-left: 22px; } .mt-out li { margin: 4px 0; }
.mt-out blockquote { margin: 10px 0; padding: 8px 14px; border-left: 4px solid var(--lime); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.mt-out code { font-family: var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.mt-out .table-wrap { margin: 10px 0; }
.mt-caret { display: inline-block; width: 8px; height: 1.1em; background: var(--violet); vertical-align: -3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mt-sk { height: 14px; margin: 10px 0; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; }
.mt-refine { border-top: 1px solid var(--line); padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.mt-refine input, .mt-code input { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); }
.mt-code { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--violet); }
.mt-hist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.mt-hist button { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.mt-hist button:hover { border-color: var(--violet); }
.demo-maestros { background: #D4EE40 !important; color: #1D2400 !important; border-color: #D4EE40 !important; font-weight: 700; }
@media (max-width: 960px) { .mt-layout { grid-template-columns: 1fr; } .mt-top { display: none; } }
@media (max-width: 640px) { .mt-hero { grid-template-columns: 1fr; } .mt-hero-art { display: none; } }

/* ───────── Currículo oficial: operador, La Función, Sala de Render, criatura ───────── */
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.op-libre { background: var(--ok-soft); color: var(--ok); }
.chip.op-adulto { background: var(--violet-soft); color: var(--violet); }
.chip.op-render { background: #FFE9DC; color: #A33A00; }
.m-num { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.op-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.op-row > svg { flex: none; color: var(--violet); }
.op-row.op-render > svg { color: var(--orange-ink); } .op-row.op-libre > svg { color: var(--ok); }
.funcion-line { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--lime-soft); color: var(--ink); }
.funcion-hero { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: var(--navy); color: #fff; background-image: radial-gradient(circle at 100% 0, #5647E7 0 30%, transparent 31%); }
.funcion-hero svg { color: var(--lime); }
.funcion-hero .eyebrow { color: var(--lime); }
.funcion-hero h2 { color: #fff; text-transform: capitalize; }
.deadline { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.render-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--orange) 50%, transparent); background: color-mix(in srgb, var(--orange) 6%, transparent); }
.render-req { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.render-req.st-entregado > svg { color: var(--ok); } .render-req.st-pendiente > svg { color: var(--warn); }
.rr-input { min-height: 38px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface); min-width: 200px; }
.creature-box { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--lime-soft); border: 2px solid var(--lime); }
.creature-box img { width: 88px; height: 88px; object-fit: contain; border-radius: 14px; background: #fff; flex: none; }
.creature-box > div { display: flex; flex-direction: column; gap: 2px; }
.creature-box strong { font-size: 1.15rem; }
.creature-box.empty-c { background: var(--surface-2); border-style: dashed; border-color: var(--line-2); }
.creature-box.empty-c > svg { width: 40px; height: 40px; color: var(--violet); }
.consent-box { display: flex; gap: 12px; align-items: flex-start; }
.consent-box > svg { color: var(--violet); width: 26px; height: 26px; flex: none; }
.pp-creature { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 10px; }
.pp-creature img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 12px; }
.pp-creature span { display: flex; flex-direction: column; font-weight: 700; } .pp-creature small { font-weight: 500; color: #9EA3D6; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.creature-card { display: flex; gap: 18px; align-items: center; background: var(--lime-soft); }
.creature-card img { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 18px; }
.cr-field { border: 2px solid var(--violet); }
.consent .opt { align-items: flex-start; }

/* ───────── Especificación maestra: expedición ───────── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.goal-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.off-hero { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--lime-soft); margin-bottom: 12px; }
.off-hero > svg { color: var(--ink); }
.prompt-card { border: 1.5px solid var(--line-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.prompt-card pre, .prompt-pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: .84rem; line-height: 1.55; color: var(--ink); }
.rule-box, .info-box { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--violet-soft); }
.rule-box > svg, .info-box > svg { color: var(--violet); width: 22px; height: 22px; flex: none; margin-top: 2px; }
.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cycle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cycle-step { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); }
.cycle-step > svg { color: var(--violet); }
.cycle-step.live { background: var(--navy); color: #fff; border-color: var(--navy); }
.cycle-step.live > svg { color: var(--lime); } .cycle-step.live .muted { color: #C9CCF2; }
.cycle-step.past { opacity: .8; }
.cy-n { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cycle-step.live .cy-n { color: var(--lime); }
.doubt { display: flex; gap: 14px; align-items: flex-start; }
.doubt.top { border: 2px solid var(--lime); }
.vote { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 70px; padding: 8px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; }
.vote.on { background: var(--violet); color: #fff; border-color: var(--violet); }
.arrivals .row { gap: 14px; }
.arr { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.machine { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; text-align: left; cursor: pointer; border: 2px solid var(--line); }
.machine > svg { color: var(--violet); }
.machine.sel { border-color: var(--violet); background: var(--violet-soft); }
.field-l { font-weight: 600; font-size: .92rem; }
.mq-img { width: 80px; height: 80px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.pp-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.pp-grid12 { grid-column: 1 / -1; }
.casillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.casilla { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; color: inherit; padding: 10px 6px; border-radius: 14px; border: 1.5px dashed rgba(42, 43, 61, .2); background: none; cursor: pointer; }
.cas-cat { font-size: .6rem; font-weight: 700; letter-spacing: .08em; color: #8A8B9C; }
.ficha { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ficha dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6B6C80; }
.ficha dd { margin: 0; font-weight: 500; }
.first-drawing { max-height: 200px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--pp-line); }
.specials { display: flex; flex-wrap: wrap; gap: 10px; }
.special { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px; border-radius: 16px; min-width: 130px; }
.special.founder { background: linear-gradient(135deg, #FFE7A8, #FFD166); color: #5B3A00; }
.special.quarter { background: var(--lime); color: #1D2400; }
.stamp-img { border-radius: 50%; overflow: hidden; }
.stamp-img img { width: 100%; height: 100%; object-fit: cover; }
.illus-img { background: #fff; padding: 0; }
.illus-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.mascot-img { object-fit: cover; background: #fff; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--violet); }
.more-list { display: flex; flex-direction: column; gap: 4px; }
.more-list a, .more-list button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.more-list a span, .more-list button span { flex: 1; font-weight: 600; }
.more-list a:hover, .more-list button:hover { background: var(--surface-2); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 54px; justify-content: center; font-size: .68rem; font-weight: 500; color: var(--muted); background: none; border: 0; border-radius: 12px; cursor: pointer; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--violet); font-weight: 700; }
@media (max-width: 960px) { .tabbar { grid-template-columns: repeat(5, 1fr); } }
.ob-10 { grid-template-columns: repeat(10, 1fr); }
.ob-10 li span { width: 28px; height: 28px; font-size: .78rem; }
.mini-video .player-screen { background: var(--violet-soft); min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.mv-title { color: var(--ink); }
.consent-card { display: flex; flex-direction: column; gap: 8px; }
.letter { max-width: 60ch; margin: 0 auto; padding: 28px; border-radius: 18px; background: #FFFDF5; color: #2A2B3D; border: 1px solid #EDE3C4; font-size: 1.05rem; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.letter-to { font-weight: 700; font-size: 1.2rem; }
.letter-sign { font-weight: 700; text-align: right; }
.agree-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.agree-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.agree { display: flex; flex-direction: column; gap: 10px; }
.agree.signed { border: 2px solid var(--lime); }
.issue { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.issue-pp { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; }
.issue-pp .pp-mini { background: var(--navy); color: #fff; border-radius: 18px; animation: pop .6s ease-out; }
.tour { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--lime-soft); }
.video-list { display: flex; flex-direction: column; gap: 8px; }
.vid { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.vid > svg { color: var(--violet); }
.guide summary { margin-top: 6px; }
.guide p { margin-top: 8px; font-size: .92rem; }
.checklist7 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.consent-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.kid { flex-direction: column; align-items: stretch; }
.pin-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; max-width: 180px; }
.studio-result { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.studio-result img { width: 100%; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.studio-applied { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.studio-applied figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.studio-applied img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 760px) { .cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); } .studio-result { grid-template-columns: 1fr; } .ob-10 em { display: none; } }
/* Tarjetas de misión (Completadas, Disponibles…): imagen cuadrada y completa, sin recortes */
.m-card:not(.m-card-big) .illus { aspect-ratio: 1; min-height: 0; width: 100%; }
.m-card:not(.m-card-big) .illus-img img { object-fit: contain; }
