/* Jugar y aprender: piezas de juego con los tokens de brain/14_SISTEMA_VISUAL.md §7, bajo #practice-host o con prefijo lp-.
   --game, --game-ink y --game-soft vienen de redesign.css según el modo. */
#practice-host{display:block;min-width:0;color:var(--text);overflow-wrap:anywhere}
#practice-host .practice-studio{position:relative;min-width:0}
#practice-host #play-content{outline:none;min-width:0}
.lp-status{margin:0 0 var(--sp-3);padding:var(--sp-3) var(--sp-4);border-radius:var(--r-1);background:var(--soft-2);color:var(--ink-2);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-status:empty{display:none}
.lp-status.error{background:var(--warn-tint);color:var(--warn)}
.lp-note{margin:var(--sp-2) 0 0;color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-confetti{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:70}
.lp-actions{display:flex;flex-wrap:wrap;gap:var(--sp-3);align-items:center}
#practice-host .btn{min-height:44px}
#practice-host kbd.key-badge{flex:none;min-width:28px;height:28px;padding:0 var(--sp-2);display:inline-grid;place-items:center;border-radius:var(--r-pill);background:var(--soft-2);color:var(--muted);font:var(--fw-semibold) var(--fs-1)/1 var(--font-ui)}

/* Portada (r56; r106: cinco modos, hoja de ronda y tarjeta de la IA). Mazo en una ficha; modos; IA; «Ver mis partidas» */
.lp-heading{margin-bottom:var(--sp-6)}
#practice-host .lp-heading{flex-direction:row;align-items:flex-start}
.lp-heading>:first-child{flex:1}
.lp-context{display:flex;margin:0 0 var(--sp-6)}
.lp-chip{display:flex;align-items:center;gap:var(--sp-3);width:100%;min-height:60px;padding:var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);border:0;border-radius:var(--r-1);background:var(--soft-2);color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:var(--t-ui)}
.lp-context .lp-chip{width:auto;max-width:100%;border:1px solid var(--line);background:var(--panel);box-shadow:var(--sh-1)}
.lp-chip:active{transform:scale(.99)}
.lp-chip-icon{flex:none;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--r-1);background:var(--panel);color:var(--ink-2)}
.lp-context .lp-chip-icon{background:var(--soft-2)}
.lp-chip-text{flex:1;min-width:0;display:grid;gap:2px}
.lp-chip-text strong{font-size:var(--fs-3);line-height:var(--lh-3)}
#practice-host .play-selector-meta{color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-chip-change{flex:none;margin-left:var(--sp-3);color:var(--accent-text);font-weight:var(--fw-semibold);font-size:var(--fs-2)}
.lp-play-icon,.lp-sound-icon,.lp-link-icon{display:inline-flex;flex:none}
#practice-host .lp-sound[aria-pressed="true"]{background:color-mix(in srgb,var(--accent-text) 14%,var(--panel));border-color:color-mix(in srgb,var(--accent-text) 35%,transparent);color:var(--accent-text)}
#practice-host .play-option-row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);min-height:56px;padding:var(--sp-3) 0;border-top:1px solid var(--line);cursor:pointer}
#practice-host .play-option-row>span{min-width:0}
.lp-switch-copy{display:grid;gap:2px}
#practice-host .play-option-row strong{font-size:var(--fs-3);line-height:var(--lh-3)}
#practice-host .play-option-row small{color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
/* Interruptor: el dibujo de .lum-switch sobre una casilla nativa con role="switch" */
.lp-switch{position:relative;flex:none;width:52px;height:32px}
.lp-switch-input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.lp-switch-track{position:absolute;inset:0;border-radius:var(--r-pill);background:var(--switch-off);transition:background-color var(--dur-2) var(--ease-out)}
.lp-switch-thumb{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:var(--sh-2);transition:transform var(--dur-2) var(--ease-out)}
.lp-switch-input:checked+.lp-switch-track{background:var(--switch-on)}
.lp-switch-input:checked+.lp-switch-track>*{transform:translateX(20px)}
.lp-switch-input:focus-visible+.lp-switch-track{outline:2px solid var(--focus-ring);outline-offset:3px}
.lp-switch-input:disabled{cursor:default}.lp-switch-input:disabled+*{opacity:.5}

/* Modos (r106): «Aprender» destacado, con el único botón «Jugar»; los otros cuatro son fichas que se tocan enteras.
   lumi.css trae reglas de la portada de r89 con un nivel más (.app-layout #practice-host): aquí se igualan, y esta hoja entra después. */
