:root {
  --bg: #f5f6f9;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --text: #151b2b;
  --muted: #5a6275;
  --line: #e2e5ec;
  --brand: #1f4e9c;
  --brand-2: #163a76;
  --brand-soft: #e8eefa;
  --accent: #9b1c31;
  --ok: #1d7a55;
  --warn-bg: #fff7e6;
  --warn-line: #f0c36d;
  --warn-text: #6b4a05;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.07);
  --radius: 14px;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0d1017;
  --bg-2: #121722;
  --panel: #151b27;
  --text: #e9edf5;
  --muted: #9aa3b5;
  --line: #262e3d;
  --brand: #7ea6ec;
  --brand-2: #a9c3f3;
  --brand-soft: #1a2436;
  --accent: #f08a9b;
  --ok: #52c79a;
  --warn-bg: #2a2212;
  --warn-line: #7a5b1c;
  --warn-text: #f3d9a4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d1017;
    --bg-2: #121722;
    --panel: #151b27;
    --text: #e9edf5;
    --muted: #9aa3b5;
    --line: #262e3d;
    --brand: #7ea6ec;
    --brand-2: #a9c3f3;
    --brand-soft: #1a2436;
    --accent: #f08a9b;
    --ok: #52c79a;
    --warn-bg: #2a2212;
    --warn-line: #7a5b1c;
    --warn-text: #f3d9a4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 0.6em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
section { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; font-family: var(--serif); font-size: 1.2rem; }
:root[data-theme='dark'] .logo-mark { color: #0d1017; }
.logo b { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 550; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--brand-soft); }
.icon-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 1rem; display: grid; place-items: center; }
.menu-movil { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.abierto { display: flex; }
  .menu-movil { display: grid; margin-left: auto; }
}

/* Hero + generador */
.hero { padding: 44px 0 28px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.hero-text { max-width: 820px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 0.9rem; margin: 0; padding: 0; list-style: none; }
.trust li::before { content: '✓ '; color: var(--ok); font-weight: 800; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.tabs { display: flex; gap: 6px; background: var(--bg); padding: 5px; border-radius: 12px; margin-bottom: 18px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 650; font-size: 0.93rem; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected='true'] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.search-row { display: flex; gap: 10px; }
input[type='text'], input[type='search'], input:not([type]) {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; width: 100%; min-width: 0;
}
input:focus-visible, button:focus-visible, .fc:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.search-row input { font-size: 1.05rem; padding: 15px 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 0.95rem; border-radius: 11px; padding: 11px 16px; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s; }
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme='dark'] .btn.primary { color: #0d1017; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.small { padding: 7px 11px; font-size: 0.86rem; border-radius: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.chips-label { font-size: 0.85rem; color: var(--muted); margin-right: 2px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 0.86rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.opciones { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 18px; align-items: flex-end; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend, .label { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 0.9rem; font-weight: 600; background: var(--bg-2); cursor: pointer; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.num-tarjetas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.num-tarjetas input[type='range'] { width: 170px; accent-color: var(--brand); }
.num-tarjetas input[type='number'] { width: 76px; font: inherit; font-weight: 700; text-align: center; color: var(--text); background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 6px; }
.rapidos { display: flex; gap: 6px; }
.rapidos .chip { padding: 5px 10px; }
.chip[aria-pressed='true'] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.ayuda-tipo { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); max-width: 70ch; }
.aviso-sinia { margin-top: 10px; padding: 10px 13px; border-radius: 11px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); font-size: 0.9rem; color: var(--text); max-width: 80ch; }
.aviso-legal { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 11px 14px; border-radius: 11px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); font-size: 0.88rem; }
@media (max-width: 640px) {
  .search-row { flex-direction: column; }
  .panel { padding: 16px; border-radius: 16px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; white-space: normal; font-size: 0.86rem; padding: 9px 8px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}

/* Modo manual */
.field { margin-bottom: 14px; position: relative; }
.field > label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 0.95rem; }
.sugerencias { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; }
.sugerencias button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 0.92rem; padding: 10px 14px; cursor: pointer; }
.sugerencias button:hover, .sugerencias button:focus { background: var(--brand-soft); }
.sugerencias small { display: block; color: var(--muted); font-size: 0.8rem; }
.norma-elegida { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1.5px solid var(--brand); background: var(--brand-soft); border-radius: 12px; margin-bottom: 14px; }
.norma-elegida strong { display: block; }
.norma-elegida a { font-size: 0.85rem; }
.arbol { border: 1px solid var(--line); border-radius: 12px; max-height: 420px; overflow: auto; padding: 8px; background: var(--bg-2); font-size: 0.92rem; }
.arbol details { margin-left: 10px; }
.arbol > details { margin-left: 0; }
.arbol summary { cursor: pointer; padding: 3px 0; list-style: none; display: flex; gap: 6px; align-items: baseline; }
.arbol summary::-webkit-details-marker { display: none; }
.arbol summary::before { content: '▸'; color: var(--muted); width: 12px; flex: none; transition: transform 0.15s; }
.arbol details[open] > summary::before { transform: rotate(90deg); }
.arbol label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.arbol .art { margin-left: 30px; padding: 2px 0; }
.arbol .h-nombre { font-weight: 650; }
.arbol .h-cuenta { color: var(--muted); font-size: 0.8rem; }
.arbol .art small { color: var(--muted); }
.arbol input { accent-color: var(--brand); }
.sel-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.cargando { padding: 18px; color: var(--muted); text-align: center; }

