/* =====================================================================
   Fase 10: actividades generales
   ===================================================================== */
/* Clasificar */
.cl { display: grid; gap: 10px; }
.cl-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; padding: 10px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2); align-items: center; }
.cl-pool.picking { border-color: var(--accent); }
.cl-chip { cursor: grab; font-weight: 800; touch-action: manipulation; }
.cl-chip img { max-height: 56px; max-width: 110px; border-radius: 6px; display: block; }
.cl-chip.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.cl-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.cl-cat { border: 2px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px; min-height: 120px; display: grid; align-content: start; gap: 8px; cursor: pointer; }
.cl-cat.target { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.cl-cat:focus-visible { outline: 3px solid var(--accent); }
.cl-name { font: 700 1.05rem var(--display); color: var(--accent); }
.cl-in { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-ed { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cl-cat-ed { display: grid; gap: 6px; }
.cl-cat-ed .row { flex-wrap: nowrap; }

/* Imágenes: señalar y etiquetar */
.gi-thumb { max-height: 120px; border-radius: 8px; border: 1px solid var(--line); }
.gi-stage { position: relative; display: block; width: 100%; max-width: 820px; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.gi-stage img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); pointer-events: none; }
.gi-stage.pickable { cursor: crosshair; }
.gi-layer { position: absolute; inset: 0; pointer-events: none; }
.gi-pin { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.gi-zone { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 22%, transparent); }
.gi-x { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-weight: 900; line-height: 1; }
.gi-dot { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.gi-dot.ok { background: var(--ok); } .gi-dot.bad { background: var(--bad); }
.gi-num { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-weight: 900; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.gi-num.done { background: var(--n3); } .gi-num.ok { background: var(--ok); } .gi-num.bad { background: var(--bad); }
.gi-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.gi-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gi-list .input { flex: 1; min-width: 120px; }
.gi-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; flex: none; }

/* Memoria */
.mem-info { font-weight: 700; color: var(--muted); }
.mem-info b { color: var(--ink); }
.mem-grid { display: grid; grid-template-columns: repeat(var(--c), minmax(0, 1fr)); gap: 10px; max-width: 640px; }
.mem-card { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 14px; perspective: 600px; background: transparent; font: 800 1rem var(--body); color: var(--ink); }
.mem-card > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .35s; padding: 6px; text-align: center; line-height: 1.15; }
.mem-back { background: var(--accent); color: #fff; font-size: 1.8rem; box-shadow: var(--shadow); }
.mem-face { background: var(--surface); border: 2px solid var(--line); transform: rotateY(180deg); overflow: hidden; }
.mem-face img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mem-card.up .mem-back { transform: rotateY(180deg); }
.mem-card.up .mem-face { transform: rotateY(0); }
.mem-card.got .mem-face { border-color: var(--ok); background: var(--ok-soft); }
.mem-card:disabled { cursor: default; }
@media (max-width: 480px) { .mem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mem-card { font-size: .85rem; } }

/* Sopa de letras */
.ws { display: grid; grid-template-columns: auto minmax(140px, 220px); gap: 16px; align-items: start; }
.ws-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; width: min(100%, calc(var(--n) * 38px)); user-select: none; -webkit-user-select: none; }
.ws-grid button, .ws-grid span { aspect-ratio: 1; border: 0; border-radius: 6px; background: var(--surface-2); font: 800 clamp(.8rem, 3.2vw, 1.1rem) var(--body); color: var(--ink); padding: 0; display: grid; place-items: center; touch-action: manipulation; }
.ws-grid button.first { background: #E07409; color: #fff; }
.ws-grid button.on { background: var(--accent); color: #fff; }
.ws-grid button.miss { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
.ws-grid.mini { width: min(100%, calc(var(--n) * 24px)); }
.ws-grid.mini span { font-size: .72rem; }
.ws-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.ws-words li { padding: 4px 10px; border-radius: 99px; background: var(--surface-2); font-weight: 800; font-size: .85rem; }
.ws-words li.got { background: var(--ok-soft); color: var(--ok); text-decoration: line-through; }
@media (max-width: 640px) { .ws { grid-template-columns: 1fr; } }

/* Crucigrama */
.cw { display: grid; grid-template-columns: auto minmax(200px, 1fr); gap: 18px; align-items: start; }
.cw-grid { display: grid; grid-template-columns: repeat(var(--w), 34px); gap: 2px; max-width: 100%; overflow-x: auto; }
.cw-x { width: 34px; height: 34px; }
.cw-cell { position: relative; width: 34px; height: 34px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 4px; display: grid; place-items: center; }
.cw-cell small { position: absolute; top: 1px; left: 3px; font-size: .58rem; font-weight: 800; color: var(--muted); line-height: 1; }
.cw-cell input { width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font: 800 1.05rem var(--body); text-transform: uppercase; padding: 4px 0 0; color: var(--ink); }
.cw-cell input:focus { outline: none; background: var(--accent-soft); }
.cw-cell b { font-weight: 800; padding-top: 4px; }
.cw-cell.ok { background: var(--ok-soft); } .cw-cell.bad { background: var(--bad-soft); }
.cw-clues ol { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.cw-clues .link { text-align: left; font-weight: 700; text-decoration: none; color: var(--ink); }
@media (max-width: 720px) { .cw { grid-template-columns: 1fr; } .cw-grid { grid-template-columns: repeat(var(--w), 28px); } .cw-x, .cw-cell { width: 28px; height: 28px; } }

/* Dictado con audio y grabadora */
.ad-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.input.is-correct { border-color: var(--ok); background: var(--ok-soft); }
.input.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec audio { height: 36px; max-width: 260px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); display: inline-block; }
.rec-dot.on { animation: recBlink 1s infinite; }
.rec-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--bad); }
@keyframes recBlink { 50% { opacity: .25; } }
@media (max-width: 560px) { .gi-num { min-width: 20px; height: 20px; font-size: .7rem; padding: 0 4px; border-width: 1.5px; } .gi-dot { width: 20px; height: 20px; } }