.lp-modes-section{margin:0 0 var(--sp-6)}
#practice-host .practice-studio .lp-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-3)}
#practice-host .lp-modes .lp-mode:not([hidden]){position:relative;display:grid;align-content:start;justify-items:start;gap:2px;min-width:0;padding:var(--sp-3) var(--sp-4);transition:var(--t-ui)}
.lp-mode{background:var(--panel);border:1px solid var(--line);border-radius:var(--r-2);box-shadow:var(--sh-1)}
.lp-mode:active{transform:scale(.99)}
#practice-host .mode-glyph{width:44px;height:44px;display:grid;place-items:center;margin-bottom:6px;border-radius:var(--r-1);background:var(--game-soft);color:var(--game-ink)}
#practice-host .lp-modes .lp-mode h3{margin:0;font-size:var(--fs-4);line-height:var(--lh-3);font-weight:var(--fw-bold);letter-spacing:0}
#practice-host .lp-modes .lp-mode p{flex:none;margin:0;color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-ficha-btn{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:inherit;background:none;cursor:pointer}
.lp-ficha-btn:disabled{cursor:default}
.lp-ficha-btn:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
#practice-host .lp-modes .lp-mode.lp-featured{grid-column:1/-1;grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"g t b" "g d b";align-items:center;column-gap:var(--sp-3);border-color:color-mix(in srgb,var(--game) 35%,var(--line));box-shadow:var(--sh-2)}
.lp-featured .mode-glyph{grid-area:g;margin:0}
.lp-featured h3{grid-area:t;align-self:end}
.lp-featured p{grid-area:d;align-self:start}
#practice-host .lp-modes .lp-featured .btn{grid-area:b;width:auto;margin:0;padding-inline:var(--sp-4)}
.lp-mode .btn::after{content:"";position:absolute;inset:0}
.lp-mode .btn:active{transform:none}
@media(min-width:651px){#practice-host .practice-studio .lp-modes{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:901px){
 #practice-host .practice-studio .lp-modes{grid-template-columns:repeat(6,minmax(0,1fr));gap:var(--gap-cards)}
 #practice-host .lp-modes .lp-mode:not([hidden]){padding:var(--sp-4)}
 #practice-host .lp-modes .lp-mode.lp-featured{grid-column:span 2;grid-template-columns:44px minmax(0,1fr);grid-template-areas:"g t" "g d" "b b";row-gap:var(--sp-1)}
 #practice-host .lp-modes .lp-featured .btn{width:100%;margin-top:var(--sp-3)}
}
.lp-link{display:inline-flex;align-items:center;gap:var(--sp-1);min-height:44px;padding:0 var(--sp-1);border:0;border-radius:var(--r-1);background:none;color:var(--accent-text);font:var(--fw-semibold) var(--fs-3)/var(--lh-3) var(--font-ui);cursor:pointer}
.lp-link:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.lp-more-links{display:flex;justify-content:center;margin:0 0 var(--sp-4)}

/* Tus partidas (r106: en una hoja; LumcardsPractice.partidas las da a otras pantallas): filas con el punto del color del modo */
.lp-history{margin:0 0 var(--sp-3)}
.lp-history-table{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-2);background:var(--panel);box-shadow:var(--sh-1)}
.lp-history table{width:100%;border-collapse:collapse;font-size:var(--fs-2);line-height:var(--lh-2);font-variant-numeric:tabular-nums}
.lp-history th{padding:var(--sp-3) var(--sp-4);text-align:left;color:var(--muted);font-size:var(--fs-1);font-weight:var(--fw-semibold);border-bottom:1px solid var(--line)}
.lp-history td{padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--line);vertical-align:top}
.lp-history tr:last-child td{border-bottom:0}
.lp-history td strong{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-3);line-height:var(--lh-3)}
.lp-history td strong::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:var(--game)}
.lp-history-deck{display:block;color:var(--muted);font-size:var(--fs-2)}
.lp-pager{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);margin-top:var(--sp-3);color:var(--muted);font-size:var(--fs-2)}
.lp-pending{margin:0 0 var(--sp-3)}
@media(max-width:650px){
 #practice-host .lp-heading .heading-actions{width:auto}
 #practice-host .lp-heading .lp-sound{flex:none;width:44px;padding:0}
 .lp-heading .lp-sound-text{display:none}
 .lp-context .lp-chip{width:100%}
 .lp-history thead{display:none}
 .lp-history table,.lp-history tbody{display:block}
 .lp-history tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px var(--sp-3);padding:var(--sp-3) var(--sp-4);border-bottom:1px solid var(--line)}
 .lp-history tr:last-child{border-bottom:0}
 .lp-history td{padding:0;border:0}
 .lp-history td:nth-child(1){grid-column:1/-1;color:var(--muted);font-size:var(--fs-1)}
 .lp-history td:nth-child(3),.lp-history td:nth-child(4){grid-column:2;text-align:right}
}