/* Anuncios (placeholders) */
.ad {
  display: grid; place-items: center; text-align: center; margin: 0 auto; color: #7a8194;
  border: 1.5px dashed #b8bfcc; border-radius: 10px;
  background: repeating-linear-gradient(45deg, rgba(128, 138, 160, 0.07) 0 10px, rgba(128, 138, 160, 0.13) 10px 20px);
  font-weight: 800; letter-spacing: 0.18em; font-size: 0.85rem;
}
.ad small { display: block; font-weight: 500; letter-spacing: 0.02em; font-size: 0.72rem; margin-top: 2px; opacity: 0.8; }
.ad-banner { width: min(728px, 100%); height: 90px; }
.ad-slot { padding: 10px 0 18px; }
.ad-rect { width: 300px; max-width: 100%; height: 250px; }
.ad-toast { position: fixed; z-index: 60; right: 16px; bottom: 16px; width: 300px; max-width: calc(100% - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; }
.ad-toast .ad { height: 100px; }
.ad-toast .cerrar, .modal .cerrar { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; box-shadow: var(--shadow); }
.ad-toast .ad-tag { font-size: 0.7rem; color: var(--muted); margin: 0 0 6px 2px; }
@media (max-width: 760px) { .ad-banner { height: 100px; width: min(320px, 100%); } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(8, 11, 18, 0.55); padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: var(--panel); color: var(--text); border-radius: 18px; padding: 22px; width: min(380px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); text-align: center; }
.modal-box h3 { margin-bottom: 4px; }
.modal-box p { color: var(--muted); font-size: 0.92rem; }
.modal-box .ad { margin: 14px auto; }
.barra { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.barra i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.2s; }

/* Progreso */
.progreso { padding: 34px 0; }
.pasos { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; max-width: 560px; }
.pasos li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.pasos li::before { content: ''; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); }
.pasos li.activo { color: var(--text); font-weight: 650; }
.pasos li.activo::before { border-color: var(--brand); border-top-color: transparent; animation: gira 0.8s linear infinite; }
.pasos li.hecho { color: var(--text); }
.pasos li.hecho::before { content: '✓'; display: grid; place-items: center; background: var(--ok); border-color: var(--ok); color: #fff; font-size: 0.75rem; font-weight: 800; }
@keyframes gira { to { transform: rotate(360deg); } }
.error-box { padding: 14px 16px; border-radius: 12px; border: 1px solid #e7a3a3; background: color-mix(in srgb, #d33 10%, var(--panel)); margin-top: 16px; }

/* Resultado */
.resultado { padding-top: 26px; }
.deck-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.deck-head h2 { margin-bottom: 6px; }
.deck-meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); vertical-align: middle; }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.usados { margin-top: 10px; font-size: 0.9rem; }
.usados summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.usados ul { margin: 8px 0; padding-left: 18px; columns: 2 260px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: space-between; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 22px; position: sticky; top: 70px; z-index: 30; box-shadow: var(--shadow); }
.personalizar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.grupo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.grupo .label { margin: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel); outline: 1.5px solid var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed='true'] { outline: 2.5px solid var(--text); }
input[type='color'] { width: 30px; height: 30px; padding: 0; border: 1.5px solid var(--line); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
input[type='color']::-webkit-color-swatch { border: 0; border-radius: 50%; }
.toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.toggle button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.85rem; font-weight: 600; padding: 6px 10px; cursor: pointer; }
.toggle button[aria-pressed='true'] { background: var(--brand-soft); color: var(--brand); }
.emoji-btn { font-size: 1.2rem; width: 38px; height: 34px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-2); cursor: pointer; }
.emoji-pop { position: absolute; z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; display: grid; grid-template-columns: repeat(6, 38px); gap: 4px; }
.emoji-pop button { font-size: 1.25rem; border: 0; background: transparent; border-radius: 8px; height: 38px; cursor: pointer; }
.emoji-pop button:hover { background: var(--brand-soft); }
.emoji-pop input { grid-column: 1 / -1; padding: 8px 10px; font-size: 0.9rem; border-radius: 9px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; width: 290px; }
.menu-list button { display: flex; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; padding: 10px; border-radius: 10px; cursor: pointer; align-items: flex-start; }
.menu-list button:hover { background: var(--brand-soft); }
.menu-list b { display: block; font-size: 0.93rem; }
.menu-list small { color: var(--muted); font-size: 0.8rem; line-height: 1.35; display: block; }
.menu-list .ico { font-size: 1.3rem; line-height: 1.2; }
@media (max-width: 760px) {
  .toolbar { position: static; }
  .menu-list { left: 0; right: auto; }
}

