/* ================= Tipos de actividad adicionales ================= */
.single { max-width: 980px; margin: 0 auto; }
.single .stage-card { border-top: 4px solid var(--theme); }
.win-banner { margin: 14px 0 0; padding: .9rem 1rem; border-radius: 12px; text-align: center; font-weight: 800; font-size: 1.1rem;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); animation: up .3s ease; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Sopa de letras */
.ws-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; margin-top: 10px; }
.ws-wrap { max-width: min(620px, 100%); }
.ws-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; background: var(--bg); padding: 6px; border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; }
.ws-cell { aspect-ratio: 1; display: grid; place-items: center; font-weight: 800; font-size: clamp(.7rem, 3.2vw, 1.25rem); border-radius: 6px; background: var(--surface-2); cursor: pointer; transition: background .1s; }
.ws-cell.found { background: var(--fc); color: #fff; }
.ws-cell.sel { background: #fff; color: #111; transform: scale(1.05); }
.ws-words { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ws-words li { background: var(--surface-2); padding: .5rem .7rem; border-radius: 10px; }
.ws-words li.done { opacity: .55; text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.ws-preview { display: grid; grid-template-columns: repeat(var(--n), 26px); gap: 2px; margin: 8px 0 12px; overflow-x: auto; }
.ws-preview span { width: 26px; height: 26px; display: grid; place-items: center; background: var(--surface-2); border-radius: 4px; font-weight: 700; font-size: .8rem; }
@media (max-width: 760px) { .ws-layout { grid-template-columns: 1fr; } .ws-words { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }

/* Crucigrama */
.cw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-top: 12px; }
.cw-scroll { overflow-x: auto; }
.cw-grid { display: grid; gap: 2px; width: 100%; }
.cw-block { aspect-ratio: 1; }
.cw-cell { position: relative; aspect-ratio: 1; background: #fff; border-radius: 3px; color: #111; display: grid; place-items: center; font-weight: 800; min-width: 22px; }
.cw-cell.hl { background: #fff4b8; }
.cw-cell i { position: absolute; top: 1px; left: 3px; font-size: .58rem; font-style: normal; font-weight: 700; color: #444; line-height: 1; pointer-events: none; }
.cw-input { width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font: 800 clamp(.8rem, 3vw, 1.3rem) var(--font); color: #111; text-transform: uppercase; padding: 0; caret-color: transparent; }
.cw-input:focus { outline: 3px solid var(--theme); outline-offset: -3px; background: #ffe066; border-radius: 3px; }
.cw-preview { max-width: 640px; }
.cw-preview .cw-cell { font-size: .8rem; min-width: 24px; }
.cw-clue-bar { position: sticky; top: 64px; z-index: 5; background: var(--theme); color: #fff; padding: .6rem .9rem; border-radius: 10px; font-weight: 600; margin-top: 8px; }
.cw-clues h4 { margin: 0 0 .4rem; }
.cw-clues ol { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 4px; }
.cw-clues li { padding: .4rem .6rem; border-radius: 8px; cursor: pointer; background: var(--surface-2); font-size: .92rem; }
.cw-clues li.on { outline: 2px solid var(--theme); background: var(--surface-3); }
@media (max-width: 860px) { .cw-layout { grid-template-columns: 1fr; } .cw-clue-bar { top: 96px; } }

/* Quiz */
.qz { text-align: center; }
.qz-timer { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 14px 0; }
.qz-timer i { display: block; height: 100%; width: 100%; background: var(--accent); transition: width .1s linear; }
.qz-timer.low i { background: var(--danger); }
.qz-q { font-size: clamp(1.3rem, 3.4vw, 2rem); margin: 16px 0; }
.qz-img { max-height: 280px; border-radius: 12px; margin: 0 auto 14px; display: block; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-opt { display: flex; align-items: center; gap: .7rem; text-align: left; min-height: 74px; padding: .8rem 1rem; border: 0; border-radius: 12px;
  background: var(--c); color: #fff; font: 800 1.1rem var(--font); cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.35); transition: transform .08s, opacity .2s; }
.qz-opt:hover:not(:disabled) { transform: translateY(-2px); }
.qz-opt:disabled { cursor: default; }
.qz-opt.dim { opacity: .35; }
.qz-opt.right { outline: 4px solid #fff; box-shadow: 0 0 0 8px var(--ok); }
.qz-opt.wrong { outline: 4px solid #fff; box-shadow: 0 0 0 8px var(--danger); }
.qz-shape { font-size: 1.4rem; opacity: .9; }
.qz-feedback { margin-top: 18px; padding: 14px; border-radius: 12px; display: grid; gap: .6rem; justify-items: center; animation: up .25s; }
.qz-feedback.ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface-2)); }
.qz-feedback.bad { background: color-mix(in srgb, var(--danger) 16%, var(--surface-2)); }
.qz-feedback b { font-size: 1.3rem; }
.qz-feedback p { margin: 0; }
@media (max-width: 560px) { .qz-opts { grid-template-columns: 1fr; } .qz-opt { min-height: 58px; } }
.qz-ed-top { display: grid; grid-template-columns: 1fr auto; gap: 10px; width: 100%; }
.qz-opts-ed { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.qz-opt-ed { display: flex; align-items: center; gap: .5rem; border-left: 6px solid; padding-left: .5rem; border-radius: 6px; }
.qz-opt-ed input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex-shrink: 0; }
@media (max-width: 700px) { .qz-opts-ed, .qz-ed-top { grid-template-columns: 1fr; } }

/* Memoria */
.mem-board { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; max-width: 760px; margin: 0 auto; }
.mem-card { aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; perspective: 800px; cursor: pointer; }
.mem-inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mem-card.flip .mem-inner { transform: rotateY(180deg); }
.mem-front, .mem-back { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; padding: 6px; }
.mem-front { background: linear-gradient(135deg, var(--theme), color-mix(in srgb, var(--theme) 50%, #000)); color: rgba(255,255,255,.85); font-size: 2rem; font-weight: 900; }
.mem-back { background: #fff; color: #111; transform: rotateY(180deg); font-weight: 800; font-size: clamp(.75rem, 2.4vw, 1.05rem); text-align: center; gap: 4px; align-content: center; overflow: hidden; }
.mem-back img { max-width: 100%; max-height: 70%; object-fit: contain; border-radius: 6px; }
.mem-card.matched .mem-back { box-shadow: inset 0 0 0 4px var(--ok); }
.mem-card.nope .mem-back { box-shadow: inset 0 0 0 4px var(--danger); }
@media (max-width: 560px) { .mem-board { grid-template-columns: repeat(4, 1fr); gap: 6px; } }

/* Unir parejas */
.mt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mt-list { display: grid; gap: 8px; }
.mt-item { display: flex; align-items: center; gap: .6rem; text-align: left; padding: .7rem .8rem; border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface-2); color: var(--text); font: 600 1rem var(--font); cursor: pointer; min-height: 52px; }
.mt-item img { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: #fff; flex: none; }
.mt-item.sel { border-color: #fff; background: var(--surface-3); }
.mt-item.paired { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 18%, var(--surface-2)); }
.mt-badge { min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: #fff; font-weight: 900; font-size: .85rem; flex-shrink: 0; }
.mt-item.paired .mt-badge { background: var(--pc); }
@media (max-width: 560px) { .mt-cols { gap: 8px; } .mt-item { font-size: .88rem; padding: .5rem; } }

/* Clasificar */
.cl-pool { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 54px; padding: 10px; border: 2px dashed var(--line); border-radius: 12px; margin-bottom: 14px; }
.cl-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cl-group { border: 2px solid var(--gc); border-radius: 14px; padding: 10px; min-height: 120px; background: color-mix(in srgb, var(--gc) 10%, var(--surface)); cursor: pointer; }
.cl-group h4 { margin: 0 0 8px; }
.cl-items { display: flex; flex-wrap: wrap; gap: .4rem; }
.has-sel .cl-group { animation: pulse-b 1.2s ease-in-out infinite; }
@keyframes pulse-b { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gc) 40%, transparent); } }
.chip.sel { background: #fff; color: #111; }

/* Ordenar con imagen */
.ord-img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ord-label { display: block; color: var(--accent); font-size: .85rem; }

/* Palabra desordenada */
.an-dots { display: flex; gap: .35rem; flex-wrap: wrap; margin: 10px 0; }
.an-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 800; cursor: pointer; }
.an-dot.done { border-color: var(--accent); }
.an-dot.on { background: var(--theme); border-color: #fff; }
.an-clue { text-align: center; }
.an-slots, .an-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0; }
.an-slot { width: 44px; height: 52px; border: 0; border-bottom: 4px solid var(--muted); background: var(--surface-2); color: var(--text); border-radius: 8px 8px 2px 2px; font: 900 1.5rem var(--font); cursor: pointer; }
.an-slot.filled { border-bottom-color: var(--accent); }
.an-tile { width: 50px; height: 54px; border: 0; border-radius: 10px; background: #fff; color: #111; font: 900 1.6rem var(--font); cursor: pointer; box-shadow: 0 4px 0 #9aa; transition: transform .08s; }
.an-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 #9aa; }
.an-tile:disabled { opacity: .2; cursor: default; }
@media (max-width: 480px) { .an-slot { width: 34px; height: 44px; font-size: 1.2rem; } .an-tile { width: 40px; height: 46px; font-size: 1.3rem; } }

/* Ahorcado */
.hm-top { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; margin: 10px 0; }
.hm-svg { width: 150px; height: 160px; }
.hm-svg .hm-frame { stroke: var(--muted); stroke-width: 4; fill: none; stroke-linecap: round; }
.hm-svg .hm-body { stroke: var(--danger); stroke-width: 4; fill: none; stroke-linecap: round; }
.hm-lives { text-align: center; font-size: .9rem; letter-spacing: .1em; }
.hm-word { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.hm-letter { width: 36px; height: 46px; border-bottom: 4px solid var(--text); display: grid; place-items: end center; font: 900 1.6rem var(--font); padding-bottom: 2px; }
.hm-letter.on { color: var(--accent); }
.hm-letter.lost { color: var(--danger); }
.hm-sep { width: 18px; }
.hm-msg { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 8px 0; font-size: 1.2rem; }
.hm-kb { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; max-width: 560px; margin: 10px auto 0; }
.hm-key { height: 46px; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--text); font: 800 1.05rem var(--font); cursor: pointer; }
.hm-key:hover:not(:disabled) { background: #444455; }
.hm-key.hit { background: var(--ok); color: #062b14; }
.hm-key.miss { background: transparent; color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 560px) { .hm-top { grid-template-columns: 1fr; justify-items: center; } .hm-letter { width: 26px; height: 38px; font-size: 1.2rem; } .hm-key { height: 42px; font-size: .9rem; } }

/* Ubica en la imagen */
.li-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.li-board { position: relative; border-radius: 12px; overflow: hidden; background: #000; user-select: none; }
.li-board img { display: block; width: 100%; height: auto; }
.li-edit { cursor: crosshair; min-height: 200px; }
.li-empty { width: 100%; height: 240px; }
.li-dot { position: absolute; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; background: var(--theme);
  color: #fff; font: 900 .9rem var(--font); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.6); touch-action: none; padding: 0; }
.li-dot.filled { background: var(--ok); color: #062b14; }
.li-dot.active { animation: pulse 1.2s infinite; outline: 3px solid #fff; outline-offset: 3px; }
.li-tag { position: absolute; left: 50%; top: 110%; transform: translateX(-50%); white-space: nowrap; background: rgba(0,0,0,.8); color: #fff; padding: 1px 6px; border-radius: 6px; font-size: .78rem; font-weight: 700; pointer-events: none; }
.li-tag:empty { display: none; }
.li-list { padding-left: 1.6em; margin: 0; display: grid; gap: 4px; }
.li-list li { padding: .35rem .5rem; border-radius: 8px; cursor: pointer; background: var(--surface-2); }
.li-list li.on { outline: 2px solid var(--theme); }
.li-editor { align-items: start; }
@media (max-width: 760px) { .li-layout { grid-template-columns: 1fr; } }

/* Revisión genérica */
.rv-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rv-items li { display: flex; gap: .6rem; align-items: baseline; background: var(--surface-2); padding: .5rem .7rem; border-radius: 10px; }
.rv-items li.ok .rv-mark { color: var(--ok); }
.rv-items li.bad .rv-mark { color: var(--danger); }
.rv-mark { font-weight: 900; }

/* Kit de editor: listas */
.lst { display: grid; gap: 8px; margin-bottom: 10px; }
.lst-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.lst-n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.lst-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; min-width: 0; }
.lst-fields > .input, .lst-fields > textarea { flex: 1 1 100%; }
.lst-f { flex: 1 1 180px; min-width: 0; display: grid; gap: 2px; }
.lst-wide { flex: 3 1 300px; }
.lst-img { flex: 0 0 auto; }
.lst-label { font-size: .75rem; color: var(--muted); font-weight: 700; }
.lst-tools { display: flex; flex-direction: column; }
.upl-compact { padding: 6px; gap: 8px; border-style: solid; }
.upl-compact .upl-empty, .upl-compact .upl-img { width: 52px; height: 52px; font-size: 1.3rem; }
.upl-compact .upl-side { min-width: 0; }

/* ---------- 🖼️ Palabra e imagen ---------- */
.pw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 12px 0; }
.pw-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border: 3px solid var(--line, #ddd); border-radius: 16px; background: var(--surface, #fff); color: var(--text); cursor: pointer; font: inherit; transition: transform .1s, border-color .1s; }
.pw-card:hover { transform: translateY(-2px); }
.pw-card.active { border-color: var(--theme, #7c3aed); box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme, #7c3aed) 25%, transparent); }
.pw-card.filled { border-color: var(--pc); }
.pw-pic { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; border-radius: 10px; }
.pw-emoji { display: grid; place-items: center; font-size: 4rem; line-height: 1; }
.pw-word { min-height: 1.6em; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--surface-2, #f3f4f6); }
.pw-card.filled .pw-word { background: var(--pc); color: #fff; }

/* ---------- 🔡 Completar palabras ---------- */
.ml-list { display: grid; gap: 12px; margin: 12px 0; }
.ml-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2, #f3f4f6); flex-wrap: wrap; }
.ml-n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--theme, #7c3aed); color: #fff; font-weight: 800; flex: none; }
.ml-pic { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; flex: none; }
.ml-pic.pw-emoji { font-size: 2.8rem; }
.ml-body { flex: 1; min-width: 200px; }
.ml-word { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; overflow-x: auto; padding-bottom: 4px; }
.ml-fixed, .ml-input { flex: 0 1 38px; min-width: 24px; height: 46px; display: grid; place-items: center; border-radius: 8px; font: 900 1.4rem var(--font); text-transform: uppercase; text-align: center; }
.ml-fixed { background: var(--surface, #fff); color: var(--text); }
.ml-input { border: 0; border-bottom: 4px solid var(--theme, #7c3aed); background: #fff; color: #111; padding: 0; }
.ml-input:focus { outline: 3px solid color-mix(in srgb, var(--theme, #7c3aed) 40%, transparent); }
.ml-gap { flex: 0 0 12px; }
@media (max-width: 480px) { .ml-fixed, .ml-input { height: 40px; font-size: 1.15rem; } .ml-body { min-width: 0; flex-basis: 100%; } }

/* ---------- 🧩 Ordenar oraciones ---------- */
.so-line { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; margin: 12px 0; border: 3px dashed var(--theme, #7c3aed); border-radius: 16px; }
.so-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.so-word { border: 0; border-radius: 12px; padding: 10px 14px; background: #fff; color: #111; font: 800 1.15rem var(--font); cursor: pointer; box-shadow: 0 4px 0 #9aa; }
.so-word.on { background: var(--theme, #7c3aed); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.so-word:disabled { opacity: .2; cursor: default; }

/* ---------- 🕵️ ¿Cuál no pertenece? ---------- */
.oo-list { display: grid; gap: 14px; margin: 12px 0; }
.oo-round { padding: 12px 14px; border-radius: 16px; border-left: 6px solid var(--gc); background: var(--surface-2, #f3f4f6); }
.oo-n { font-weight: 800; color: var(--gc); }
.oo-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.oo-opt { border: 3px solid transparent; border-radius: 12px; padding: 10px 16px; background: #fff; color: #111; font: 700 1.05rem var(--font); cursor: pointer; }
.oo-opt.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 18%, #fff); }
.oo-opt.on::before { content: '🕵️ '; }

/* ---------- ✍️ Respuesta corta ---------- */
.sa-list { display: grid; gap: 14px; padding-left: 1.4em; margin: 12px 0; }
.sa-q .sa-text { font-weight: 700; margin: 0 0 6px; }

/* ---------- ✨ Modo IA ---------- */
.ai-btn { background: linear-gradient(135deg, #7c3aed, #ec4899); color: #fff; border: 0; }
.ai-btn:hover { filter: brightness(1.08); }
.ai-wait { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2, #f3f4f6); }
.ai-wait .spin { width: 26px; height: 26px; border: 4px solid #ddd; border-top-color: #7c3aed; border-radius: 50%; animation: ai-spin .8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ai-chips button { font-size: .8rem; }

/* ---------- 📖 Comprensión lectora ---------- */
.single:has(.rd-card) { max-width: 1180px; }
.rd-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin: 12px 0; }
.rd-text { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 18px 20px; border-radius: 18px; background: #FFFDF7; border: 2px solid var(--line, #eee); color: #2B2350; font-size: 1.08rem; line-height: 1.7; }
.rd-text p { margin: 0 0 .9em; }
.rd-title { margin: 0 0 10px; font-family: var(--font-display); }
.rd-img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto 12px; border-radius: 12px; object-fit: contain; }
.rd-source { font-style: italic; }
.rd-side-head { margin-bottom: 8px; }
.rd-qs { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: rdq; }
.rd-q { counter-increment: rdq; padding: 12px 14px; border-radius: 16px; border-left: 6px solid var(--gc); background: var(--surface-2, #f3f4f6); }
.rd-q.done { background: color-mix(in srgb, var(--gc) 8%, var(--surface, #fff)); }
.rd-q-text { margin: 4px 0 8px; font-weight: 800; }
.rd-q-text::before { content: counter(rdq) ". "; color: var(--gc); }
.rd-level { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--gc); color: #fff; }
.rd-opts { display: grid; gap: 6px; }
.rd-opt { display: flex; gap: 10px; align-items: center; text-align: left; border: 2px solid transparent; border-radius: 12px; padding: 8px 12px; background: #fff; color: #111; font: 600 1rem var(--font); cursor: pointer; }
.rd-opt:hover { border-color: color-mix(in srgb, var(--gc) 50%, transparent); }
.rd-opt.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 16%, #fff); }
.rd-letter { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3, #eee); font-size: .85rem; }
.rd-opt.on .rd-letter { background: var(--gc); color: #fff; }
@media (max-width: 820px) { .rd-layout { grid-template-columns: 1fr; } .rd-text { position: static; max-height: none; } }

/* ---------- 🧮 Cálculo mental ---------- */
.md-progress { height: 10px; border-radius: 999px; background: var(--surface-3, #eee); overflow: hidden; margin: 8px 0; }
.md-progress i { display: block; height: 100%; width: 0; background: var(--rainbow, var(--theme)); transition: width .3s; }
.md-board { display: grid; justify-items: center; gap: 12px; padding: 22px 12px; margin: 10px 0; border-radius: 22px; background: var(--surface-2, #f3f4f6); }
.md-problem { font: 700 clamp(2.4rem, 9vw, 4.2rem) var(--font-display); color: var(--text); text-align: center; line-height: 1.1; }
.md-eq { color: var(--muted); }
.md-done { font-size: .6em; }
.md-answer { display: flex; gap: 8px; align-items: stretch; }
.md-input { width: 7.5ch; border: 0; border-bottom: 5px solid var(--theme, #7c3aed); border-radius: 12px; background: #fff; color: #111; font: 800 2.2rem var(--font-display); text-align: center; padding: 4px 6px; }
.md-input:focus { outline: 4px solid color-mix(in srgb, var(--theme, #7c3aed) 35%, transparent); }
.md-flash { min-height: 1.6em; font-weight: 800; font-size: 1.1rem; }
.md-flash.ok { color: var(--ok, #16a34a); }
.md-flash.bad { color: var(--danger, #e5374f); }
.md-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; margin: 0 auto 10px; }
.md-key { border: 0; border-radius: 14px; padding: 12px 0; background: #fff; color: #111; font: 800 1.4rem var(--font-display); box-shadow: 0 4px 0 #c9c2e6; cursor: pointer; }
.md-key:active { transform: translateY(3px); box-shadow: 0 1px 0 #c9c2e6; }
@media (hover: hover) and (pointer: fine) { .md-pad { display: none; } }

/* ---------- 🧱 Formar palabras con sílabas ---------- */
.sy-pic { display: grid; place-items: center; min-height: 20px; margin: 6px 0; }
.sy-pic img { max-width: 180px; max-height: 160px; object-fit: contain; border-radius: 14px; }
.sy-emoji { font-size: 5.5rem; line-height: 1; }
.sy-line { min-height: 78px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; padding: 12px; margin: 12px 0; border: 3px dashed var(--theme, #7c3aed); border-radius: 18px; }
.sy-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 14px; }
.sy-tile { min-width: 70px; border: 0; border-radius: 16px; padding: 12px 16px; background: var(--sc); color: #fff; font: 700 1.7rem var(--font-display); cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.22); text-transform: lowercase; }
.sy-tile.on { box-shadow: 0 2px 0 rgba(0,0,0,.22); }
.sy-tile:disabled { opacity: .2; cursor: default; }

/* =================== Tipos paso a paso (players-steps.js) =================== */
.sfx-btn { border: 0; background: var(--surface-2, #f3f0ff); border-radius: 999px; width: 38px; height: 38px; font-size: 1.15rem; cursor: pointer; margin-right: 6px; flex: none; }
.sfx-btn:hover { transform: scale(1.08); }
.sp-stats .hot { display: inline-block; animation: sp-flame .6s ease-in-out infinite alternate; }
.sp-stats .hot b { color: #ea580c; }
@keyframes sp-flame { to { transform: scale(1.12) rotate(-3deg); } }
.sp-stage { min-height: 260px; margin: 10px 0; }
.sp-stage.pop > * { animation: sp-in .38s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes sp-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.sp-stage.locked { pointer-events: none; }
.sp-center { display: grid; justify-items: center; gap: 14px; text-align: center; }
.sp-feedback { margin: 6px 0 4px; padding: 14px 16px; border-radius: 18px; display: grid; gap: 6px; justify-items: center; text-align: center; animation: sp-in .3s both; }
.sp-feedback.ok { background: #E9FBEF; border: 2px solid #86efac; }
.sp-feedback.half { background: #FFF7E0; border: 2px solid #fcd34d; }
.sp-feedback.bad { background: #FFECEF; border: 2px solid #fda4af; animation: sp-in .3s both, sp-shake .4s .05s; }
@keyframes sp-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.sp-fb-head { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.sp-fb-icon { font-size: 1.6rem; }
.sp-feedback p { margin: 0; }
.sp-fb-msg { font-weight: 700; }
.sp-done { display: grid; justify-items: center; gap: 8px; padding: 20px; text-align: center; }
.sp-trophy { font-size: 5rem; animation: sp-bounce 1s ease-in-out infinite alternate; }
@keyframes sp-bounce { to { transform: translateY(-10px) rotate(4deg); } }
.sp-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(560px, 100%); }
.sp-opts.few { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-opt { border: 0; border-radius: 16px; padding: 14px 10px; background: #fff; color: #1f1a3d; font: 800 1.1rem var(--font); cursor: pointer; box-shadow: 0 5px 0 color-mix(in srgb, var(--oc) 60%, #000), inset 0 0 0 3px var(--oc); transition: transform .08s; }
.sp-opt:hover:not(:disabled) { transform: translateY(-2px); }
.sp-opt:active:not(:disabled) { transform: translateY(3px); }
.sp-opt.big { font-size: 1.5rem; font-family: var(--font-display); }
.sp-opt.emoji { font-size: 2.8rem; padding: 10px; line-height: 1.2; }
.sp-opt.right { background: #16a34a; color: #fff; box-shadow: 0 5px 0 #0f6b32; animation: sp-pulse .5s; }
.sp-opt.wrong { background: #e11d48; color: #fff; box-shadow: 0 5px 0 #8a1030; }
.sp-opt:disabled:not(.right):not(.wrong) { opacity: .45; }
@keyframes sp-pulse { 50% { transform: scale(1.07); } }
.sp-keypad { display: grid; justify-items: center; gap: 10px; width: 100%; }
.sp-keypad .md-pad { width: min(300px, 100%); }
.sp-num { width: 8ch; border: 0; border-bottom: 5px solid var(--theme, #7c3aed); border-radius: 14px; background: #fff; color: #111; font: 800 2.2rem var(--font-display); text-align: center; padding: 4px 8px; }
.sp-num:focus { outline: 4px solid color-mix(in srgb, var(--theme, #7c3aed) 35%, transparent); }
.sp-affix { align-self: center; font: 800 1.6rem var(--font-display); color: var(--muted); }
.md-pad.show { display: grid !important; }
.sp-textrow { display: flex; gap: 8px; width: min(560px, 100%); }
.sp-text { flex: 1; font-size: 1.2rem; padding: 12px 14px; }
.sp-listen { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.sp-speaker { width: 96px; height: 96px; border-radius: 50%; border: 0; font-size: 2.8rem; cursor: pointer; background: radial-gradient(circle at 30% 30%, #a78bfa, #6C47FF); box-shadow: 0 6px 0 #4E2FD9; animation: sp-ring 1.8s ease-in-out infinite; }
.sp-speaker:active { transform: translateY(4px); }
@keyframes sp-ring { 50% { box-shadow: 0 6px 0 #4E2FD9, 0 0 0 12px rgba(108,71,255,.15); } }
/* comparar */
.cmp-row { display: flex; align-items: center; gap: 18px; font: 700 clamp(2.4rem, 9vw, 4rem) var(--font-display); }
.cmp-n { padding: 6px 18px; border-radius: 18px; background: var(--surface-2, #f3f0ff); }
.cmp-slot { width: 1.6em; height: 1.4em; display: grid; place-items: center; border: 4px dashed var(--theme, #7c3aed); border-radius: 16px; color: var(--theme, #7c3aed); }
.cmp-slot.ok { border-style: solid; background: #dcfce7; color: #15803d; animation: sp-pulse .5s; }
.cmp-slot.bad { border-style: solid; background: #ffe4e6; color: #be123c; }
.cmp-btn b { display: block; font: 700 2.2rem var(--font-display); }
.cmp-btn small { font-size: .75rem; color: var(--muted); }
.cmp-btn.right small, .cmp-btn.wrong small { color: #fff; }
/* conteo */
.cnt-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 520px; }
.cnt-item { border: 0; background: none; font-size: 2.6rem; cursor: pointer; border-radius: 14px; padding: 2px 4px; animation: sp-drop .45s cubic-bezier(.2,.9,.3,1.4) both; }
.cnt-item.on { background: #fde68a; transform: scale(.9); }
@keyframes sp-drop { from { opacity: 0; transform: translateY(-30px) scale(.5); } }
.cnt-tally { min-height: 1.3em; font-weight: 800; color: var(--muted); }
/* series */
.seq-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.seq-n { min-width: 64px; padding: 12px 10px; border-radius: 16px; background: var(--sc, #6C47FF); color: #fff; font: 700 1.6rem var(--font-display); box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.seq-n.hole { background: #fff; color: var(--theme, #7c3aed); border: 4px dashed var(--theme, #7c3aed); box-shadow: none; }
.seq-n.hole.ok { background: #16a34a; color: #fff; border-style: solid; }
.seq-n.hole.bad { background: #e11d48; color: #fff; border-style: solid; }
.seq-arrow { color: var(--muted); font-size: 1.6rem; }
/* reloj */
.ck-svg { width: 70%; max-width: 250px; filter: drop-shadow(0 8px 14px rgba(60,40,140,.18)); }
.ck-num { font: 700 17px var(--font-display); fill: #2B2350; }
/* dinero */
.mo-table { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: #E8F5E9; max-width: 640px; }
.mo-coin { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #f1f5f9, #94a3b8); border: 4px solid #64748b; font: 800 .95rem var(--font); color: #1e293b; box-shadow: 0 4px 0 #475569; animation: sp-drop .5s both; }
.mo-coin.gold { background: radial-gradient(circle at 35% 30%, #fef3c7, #d4a017); border-color: #a16207; box-shadow: 0 4px 0 #854d0e; }
.mo-bill { width: 150px; height: 74px; border-radius: 10px; background: linear-gradient(135deg, var(--bc), color-mix(in srgb, var(--bc) 60%, #fff)); border: 3px solid color-mix(in srgb, var(--bc) 70%, #000); color: #fff; display: grid; place-items: center; align-content: center; text-shadow: 0 1px 2px rgba(0,0,0,.4); box-shadow: 0 4px 0 rgba(0,0,0,.2); animation: sp-drop .5s both; }
.mo-bill b { font: 700 1.3rem var(--font-display); }
.mo-bill small { font-size: .55rem; letter-spacing: .2em; }
/* valor posicional / ecuaciones */
.pv-num { font: 700 clamp(2.4rem, 10vw, 4.2rem) var(--font-display); letter-spacing: .04em; }
.pv-d.hi { display: inline-block; color: #fff; background: #e11d48; border-radius: 12px; padding: 0 6px; animation: sp-pulse 1s infinite; }
.pv-sep { color: var(--muted); }
.fx-eq { display: flex; gap: 14px; align-items: center; font: 700 clamp(1.9rem, 7vw, 3.2rem) var(--font-display); padding: 14px 22px; border-radius: 20px; background: var(--surface-2, #f3f0ff); }
.fx-scale { font-size: .8em; animation: sp-tilt 2s ease-in-out infinite alternate; }
@keyframes sp-tilt { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
/* recta, fracciones, plano */
.nl-svg { width: 100%; max-width: 720px; cursor: crosshair; touch-action: manipulation; }
.nl-label { font: 700 18px var(--font-display); fill: #2B2350; }
.nl-arrow { animation: sp-bounce .7s ease-in-out infinite alternate; }
.nl-target { font-family: var(--font-display); font-size: 1.4em; color: #e11d48; }
.fr-svg { width: 60%; max-width: 220px; }
.fr-svg.bar { width: 100%; max-width: 420px; }
.sp-opt.frac { font-size: 1.8rem; }
.pl-svg { width: 100%; max-width: 380px; cursor: crosshair; background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); touch-action: manipulation; }
.pl-num { font: 700 12px var(--font); fill: #6F6892; }
.pl-axis { font: 700 15px var(--font-display); fill: #2B2350; }
/* gráficas */
.ch-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: center; }
@media (max-width: 760px) { .ch-layout { grid-template-columns: 1fr; } }
.ch-wrap, .ch-picto { background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow-sm); }
.ch-title { display: block; text-align: center; margin-bottom: 6px; }
.ch-plot { position: relative; height: 240px; margin: 0 0 34px 40px; }
.ch-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.ch-line { border-top: 1px dashed #ddd6fe; position: relative; height: 0; }
.ch-line span { position: absolute; left: -42px; top: -9px; width: 36px; text-align: right; font-size: .75rem; color: var(--muted); }
.ch-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-around; gap: 6px; }
.ch-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.ch-bar { width: min(56px, 80%); background: var(--bc); border-radius: 8px 8px 0 0; animation: ch-grow .7s cubic-bezier(.2,.9,.3,1.1) both; transform-origin: bottom; }
@keyframes ch-grow { from { transform: scaleY(0); } }
.ch-label { position: absolute; bottom: -26px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.ch-prow { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed #eee; }
.ch-plabel { width: 90px; font-weight: 700; text-align: right; }
.ch-picons { font-size: 1.5rem; letter-spacing: 2px; }
.ch-q { font-weight: 800; }
/* sudoku */
.sd-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(calc(var(--n) * 66px), 100%); border: 3px solid #2B2350; border-radius: 10px; overflow: hidden; background: #fff; }
.sd-cell { aspect-ratio: 1; border: 0; border-top: var(--bt) solid #2B2350; border-left: var(--bl) solid #2B2350; background: #fff; font: 700 1.8rem var(--font-display); color: #6C47FF; cursor: pointer; padding: 0; }
.sd-cell.given { color: #2B2350; background: #F5F2FF; cursor: default; }
.sd-cell.sel { background: #FEF3C7; box-shadow: inset 0 0 0 3px #f59e0b; }
.sd-cell.bad { background: #ffe4e6; color: #be123c; }
.sd-cell.ok { animation: sp-pulse .6s; }
.sd-palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-sym { width: 56px; height: 56px; border: 0; border-radius: 14px; background: #fff; font: 700 1.7rem var(--font-display); box-shadow: 0 4px 0 #c9c2e6; cursor: pointer; }
.sd-sym:active { transform: translateY(3px); }
/* estimación, patrones */
.es-q { display: flex; gap: 12px; align-items: center; font-size: 1.3rem; font-weight: 800; max-width: 640px; padding: 14px 18px; border-radius: 18px; background: var(--surface-2, #f3f0ff); text-align: left; }
.es-q span { font-size: 2.2rem; }
.pt-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 14px; border-radius: 20px; background: var(--surface-2, #f3f0ff); }
.pt-e { font-size: clamp(2.2rem, 8vw, 3.2rem); animation: sp-drop .4s both; }
.pt-e.hole { width: 1.4em; display: grid; place-items: center; border: 4px dashed var(--theme, #7c3aed); border-radius: 14px; color: var(--theme, #7c3aed); font-family: var(--font-display); }
.pt-e.hole.ok { border-color: #16a34a; background: #dcfce7; }
.pt-e.hole.bad { border-color: #e11d48; background: #ffe4e6; }
/* tildes, errores, palabras */
.ac-word { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ac-l { min-width: 52px; height: 64px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2, #f3f0ff); font: 700 2.2rem var(--font-display); color: #2B2350; }
button.ac-l { border: 3px dashed #a78bfa; background: #fff; cursor: pointer; }
button.ac-l:hover { background: #ede9fe; }
.ac-l.ok { background: #16a34a !important; color: #fff; border-color: #16a34a; animation: sp-pulse .5s; }
.ac-l.bad { background: #e11d48 !important; color: #fff; }
.ac-none.right { background: #16a34a; color: #fff; }
.ac-none.wrong { background: #e11d48; color: #fff; }
.eh-sentence { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; max-width: 720px; }
.eh-glass { font-size: 2rem; animation: sp-tilt 1.4s ease-in-out infinite alternate; }
.eh-tok, .wt-tok { border: 0; border-radius: 10px; padding: 8px 10px; background: #fff; color: #1f1a3d; font: 700 1.25rem var(--font); cursor: pointer; box-shadow: 0 3px 0 #ddd6fe; }
.eh-tok:hover, .wt-tok:hover { background: #fef9c3; }
.eh-tok.ok, .wt-tok.ok { background: #16a34a; color: #fff; }
.eh-tok.bad, .wt-tok.bad { background: #e11d48; color: #fff; text-decoration: line-through; }
.wt-rule { text-align: center; font-weight: 800; font-size: 1.15rem; padding: 10px 14px; border-radius: 14px; background: #FEF3C7; margin-bottom: 10px; }
.wt-text { display: flex; flex-wrap: wrap; gap: 4px; line-height: 1.6; padding: 14px; border-radius: 18px; background: #FFFDF7; border: 2px solid var(--line, #eee); margin-bottom: 12px; }
.wt-tok { font-weight: 600; font-size: 1.1rem; padding: 4px 6px; box-shadow: none; background: transparent; }
.wt-tok.on { background: #FDE047; box-shadow: 0 3px 0 #CA8A04; }
.wt-tok.missed, .ss-gap.missed, .stp-balloon.missed { outline: 3px dashed #16a34a; outline-offset: 2px; }
.ss-word { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; font: 700 clamp(2.2rem, 9vw, 3.4rem) var(--font-display); }
.ss-l { padding: 0 2px; }
.ss-gap { width: 22px; height: 1.2em; border: 0; background: transparent; cursor: pointer; position: relative; border-radius: 6px; }
.ss-gap::after { content: ""; position: absolute; left: 50%; top: 15%; bottom: 15%; border-left: 3px dotted #c4b5fd; }
.ss-gap:hover { background: #ede9fe; }
.ss-gap.on::after { border-left: 5px solid #e11d48; top: 0; bottom: 0; }
.ss-gap.on::before { content: "✂️"; position: absolute; top: -.9em; left: 50%; transform: translateX(-50%); font-size: .45em; }
.ss-gap.ok::after { border-left-color: #16a34a; }
.ss-gap.bad::after { border-left-color: #e11d48; border-left-style: dashed; }
/* mecanografía */
.ty-target { font: 600 1.3rem/1.7 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 14px 16px; border-radius: 16px; background: #1E1B4B; color: #c7d2fe; margin-bottom: 10px; white-space: pre-wrap; }
.ty-ch.ok { color: #86efac; }
.ty-ch.bad { color: #fff; background: #e11d48; border-radius: 3px; }
.ty-ch.cur { border-bottom: 3px solid #FDE047; }
.ty-input { font: 600 1.15rem ui-monospace, Consolas, monospace; margin-bottom: 10px; }
/* acertijos, quién soy, mensaje secreto */
.er-emojis { display: flex; gap: 10px; font-size: clamp(3rem, 12vw, 4.6rem); }
.er-emojis span { display: inline-block; animation: sp-drop .5s both, sp-bounce 1.4s 1s ease-in-out infinite alternate; }
.wa-mask { font-size: 4.4rem; animation: sp-tilt 2.2s ease-in-out infinite alternate; }
.wa-clues { display: grid; gap: 8px; text-align: left; width: min(560px, 100%); padding-left: 1.6em; margin: 0; }
.wa-clues li { padding: 10px 14px; border-radius: 14px; background: var(--surface-2, #f3f0ff); font-weight: 700; }
.wa-clues li.new { animation: sp-in .45s both; background: #FEF3C7; }
.sc-details summary { cursor: pointer; font-weight: 800; margin-bottom: 6px; }
.sc-legend { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.sc-key { display: grid; justify-items: center; min-width: 34px; padding: 3px 4px; border-radius: 8px; background: #1E1B4B; color: #fff; }
.sc-key small { color: #FDE047; font-weight: 800; }
.sc-code { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; padding: 16px; margin-bottom: 12px; border-radius: 18px; background: repeating-linear-gradient(45deg, #FEF3C7, #FEF3C7 10px, #FDE68A 10px, #FDE68A 20px); }
.sc-word { display: flex; gap: 4px; }
.sc-tok { min-width: 36px; padding: 8px 4px; text-align: center; border-radius: 8px; background: #fff; font: 700 1.25rem var(--font-display); box-shadow: 0 3px 0 #CA8A04; }
.sp-secret_code .sp-textrow, .sp-word_tap .row, .sp-table_fill .row { margin: 0 auto; }
/* Venn */
.vn-current { font: 700 1.5rem var(--font-display); padding: 10px 20px; border-radius: 999px; background: var(--theme, #7c3aed); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.2); animation: sp-bounce .9s ease-in-out infinite alternate; }
.vn-svg { width: min(560px, 100%); cursor: pointer; touch-action: manipulation; }
.vn-zone { fill: #FFFDF7; stroke: #D9D2F3; stroke-width: 3; }
.vn-a { fill: rgba(56, 189, 248, .28); stroke: #0284c7; stroke-width: 3; }
.vn-b { fill: rgba(251, 113, 133, .28); stroke: #e11d48; stroke-width: 3; }
.vn-title { font: 700 17px var(--font-display); }
.vn-title.a { fill: #0369a1; }
.vn-title.b { fill: #be123c; }
.vn-hint { font-size: 12px; fill: #6F6892; }
.vn-item { font: 700 13px var(--font); }
.vn-item.ok { fill: #15803d; }
.vn-item.bad { fill: #be123c; }
.vn-buttons { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
/* tabla */
.tf-scroll { overflow-x: auto; margin: 8px 0 12px; }
.tf-table { border-collapse: separate; border-spacing: 0; margin: 0 auto; min-width: min(560px, 100%); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tf-table th { background: var(--theme, #7c3aed); color: #fff; padding: 10px 12px; font-family: var(--font-display); }
.tf-table td { padding: 6px 10px; background: #fff; border-bottom: 1px solid #eee; text-align: center; font-weight: 700; }
.tf-in { width: 100%; min-width: 90px; border: 0; border-bottom: 3px solid #a78bfa; background: #FEFCE8; padding: 6px; font: 700 1rem var(--font); text-align: center; border-radius: 6px; }
.tf-in.ok { background: #dcfce7; border-color: #16a34a; }
.tf-in.bad { background: #ffe4e6; border-color: #e11d48; }
/* globos */
.stp-area { position: relative; height: 340px; overflow: hidden; border-radius: 20px; background: linear-gradient(#bae6fd, #e0f2fe 70%, #bbf7d0); margin: 8px 0 12px; }
.stp-balloon { position: absolute; bottom: -90px; min-width: 96px; padding: 18px 12px 22px; border: 0; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--bc) 45%, #fff), var(--bc)); color: #fff; font: 700 1rem var(--font); text-shadow: 0 1px 2px rgba(0,0,0,.35); cursor: pointer; animation: stp-float linear infinite; }
.stp-balloon::after { content: ""; position: absolute; left: 50%; bottom: -16px; height: 16px; border-left: 2px solid rgba(0,0,0,.25); }
@keyframes stp-float { from { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-220px) rotate(3deg); } to { transform: translateY(-440px) rotate(-3deg); } }
.stp-balloon.popped { background: #fff; color: var(--bc); box-shadow: 0 0 0 4px var(--bc); text-shadow: none; animation-play-state: paused; }
.stp-balloon.popped::before { content: "💥"; position: absolute; top: -18px; right: -6px; font-size: 1.4rem; }
.stp-balloon.ok { background: #16a34a; color: #fff; box-shadow: none; }
.stp-balloon.bad { background: #e11d48; color: #fff; box-shadow: none; }
/* diálogo */
.dl-chat { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 14px; border-radius: 20px; background: #ECE5DD; margin-bottom: 8px; }
.dl-msg { max-width: 78%; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.1); animation: sp-in .3s both; align-self: flex-start; }
.dl-msg.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: #DCF8C6; }
.dl-msg small { display: block; font-weight: 800; color: #6C47FF; font-size: .75rem; }
.dl-msg.bad { background: #ffe4e6; text-decoration: line-through; }
.dl-msg.fix { background: #bbf7d0; }
.dl-typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 12px; border-radius: 16px; background: #fff; }
.dl-typing i { width: 8px; height: 8px; border-radius: 50%; background: #a8a29e; animation: dl-dot 1s infinite; }
.dl-typing i:nth-child(2) { animation-delay: .15s; }
.dl-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dl-dot { 50% { transform: translateY(-5px); opacity: .5; } }
.sp-opt.dl-opt { font-size: 1rem; font-weight: 700; text-align: left; }
.sp-dialogue .sp-opts, .sp-choose_path .sp-opts { grid-template-columns: 1fr; margin: 0 auto; }
/* elige tu camino */
.cp-scene { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, #FFF7ED, #FDF2F8); }
.cp-emoji { font-size: 4rem; animation: sp-bounce 1.2s ease-in-out infinite alternate; }
.cp-text { font-size: 1.2rem; font-weight: 700; max-width: 640px; margin: 0; }
.sp-opt.cp-opt { font-size: 1.05rem; text-align: left; padding: 14px 16px; }
.cp-stars { font-weight: 800; font-size: 1.1rem; }
/* tarjetas */
.fc-card { position: relative; width: 100%; max-width: 420px; aspect-ratio: 3 / 2; perspective: 1000px; cursor: pointer; }
.fc-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; padding: 18px; border-radius: 22px; backface-visibility: hidden; box-shadow: 0 10px 24px rgba(60,40,140,.2); transition: transform .6s cubic-bezier(.3,1.3,.4,1); text-align: center; }
.fc-face p { font: 700 1.5rem var(--font-display); margin: 0; }
.fc-face.front { background: linear-gradient(135deg, #8B5CF6, #6C47FF); color: #fff; }
.fc-face.front small { opacity: .8; }
.fc-card:not(.flipped) .fc-face.back, .fc-card.flipped .fc-face.front { pointer-events: none; }
.fc-face.back { background: #fff; color: #2B2350; border: 4px solid #8B5CF6; transform: rotateY(180deg); }
.fc-card.flipped .fc-face.front { transform: rotateY(-180deg); }
.fc-card.flipped .fc-face.back { transform: rotateY(0); animation: fc-flip .6s; }
@keyframes fc-flip { from { transform: rotateY(180deg); } }
.fc-emoji { font-size: 2.6rem; }
@media (prefers-reduced-motion: reduce) {
  .sp-stage.pop > *, .sp-trophy, .er-emojis span, .cnt-item, .pt-e, .ch-bar, .sp-speaker, .vn-current, .cp-emoji, .wa-mask, .fx-scale, .eh-glass, .pv-d.hi { animation: none !important; }
  .stp-balloon { animation-duration: 12s !important; }
}
.cp-img { width: min(320px, 100%); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow-sm); background: #fff; }
.lc-img { width: 100%; max-width: 130px; aspect-ratio: 1; object-fit: contain; display: block; margin: 0 auto; }
.tf-card img { max-height: 180px; object-fit: contain; }