/* Ronda: cabecera con insignia del modo y barra continua; carta grande; opciones de 56 px */
.lp-round{box-sizing:border-box;max-width:760px;min-height:100vh;min-height:100dvh;margin:0 auto;display:flex;flex-direction:column;padding:0 var(--page-x) calc(var(--sp-7) + env(safe-area-inset-bottom))}
.lp-round.has-foot{padding-bottom:calc(260px + env(safe-area-inset-bottom))}
.lp-round-head{position:sticky;top:0;z-index:5;background:var(--bg);padding:max(var(--sp-2),env(safe-area-inset-top)) 0 var(--sp-3)}
.lp-round-bar{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);min-height:48px}
.lp-exit{flex:none;gap:var(--sp-2)}
.lp-round-meta{display:flex;flex:1 1 auto;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:var(--sp-1) var(--sp-3);min-width:0;color:var(--muted);font-size:var(--fs-2);font-weight:var(--fw-semibold)}
.lp-mode-label{display:inline-flex;align-items:center;gap:var(--sp-1);min-height:24px;padding:2px 10px;border-radius:var(--r-pill);background:var(--game-soft);color:var(--game-ink);font-size:var(--fs-1);line-height:var(--lh-1);font-weight:var(--fw-semibold);white-space:nowrap}
.lp-count{color:var(--ink-2);white-space:nowrap;font-variant-numeric:tabular-nums}
.lp-streak{color:var(--ok);white-space:nowrap}
@media(max-width:480px){.lp-streak{display:none}}
.lp-progress{position:relative;height:8px;margin-top:var(--sp-2);border-radius:var(--r-pill);background:var(--soft-2);overflow:hidden}
.lp-progress-fill{position:absolute;inset:0;border-radius:inherit;background:var(--game);transform:translateX(calc(var(--lp-to,0) * 100% - 100%));animation:lp-grow var(--dur-3) var(--ease-out)}
.lp-toast{position:absolute;left:50%;top:calc(100% - var(--sp-1));z-index:6;margin:0;padding:var(--sp-1) var(--sp-3);border-radius:var(--r-pill);background:var(--ok-tint);color:var(--ok);font-size:var(--fs-2);line-height:var(--lh-2);font-weight:var(--fw-semibold);white-space:nowrap;pointer-events:none;opacity:0;transform:translateX(-50%);animation:lp-toast 1.2s var(--ease-out)}
.lp-round-body{flex:1;min-width:0}
.lp-card{margin:var(--sp-3) 0 var(--sp-4);padding:var(--sp-6);min-height:136px;box-sizing:border-box;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-3);box-shadow:var(--sh-2);display:grid;gap:var(--sp-3);align-content:center;justify-items:start}
#practice-host .play-question{margin:0;font:var(--fw-medium) var(--fs-5)/var(--lh-5) var(--font-read);letter-spacing:-.02em;color:var(--ink);outline:none;text-wrap:pretty}
/* Diseño de la tarjeta elegido en el repaso: tema, letra y tamaño también aquí (app.js pone las variables en #practice-host) */
#practice-host[data-diseno] .lp-card{background:var(--lp-carta-fondo);border-color:var(--lp-carta-linea);color:var(--lp-carta-texto);--ink:var(--lp-carta-texto);--muted:var(--lp-carta-tenue)}
#practice-host[data-diseno] .play-question{font-family:var(--lp-carta-letra);font-size:calc(var(--fs-5)*var(--lp-carta-escala))}
@media(min-width:768px){#practice-host[data-diseno] .play-question{font-size:calc(var(--fs-6)*var(--lp-carta-escala))}}
#practice-host .game-card-img{max-width:100%;max-height:260px;border-radius:var(--r-1);object-fit:contain}
#practice-host .game-ipa-badge{color:var(--muted);font-size:var(--fs-2)}
.lp-choice-note{margin:calc(-1 * var(--sp-1)) 0 var(--sp-3)}
.lp-options{display:grid;gap:var(--sp-3);margin:0 0 var(--sp-7)}
#practice-host .play-answer{display:flex;align-items:center;gap:var(--sp-3);width:100%;min-height:56px;padding:var(--sp-3) var(--sp-5);border:2px solid var(--line);border-radius:var(--r-2);background:var(--panel);color:var(--ink);font:var(--fw-medium) var(--fs-4)/var(--lh-4) var(--font-ui);text-align:left;cursor:pointer;transition:var(--t-ui);-webkit-user-select:none;user-select:none;touch-action:manipulation}
.lp-option-text{flex:1;min-width:0}
#practice-host .play-answer:active{transform:scale(.98)}
#practice-host .play-answer:disabled{cursor:default;opacity:1;transform:none}
#practice-host .lp-options.is-answered .play-answer:not(.correct):not(.incorrect):not(.accepted){color:var(--muted)}
#practice-host .play-answer.correct{background:var(--ok-tint);border-color:var(--ok)}
#practice-host .play-answer.incorrect{background:var(--danger-tint);border-color:var(--danger)}
#practice-host .play-answer.accepted{background:var(--info-tint);border-color:var(--info)}
.lp-mark{flex:none;display:inline-flex;align-items:center;gap:var(--sp-1);font-size:var(--fs-1);line-height:var(--lh-1);font-weight:var(--fw-semibold);animation:lp-fade var(--dur-2) var(--ease-out)}
.lp-mark-icon{display:inline-flex}
.lp-mark-correct{color:var(--ok)}
.lp-mark-incorrect{color:var(--danger)}
.lp-mark-accepted{color:var(--info)}
#practice-host .tf-statement{margin:0 0 var(--sp-4);padding:var(--sp-4) var(--sp-5);border-radius:var(--r-2);background:var(--game-soft);text-align:center}
#practice-host .tf-label{color:var(--game-ink);font-size:var(--fs-2);font-weight:var(--fw-semibold)}
#practice-host .tf-shown{margin:var(--sp-1) 0 0;font:var(--fw-medium) var(--fs-5)/var(--lh-5) var(--font-read);color:var(--ink)}
#practice-host .tf-options{grid-template-columns:1fr 1fr}
#practice-host .tf-choice{flex-direction:column;justify-content:center;gap:var(--sp-1);min-height:64px;font-weight:var(--fw-semibold)}
#practice-host .tf-choice .lp-option-text{flex:none}
.lp-write{display:grid;gap:var(--sp-3)}
#practice-host .play-written{box-sizing:border-box;width:100%;min-height:120px;padding:var(--sp-3) var(--sp-4);border:1px solid var(--line-strong);border-radius:var(--r-1);background:var(--panel);color:var(--ink);font:var(--fw-regular) var(--fs-3)/var(--lh-3) var(--font-ui);resize:vertical}
#practice-host .play-written:focus-visible{outline:2px solid var(--game);outline-offset:2px}
#practice-host .hint-bar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-3)}
#practice-host .play-check{display:flex;align-items:center;gap:var(--sp-3);min-height:44px;color:var(--ink-2);font-size:var(--fs-2);line-height:var(--lh-2)}
@media(max-width:650px){.lp-write .lp-actions .btn-primary{flex:1 1 100%}}
.lp-round-foot{position:fixed;left:0;right:0;bottom:0;z-index:40;box-sizing:border-box;max-width:760px;margin:0 auto;padding:var(--sp-4) var(--page-x) calc(var(--sp-4) + env(safe-area-inset-bottom));background:var(--panel);border:1px solid var(--line);border-bottom:0;border-radius:var(--r-3) var(--r-3) 0 0;box-shadow:var(--sh-3)}
.lp-round-foot-inner{display:grid;gap:var(--sp-3);max-height:52vh;overflow:auto}
.lp-next{width:100%;min-height:48px}
#practice-host .play-feedback{display:grid;gap:var(--sp-1);padding:var(--sp-4) var(--sp-5);border:1px solid var(--line);border-radius:var(--r-2);background:var(--soft-2)}
.lp-feedback-head{display:flex;align-items:center;gap:var(--sp-2)}
.lp-feedback-icon{display:inline-flex;flex:none}
#practice-host .play-feedback strong{font-size:var(--fs-4);line-height:var(--lh-4)}
#practice-host .play-feedback p{margin:0;font-size:var(--fs-3);line-height:var(--lh-3)}
#practice-host .play-feedback.is-correct{background:var(--ok-tint);border-color:color-mix(in srgb,var(--ok) 35%,var(--line))}
#practice-host .play-feedback.is-wrong{background:var(--warn-tint);border-color:color-mix(in srgb,var(--warn) 30%,var(--line))}
#practice-host .is-correct .lp-feedback-head{color:var(--ok)}
#practice-host .is-wrong .lp-feedback-head{color:var(--warn)}
#practice-host .play-feedback .btn{justify-self:start;margin-top:var(--sp-1)}
#practice-host .game-example-box{margin:var(--sp-1) 0 0;color:var(--ink-2);font-style:italic}
#practice-host .game-audio-pill{min-width:44px;padding:0 var(--sp-3)}
@media(min-width:768px){
 .lp-card{padding:var(--sp-7);min-height:176px}
 #practice-host .play-question{font-size:var(--fs-6);line-height:var(--lh-6);letter-spacing:-.025em}
}
@media(min-width:768px) and (max-height:800px){.lp-card{padding:var(--sp-6);min-height:0}}

/* Ayuda de la primera vez en cada modo (se cierra con «Entendido») y foco visible con el color del modo */
#practice-host .lp-help{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--sp-2) var(--sp-3);padding:var(--sp-3) var(--sp-3) var(--sp-4) var(--sp-5);border-radius:var(--r-2);background:var(--game-soft);color:var(--ink);outline:none}
#practice-host .lp-help>p{grid-column:1/-1;padding-right:var(--sp-2)}
.lp-round-body>.lp-help{margin-top:var(--sp-3)}
.lp-help-head{display:flex;align-items:center;gap:var(--sp-2);color:var(--game-ink)}
.lp-help-icon{display:inline-flex;flex:none}
#practice-host .lp-help h2{margin:0;font-size:var(--fs-4);line-height:var(--lh-4);font-weight:var(--fw-bold);letter-spacing:0;color:inherit}
#practice-host .lp-help p{margin:0;font-size:var(--fs-3);line-height:var(--lh-3)}
#practice-host .lp-help .lp-help-keys{color:var(--ink-2);font-size:var(--fs-2);line-height:var(--lh-2)}
#practice-host .lp-help .btn{grid-row:1;grid-column:2}
@media(pointer:coarse){.lp-help-keys{display:none}}
.lp-round :focus-visible{outline-color:var(--game-ink)}
.lp-mode:has(.btn:focus-visible){outline:2px solid var(--focus-ring);outline-offset:2px}


/* Emparejar */
.lp-match-bar{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);flex-wrap:wrap;margin:var(--sp-2) 0 var(--sp-3)}
.lp-match-bar .lp-note{margin:0}
.lp-match-meta{display:flex;align-items:center;gap:var(--sp-2);font-size:var(--fs-2);font-weight:var(--fw-semibold)}
#practice-host .play-timer-badge{display:inline-flex;align-items:center;min-height:24px;padding:2px 10px;border-radius:var(--r-pill);background:var(--game-soft);color:var(--game-ink);font-variant-numeric:tabular-nums}
#practice-host .play-record-badge{color:var(--muted);font-weight:var(--fw-medium)}
#practice-host .match-grid-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:var(--sp-3)}
#practice-host .match-grid-tile{position:relative;min-height:112px;padding:var(--sp-3) var(--sp-4);display:grid;place-items:center;gap:var(--sp-2);border:2px solid var(--line);border-radius:var(--r-2);background:var(--panel);color:var(--ink);font:var(--fw-medium) var(--fs-3)/var(--lh-3) var(--font-ui);text-align:center;overflow-wrap:anywhere;cursor:pointer;transition:var(--t-ui);-webkit-user-select:none;user-select:none;touch-action:manipulation}
#practice-host .match-grid-tile:active{transform:scale(.98)}
#practice-host .match-grid-tile img{max-width:100%;max-height:90px;object-fit:contain;border-radius:var(--r-1)}
#practice-host .match-grid-tile.selected{border-color:var(--game);background:var(--game-soft)}
#practice-host .match-grid-tile.matched{border-color:transparent;background:var(--ok-tint);color:var(--ok);cursor:default}
#practice-host .match-grid-tile.wrong{border-color:var(--danger);background:var(--danger-tint)}
.lp-tile-mark{position:absolute;top:var(--sp-2);right:var(--sp-2);display:inline-flex;color:var(--ok)}
#practice-host .wrong .lp-tile-mark{color:var(--danger)}
@media(max-width:650px){#practice-host .match-grid-container{grid-template-columns:repeat(2,minmax(0,1fr))}#practice-host .match-grid-tile{min-height:96px;font-size:var(--fs-2);line-height:var(--lh-2)}}

/* Simulacro */
#practice-host .test-suite{display:grid;gap:var(--gap-cards);margin-top:var(--sp-3)}
#practice-host .test-card{padding:var(--pad-card);background:var(--panel);border:1px solid var(--line);border-radius:var(--r-2);box-shadow:var(--sh-1);min-width:0}
#practice-host .test-card-header{display:flex;justify-content:space-between;align-items:center;gap:var(--sp-3);color:var(--muted);font-size:var(--fs-1);line-height:var(--lh-1);font-weight:var(--fw-semibold)}
#practice-host .test-card-prompt{margin:var(--sp-3) 0 var(--sp-4);font:var(--fw-medium) var(--fs-4)/var(--lh-4) var(--font-read);color:var(--ink)}
#practice-host .test-choice-grid,#practice-host .test-tf-options{display:grid;gap:var(--sp-2)}
#practice-host .test-tf-options{grid-template-columns:1fr 1fr}
#practice-host .test-choice-grid .btn,#practice-host .test-tf-options .btn{width:100%;height:auto;min-height:48px;padding:var(--sp-2) var(--sp-4);justify-content:flex-start;gap:var(--sp-3);border:2px solid var(--line);background:var(--panel);color:var(--ink);text-align:left;white-space:normal;overflow-wrap:anywhere;word-break:break-word;font-weight:var(--fw-medium)}
#practice-host .test-tf-options .btn{justify-content:center}
#practice-host .test-choice-grid .btn[aria-pressed="true"],#practice-host .test-tf-options .btn[aria-pressed="true"]{border-color:var(--game);background:var(--game-soft);font-weight:var(--fw-semibold)}
.lp-test-num{flex:none;width:28px;height:28px;display:inline-grid;place-items:center;border-radius:50%;background:var(--soft-2);color:var(--ink-2);font-size:var(--fs-1);font-weight:var(--fw-semibold)}
#practice-host [aria-pressed="true"]>.lp-test-num{background:var(--game);color:var(--on-accent)}
#practice-host .test-input-field{box-sizing:border-box;width:100%;min-height:48px;padding:var(--sp-2) var(--sp-4);border:1px solid var(--line-strong);border-radius:var(--r-1);background:var(--panel);color:var(--ink);font:inherit;font-size:var(--fs-3)}
#practice-host .test-statement{margin:0 0 var(--sp-3)}
.lp-review-title{margin:var(--sp-3) 0 var(--sp-1);font-size:var(--fs-5);line-height:var(--lh-5)}
@media(min-width:768px){#practice-host .test-card-prompt{font-size:var(--fs-5);line-height:var(--lh-5)}}

/* Resultado: puntaje, frase, tres datos, qué hacer después y lo que fallaste */
.lp-result{box-sizing:border-box;max-width:640px;margin:0 auto;padding:max(var(--sp-6),env(safe-area-inset-top)) var(--page-x) calc(var(--sp-7) + env(safe-area-inset-bottom))}
.lp-result-card{display:grid;gap:var(--sp-3);justify-items:center;text-align:center;padding:var(--sp-6);border-radius:var(--r-3);box-shadow:var(--sh-2)}
.lp-result-card h1{margin:0;font-size:var(--fs-5);line-height:var(--lh-5);letter-spacing:-.02em;outline:none}
.lp-score{font:var(--fw-bold) var(--fs-7)/var(--lh-7) var(--font-ui);letter-spacing:-.025em;color:var(--game-ink);font-variant-numeric:tabular-nums}
.lp-score.is-pop{animation:lp-score var(--dur-4) var(--ease-out)}
.lp-result-context{margin:0;color:var(--muted);font-size:var(--fs-2)}
.lp-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-2);width:100%;margin:var(--sp-2) 0}
.lp-stats>div{display:grid;gap:2px;padding:var(--sp-3) var(--sp-2);border-radius:var(--r-1);background:var(--soft-2)}
.lp-stats span{color:var(--muted);font-size:var(--fs-1);line-height:var(--lh-1)}
.lp-stats strong{font-size:var(--fs-4);line-height:var(--lh-4);font-variant-numeric:tabular-nums}
.lp-record{color:var(--ok)!important;font-weight:var(--fw-semibold)!important}
.lp-saved{display:inline-flex;align-items:center;gap:var(--sp-1);margin:0}
.lp-saved-icon{display:inline-flex;color:var(--ok)}
.lp-result-card .lp-actions{justify-content:center;margin-top:var(--sp-2)}
.lp-mistakes{margin-top:var(--sp-7);display:grid;gap:var(--sp-3)}
.lp-mistake-list{border:1px solid var(--line);border-radius:var(--r-2);background:var(--panel);box-shadow:var(--sh-1)}
#practice-host .play-mistake{display:grid;gap:var(--sp-1);padding:var(--sp-4) var(--sp-5);border-bottom:1px solid var(--line)}
#practice-host .play-mistake:last-child{border-bottom:0}
#practice-host .play-mistake>strong{font:var(--fw-medium) var(--fs-4)/var(--lh-4) var(--font-read)}
#practice-host .play-mistake p{margin:0;display:flex;align-items:flex-start;gap:var(--sp-2);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-mistake-mark{display:inline-flex;flex:none}
.lp-mistake-ok .lp-mistake-mark{color:var(--ok)}
.lp-mistake-no .lp-mistake-mark{color:var(--danger)}
@media(min-width:768px){.lp-result-card{padding:var(--sp-7)}}