/* Tarjetas giratorias */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.fc { perspective: 1400px; cursor: pointer; border-radius: 18px; min-height: 250px; }
.fc-inner { display: grid; height: 100%; transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); transform-style: preserve-3d; }
.fc.girada .fc-inner { transform: rotateY(180deg); }
.fc-face { grid-area: 1 / 1; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--fc-fondo); color: var(--fc-texto); border: 1.5px solid var(--fc-borde); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 26px rgba(20, 30, 60, 0.1); min-height: 250px; }
.fc-back { transform: rotateY(180deg); background: var(--fc-fondo-rev); }
.fc-top { display: flex; align-items: center; gap: 8px; background: var(--fc-acento); color: var(--fc-sobre-acento); padding: 8px 12px; font-size: 0.74rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.fc-emoji { font-size: 1.15rem; letter-spacing: 0; }
.fc-num { margin-left: auto; font-weight: 600; opacity: 0.9; }
.fc-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 16px 18px; gap: 10px; }
.fc-q { font-family: var(--serif); font-size: 1.14rem; font-weight: 600; line-height: 1.4; text-align: center; margin: 0; }
.fc-a { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; line-height: 1.4; text-align: center; margin: 0; }
.fc-cita { margin: 0; font-family: var(--serif); font-style: italic; font-size: 0.88rem; line-height: 1.45; color: var(--fc-suave); border-left: 3px solid var(--fc-acento); padding: 2px 0 2px 10px; }
.hueco { display: inline-block; min-width: 4em; border-bottom: 2px solid currentColor; color: var(--fc-acento); }
.fc-foot { padding: 9px 14px 11px; font-size: 0.78rem; color: var(--fc-suave); border-top: 1px dashed var(--fc-borde); }
.fc-foot a { color: var(--fc-acento); font-weight: 650; text-decoration: none; }
.fc-foot a:hover { text-decoration: underline; }
.fc.sabe .fc-front { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 55%, transparent); }
.hint { text-align: center; color: var(--muted); font-size: 0.88rem; margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } html { scroll-behavior: auto; } }

/* Modo estudio */
.estudio { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; }
.estudio[hidden] { display: none; }
.estudio-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.estudio-top h3 { margin: 0; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.estudio-cuerpo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.estudio .fc { width: min(640px, 100%); min-height: 340px; }
.estudio .fc-face { min-height: 340px; }
.estudio .fc-q { font-size: clamp(1.15rem, 2.6vw, 1.5rem); }
.estudio .fc-a { font-size: clamp(1.1rem, 2.4vw, 1.35rem); }
.contadores { display: flex; gap: 16px; font-size: 0.9rem; color: var(--muted); margin: 0 0 12px; }
.contadores b { color: var(--text); }
.estudio-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(640px, 100%); margin-top: 18px; }
.btn.repasar { border-color: #e2a33b; color: #9a5b00; background: color-mix(in srgb, #e2a33b 12%, var(--panel)); }
.btn.sabe { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
:root[data-theme='dark'] .btn.repasar { color: #f1c276; }
.btn.grande { padding: 15px; font-size: 1.02rem; }
.estudio-pie { text-align: center; color: var(--muted); font-size: 0.82rem; padding: 10px 16px 16px; }
.fin-estudio { text-align: center; max-width: 520px; }
.fin-estudio .acciones { justify-content: center; margin-top: 16px; }

/* Secciones informativas */
.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.pasos-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: paso; }
.paso { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.paso::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 14px; }
:root[data-theme='dark'] .paso::before { color: #0d1017; }
.paso p { color: var(--muted); margin: 0; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.idea { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.idea .ico { font-size: 1.7rem; margin-bottom: 8px; }
.idea p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.idea .chips { margin-top: 4px; }
.normas-pop { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.normas-pop a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; color: var(--text); font-weight: 650; }
.normas-pop a:hover { border-color: var(--brand); }
.normas-pop span { font-size: 1.4rem; }
.mis-mazos { display: grid; gap: 10px; }
.mazo-item { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.mazo-item .info { min-width: 0; }
.mazo-item strong { display: block; }
.mazo-item small { color: var(--muted); }
.vacio { color: var(--muted); padding: 18px; border: 1.5px dashed var(--line); border-radius: 12px; text-align: center; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.03rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p, .faq details ol { color: var(--muted); margin: 10px 0 0; }
.aviso-grande { display: flex; gap: 14px; padding: 18px 20px; border-radius: 14px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); }
.aviso-grande .ico { font-size: 1.5rem; }
.aviso-grande p { margin: 0; }
.ejemplo-lista { margin-top: 26px; }
.ejemplo-lista ol { padding-left: 20px; }
.ejemplo-lista li { margin-bottom: 10px; }
.ejemplo-lista .r { color: var(--muted); }
@media (max-width: 760px) { .pasos-3 { grid-template-columns: 1fr; } section { padding: 40px 0; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 90px; color: var(--muted); font-size: 0.9rem; background: var(--bg-2); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer a { color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #151b2b; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 0.92rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: 0.25s; z-index: 90; max-width: calc(100% - 32px); }
.toast.visible { opacity: 1; transform: translateX(-50%); }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.fc-a-info { font-weight: 400; font-size: 0.98rem; line-height: 1.5; text-align: left; }
