/* ================= 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: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.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; }