/* Ventanas */
.lp-dialog .lp-actions{justify-content:flex-end}
#practice-host .deck-explorer-modal{max-width:620px}
#practice-host .explorer-search-input{box-sizing:border-box;width:100%;min-height:44px;padding:var(--sp-2) var(--sp-4);border:1px solid var(--line-strong);border-radius:var(--r-1);background:var(--panel);color:var(--text);font:inherit;font-size:var(--fs-3)}
#practice-host .explorer-nav-bar{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);margin:var(--sp-3) 0 var(--sp-2)}
#practice-host .explorer-breadcrumbs{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2);font-size:var(--fs-2)}
#practice-host .explorer-crumb-current{font-weight:var(--fw-semibold)}
#practice-host .explorer-crumb-sep{color:var(--muted)}
#practice-host .explorer-folder-hero{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);flex-wrap:wrap;margin:var(--sp-2) 0;padding:var(--sp-3) var(--sp-4);border-radius:var(--r-1);background:var(--soft-2)}
#practice-host .explorer-folder-hero-info{display:grid;gap:2px}
#practice-host .explorer-folder-hero-info span,#practice-host .explorer-row-path,#practice-host .explorer-tag-count{color:var(--muted);font-size:var(--fs-2)}
#practice-host .explorer-section-title{margin:var(--sp-4) 0 var(--sp-2);color:var(--muted);font-size:var(--fs-2);font-weight:var(--fw-semibold)}
#practice-host .explorer-list{display:grid;gap:var(--sp-2)}
#practice-host .explorer-row{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);min-height:56px;padding:var(--sp-2) var(--sp-3);border:1px solid var(--line);border-radius:var(--r-1);background:var(--panel)}
#practice-host .explorer-row.active-selection{border-color:var(--accent-text);background:color-mix(in srgb,var(--accent-text) 10%,var(--panel))}
#practice-host .explorer-row-lead{display:flex;align-items:center;gap:var(--sp-3);min-width:0;cursor:pointer}
#practice-host .explorer-row-icon{flex:none;color:var(--ink-2)}
#practice-host .explorer-row-texts{min-width:0}
#practice-host .explorer-row-name{font-weight:var(--fw-semibold)}
#practice-host .explorer-row-actions{display:flex;align-items:center;gap:var(--sp-2);flex:none}
#practice-host .explorer-empty-msg{color:var(--muted)}
@media(max-width:650px){#practice-host .explorer-row{flex-wrap:wrap}#practice-host .explorer-row-actions{width:100%;justify-content:flex-end}}

/* Movimiento (nota 14 §6-7): breve y sin bucles; hover solo con ratón; con «reducir movimiento», solo fundidos */
.lp-card.is-new,.lp-options.is-new{animation:lp-enter var(--dur-2) var(--ease-out) backwards}
.lp-options.is-new{animation-delay:40ms}
.lp-round-foot.is-new{animation:lp-rise var(--dur-3) var(--ease-out)}
#practice-host .play-answer.is-pop,#practice-host .match-grid-tile.is-pop{animation:lp-pop var(--dur-3) var(--ease-spring)}
#practice-host .match-grid-tile.is-shake{animation:lp-shake var(--dur-3) var(--ease-out)}
@keyframes lp-enter{from{opacity:0;transform:translateY(6px)}}
@keyframes lp-rise{from{opacity:0;transform:translateY(16px)}}
@keyframes lp-pop{50%{transform:scale(1.02)}}
@keyframes lp-shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@keyframes lp-fade{from{opacity:0}}
@keyframes lp-grow{from{transform:translateX(calc(var(--lp-from,0) * 100% - 100%))}}
@keyframes lp-score{from{opacity:0;transform:scale(.96)}}
@keyframes lp-toast{0%{opacity:0;transform:translate(-50%,-4px)}15%{opacity:1;transform:translate(-50%,0)}80%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,0)}}
@media(hover:hover) and (pointer:fine){
 #practice-host .play-answer:not(:disabled):hover,#practice-host .match-grid-tile:not(:disabled):hover,#practice-host .test-choice-grid .btn:hover,#practice-host .test-tf-options .btn:hover{border-color:var(--game)}
 .lp-chip:hover{background:color-mix(in srgb,var(--ink) 6%,var(--soft-2))}
 .lp-context .lp-chip:hover,.lp-mode:hover{border-color:var(--line-strong);box-shadow:var(--sh-2)}
 .lp-featured:hover{border-color:color-mix(in srgb,var(--game) 60%,var(--line))}
 #practice-host .explorer-row:hover{border-color:var(--line-strong)}
}
@media(max-width:360px){
 #practice-host .lp-modes .lp-mode h3{font-size:var(--fs-3);line-height:var(--lh-3)}
 /* A 320 px el botón de Aprender baja a su propia fila: al lado no dejaba sitio para el título */
 #practice-host .lp-modes .lp-mode.lp-featured{grid-template-columns:44px minmax(0,1fr);grid-template-areas:"g t" "g d" "b b"}
 #practice-host .lp-modes .lp-featured .btn{width:100%;margin-top:var(--sp-2)}
 .lp-chip-icon{display:none}
}
@media(pointer:coarse){#practice-host kbd.key-badge{display:none}}
@media(prefers-reduced-motion:reduce){
 .lp-confetti{display:none}
 #practice-host .play-answer,#practice-host .match-grid-tile,.lp-mode,.lp-chip,.lp-switch-track,.lp-switch-thumb{transition:none}
 #practice-host .play-answer:active,#practice-host .match-grid-tile:active,.lp-mode:active,.lp-chip:active{transform:none}
 .lp-card.is-new,.lp-options.is-new,.lp-round-foot.is-new,.lp-progress-fill,.lp-score.is-pop,#practice-host .is-pop,#practice-host .is-shake,.lp-sheet[open]{animation-name:lp-fade}
 .lp-toast{display:none}
}

/* r106: hojas de la portada (la de la ronda y «Tus partidas»). En el celular suben desde abajo; en pantallas anchas van al centro */
.lp-sheet{box-sizing:border-box;max-width:480px;padding:var(--sp-5) var(--sp-5) var(--sp-6)}
.lp-sheet-grip{display:none;width:40px;height:4px;margin:0 auto var(--sp-3);border-radius:var(--r-pill);background:var(--line-strong)}
.lp-sheet-head{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--sp-4)}
.lp-sheet-head>div{flex:1;min-width:0}
.lp-sheet-icon{flex:none;display:inline-flex}
.lp-sheet-icon .ic3d{width:44px;height:44px}
.lp-sheet-head h2{margin:0;font-size:var(--fs-5);line-height:var(--lh-5);font-weight:var(--fw-bold);letter-spacing:-.02em}
.lp-sheet-head p{margin:2px 0 0;color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-trio{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:var(--sp-2)}
.lp-dato{position:relative;display:block;min-height:60px;border:1px solid var(--line-strong);border-radius:var(--r-1);background:var(--soft-2)}
.lp-dato>span{position:absolute;left:var(--sp-3);top:var(--sp-2);color:var(--muted);font-size:var(--fs-1);line-height:var(--lh-1);pointer-events:none}
.lp-dato::after{content:"";position:absolute;right:var(--sp-3);top:12px;width:6px;height:6px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);pointer-events:none}
#practice-host .lp-dato select{position:absolute;inset:0;box-sizing:border-box;width:100%;height:100%;margin:0;padding:26px var(--sp-2) var(--sp-2) var(--sp-3);border:0;border-radius:inherit;background:none;color:var(--text);font:var(--fw-semibold) var(--fs-3)/var(--lh-3) var(--font-ui);-webkit-appearance:none;appearance:none;cursor:pointer}
#practice-host .lp-dato select:focus{outline:none}
.lp-dato:focus-within{outline:2px solid var(--focus-ring);outline-offset:2px}
.lp-sheet>.lp-switch-row{margin-top:var(--sp-2)}
#practice-host .lp-sheet .lp-switch-row{border-top:0}
.lp-more{margin-top:var(--sp-2);border-top:1px solid var(--line)}
.lp-more>summary{display:flex;align-items:center;justify-content:space-between;min-height:52px;font-size:var(--fs-3);font-weight:var(--fw-semibold);cursor:pointer;list-style:none}
.lp-more>summary::-webkit-details-marker{display:none}
.lp-more>summary::after{content:"";width:8px;height:8px;margin-right:var(--sp-1);border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform var(--dur-2) var(--ease-out)}
.lp-more[open]>summary::after{transform:rotate(-135deg)}
.lp-sheet-go{width:100%;min-height:52px;margin-top:var(--sp-4)}
@keyframes lp-sheet-in{from{opacity:0;transform:translateY(32px)}}
@media(max-width:650px){
 .lp-sheet{width:100%;max-width:100%;max-height:92dvh;margin:auto 0 0;padding:var(--sp-3) var(--sp-5) calc(var(--sp-5) + env(safe-area-inset-bottom));border-bottom:0;border-radius:var(--r-3) var(--r-3) 0 0}
 .lp-sheet-grip{display:block}
 .lp-sheet[open]{animation:lp-sheet-in var(--dur-3) var(--ease-out)}
}

/* r106: tarjeta «Alternativas con IA» de la portada y su ventana (el texto de privacidad sale al activar) */
.lp-ai{display:grid;gap:var(--sp-3);margin:0 0 var(--sp-4);padding:var(--sp-4);background:var(--panel);border:1px solid var(--line);border-radius:var(--r-2);box-shadow:var(--sh-1)}
.lp-ai-head{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:var(--sp-3)}
.lp-ai-icon{display:inline-flex;color:var(--accent-text)}
.lp-ai-icon .ic3d{width:40px;height:40px}
.lp-ai-head h2{margin:0;font-size:var(--fs-4);line-height:var(--lh-3);font-weight:var(--fw-bold);letter-spacing:0}
.lp-ai-head p{margin:2px 0 0;color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-ai-body{display:grid;gap:var(--sp-2)}
.lp-ai-bar{height:8px;border-radius:var(--r-pill);background:var(--soft-2);overflow:hidden}
.lp-ai-bar>i{display:block;height:100%;border-radius:inherit;background:var(--accent-button,var(--game))}
.lp-ai-bar.has-ready>i{min-width:8px}
.lp-ai-line{margin:0;color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-ai-count strong,.lp-ai-note{color:var(--text)}
.lp-ai-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2) var(--sp-3)}
.lp-ai-progress{font-size:var(--fs-2);line-height:var(--lh-2)}
.lp-ai-dialog{max-width:480px}
.lp-ai-consent{margin:0 0 var(--sp-4);color:var(--text);font-size:var(--fs-3);line-height:var(--lh-3)}
.lp-ai-warning{margin:0;padding:var(--sp-3) var(--sp-4);border-radius:var(--r-1);background:var(--soft-2);color:var(--muted);font-size:var(--fs-2);line-height:var(--lh-2)}

/* r104: cronómetro de la ronda (reloj, límite por pregunta, pausa que tapa la pregunta) y tiempo por pregunta en el ajuste. */
.lp-clock,.lp-limit{flex:none;white-space:nowrap}
.lp-limit{background:var(--soft-2);color:var(--ink)}
.lp-limit.is-low{background:var(--danger-tint);color:var(--danger)}
.lp-pause{flex:none}
.lp-paused{display:grid;justify-items:center;gap:var(--sp-3);padding:var(--sp-6) var(--sp-4);text-align:center}
.lp-paused h2{margin:0;font-size:var(--fs-5)}
.lp-paused p{margin:0;max-width:34rem;color:var(--muted)}
.lp-paused .btn{min-width:12rem;min-height:48px}
.lp-history-avg,.lp-stats .lp-stat-avg{display:block;color:var(--muted);font-size:var(--fs-1);line-height:var(--lh-1);font-weight:400}
@media (max-width:480px){.lp-pause{padding-inline:var(--sp-2)}}
