/* ==========================================================
   VOCABULARIO — interfaz específica del módulo
   Reutiliza los tokens y componentes globales de COQ.
   ========================================================== */
.vocabulary-workspace{position:relative;z-index:2;margin-top:-1rem;margin-bottom:5rem;overflow:hidden;border:1px solid rgba(7,26,61,.08);border-radius:var(--radius-lg);background:rgba(255,255,255,.96);box-shadow:0 24px 70px rgba(7,26,61,.12)}
.vocabulary-search-area{padding:1.2rem clamp(1rem,3vw,2rem);border-bottom:1px solid var(--color-line);background:#f2f6fc}
.vocabulary-search{display:flex;align-items:center;gap:.7rem;min-height:3.3rem;padding:.4rem .5rem .4rem 1rem;border:1px solid rgba(7,26,61,.16);border-radius:13px;background:#fff;transition:border-color var(--duration-fast),box-shadow var(--duration-fast)}
.vocabulary-search:focus-within{border-color:var(--color-blue);box-shadow:0 0 0 4px rgba(7,91,232,.1)}
.vocabulary-search>span{color:var(--color-blue);font-size:1.4rem}
.vocabulary-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--color-ink);font:inherit;font-size:.95rem}
.vocabulary-search input:focus{outline:0}
.vocabulary-search button{border:0;background:transparent;color:var(--color-muted);font-size:1.35rem;cursor:pointer}
.vocabulary-search-meta{display:flex;justify-content:space-between;gap:1rem;margin-top:.6rem;color:var(--color-muted);font-size:.78rem}
.vocabulary-layout{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:410px}
.vocabulary-sidebar{padding:1.25rem .9rem;border-right:1px solid var(--color-line);background:rgba(250,248,242,.42)}
.vocabulary-sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:0 .4rem .8rem}
.vocabulary-sidebar-heading h2{margin:0;font-size:1rem}
.vocabulary-sidebar-heading span{color:var(--color-muted);font-size:.75rem}
.vocabulary-category-list{display:grid;gap:.35rem}
.vocabulary-category{display:flex;align-items:center;gap:.7rem;width:100%;padding:.72rem .75rem;border:1px solid transparent;border-radius:11px;background:transparent;color:var(--color-ink-soft);text-align:left;cursor:pointer;font-size:.9rem;font-weight:650}
.vocabulary-category:hover{border-color:var(--color-line);background:#fff}
.vocabulary-category.is-active{border-color:rgba(7,91,232,.22);background:var(--color-blue-pale);color:var(--color-blue);font-weight:800}
.vocabulary-category-code{display:grid;place-items:center;flex:0 0 1.8rem;height:1.8rem;border:1px solid var(--color-line);border-radius:8px;background:white;font-size:.68rem;font-weight:850}
.vocabulary-category.is-active .vocabulary-category-code{border-color:var(--color-blue);background:var(--color-blue);color:white}
/* Jerarquía visual: azul COQ para categorías y coral/naranja para subcategorías */
.vocabulary-category{
  border-color:rgba(7,91,232,.08);
  background:#f0f5fc;
  color:#183b70;
  transition:background var(--duration-fast),border-color var(--duration-fast),color var(--duration-fast),transform var(--duration-fast);
}
.vocabulary-category:hover{
  border-color:rgba(7,91,232,.24);
  background:#e5efff;
}
.vocabulary-category.is-active{
  border-color:#075be8;
  background:#075be8;
  color:#fff;
  box-shadow:0 4px 12px rgba(7,91,232,.16);
}
.vocabulary-category-code{
  border-color:rgba(7,91,232,.12);
  background:rgba(255,255,255,.9);
  color:#075be8;
}
.vocabulary-category.is-active .vocabulary-category-code{
  border-color:rgba(255,255,255,.45);
  background:#fff;
  color:#075be8;
}
.vocabulary-content{min-width:0;padding:clamp(1.2rem,3vw,2rem)}
.vocabulary-breadcrumb{display:flex;flex-wrap:wrap;gap:.45rem;margin-bottom:1rem;color:var(--color-muted);font-size:.78rem}
.vocabulary-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.2rem}
.vocabulary-heading h2{margin:0;font-size:clamp(1.5rem,3vw,2.1rem)}
.vocabulary-heading p{margin:.45rem 0 0;font-size:.9rem}
.vocabulary-count{flex-shrink:0;padding:.3rem .65rem;border:1px solid var(--color-line);border-radius:var(--radius-pill);background:white;color:var(--color-muted);font-size:.75rem;font-weight:750}
.vocabulary-subcategories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin-bottom:1.5rem}
.vocabulary-subcategory{display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:3.25rem;padding:.75rem .9rem;border:1px solid #f5d5c7;border-radius:12px;background:#fff7f2;color:#733b2b;text-align:left;cursor:pointer;font-size:.88rem;font-weight:700;transition:background var(--duration-fast),border-color var(--duration-fast),box-shadow var(--duration-fast),transform var(--duration-fast)}
.vocabulary-subcategory:hover{border-color:#ff8a65;background:#fff0e8;box-shadow:0 4px 12px rgba(255,91,54,.08)}
.vocabulary-subcategory.is-active{border-color:#ff5b36;background:#fff0e8;color:#c53d22;box-shadow:inset 3px 0 0 #ff5b36}
.vocabulary-section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:.7rem 0 .8rem}
.vocabulary-section-heading h3{margin:0;font-size:1rem}
.vocabulary-section-heading span{color:var(--color-muted);font-size:.78rem}
.vocabulary-word-list{display:grid;gap:.65rem}
.vocabulary-word-entry{display:grid;gap:.5rem;min-width:0}
.vocabulary-word{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.7rem;padding:.8rem .9rem;border:1px solid var(--color-line);border-radius:12px;background:white;transition:border-color var(--duration-fast),box-shadow var(--duration-fast)}
.vocabulary-word:hover{border-color:rgba(7,91,232,.24);box-shadow:0 5px 18px rgba(7,26,61,.04)}
.vocabulary-word[data-word-card]{cursor:pointer;outline:none}
.vocabulary-word[data-word-card]:focus-visible{border-color:var(--color-blue);box-shadow:0 0 0 3px rgba(7,91,232,.18)}
.vocabulary-word[data-word-card].is-expanded{border-color:rgba(7,91,232,.38);background:#f8fbff}
.vocabulary-expand-indicator{display:grid;place-items:center;flex:0 0 2.15rem;height:2.15rem;border:1px solid rgba(7,91,232,.18);border-radius:9px;background:#f0f5fc;color:var(--color-blue);font-size:1.35rem;font-weight:650;line-height:1;transition:background var(--duration-fast),color var(--duration-fast)}
.vocabulary-word[data-word-card].is-expanded .vocabulary-expand-indicator{border-color:var(--color-blue);background:var(--color-blue);color:#fff}
.vocabulary-word-main{display:flex;align-items:center;gap:.8rem;min-width:0}
.vocabulary-word-initial{display:grid;place-items:center;flex:0 0 2.45rem;height:2.45rem;border-radius:10px;background:#f0f5fc;color:var(--color-blue);font-weight:850}
.vocabulary-word-text{min-width:0}
.vocabulary-word-french{overflow-wrap:anywhere;font-weight:800}
.vocabulary-word-spanish{color:var(--color-muted);font-size:.84rem}
.vocabulary-word-actions{display:flex;align-items:center;gap:.5rem}
.vocabulary-detail{margin-top:1rem;padding:1rem;border:1px solid rgba(7,91,232,.18);border-radius:14px;background:linear-gradient(135deg,#fff 0%,#f5f8ff 100%)}
.vocabulary-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.vocabulary-detail h3{margin:.45rem 0;font-size:1.25rem}
.vocabulary-detail p{margin:0}
.vocabulary-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin-top:1rem}
.vocabulary-detail-cell{padding:.7rem;border:1px solid var(--color-line);border-radius:9px;background:white}
.vocabulary-detail-cell span{display:block;color:var(--color-muted);font-size:.74rem}
.vocabulary-detail-cell strong{font-size:.88rem;overflow-wrap:anywhere}
.vocabulary-empty{padding:2rem 1rem;border:1px dashed rgba(7,26,61,.2);border-radius:12px;text-align:center}
.vocabulary-empty h3{margin-bottom:.5rem}
.vocabulary-empty p{margin:0;font-size:.9rem}
.vocabulary-note{margin:.8rem 0 0;font-size:.76rem}
@media(max-width:820px){.vocabulary-layout{grid-template-columns:205px minmax(0,1fr)}.vocabulary-sidebar{padding:1rem .6rem}.vocabulary-category{padding:.6rem .5rem;font-size:.82rem}.vocabulary-content{padding:1rem}}
@media(max-width:600px){.vocabulary-layout{grid-template-columns:1fr}.vocabulary-sidebar{border-right:0;border-bottom:1px solid var(--color-line);padding:.8rem}.vocabulary-category-list{display:flex;overflow-x:auto;padding-bottom:.2rem}.vocabulary-category{flex:0 0 auto;width:auto;white-space:nowrap}.vocabulary-category-code{display:none}.vocabulary-content{padding:1rem}.vocabulary-subcategories{grid-template-columns:1fr}.vocabulary-detail-grid{grid-template-columns:1fr}.vocabulary-search-meta,.vocabulary-heading{flex-direction:column;gap:.25rem}.vocabulary-word{padding:.7rem}.vocabulary-count{align-self:flex-start}}


/* Pestañas de aprendizaje y práctica */
.vocabulary-mode-tabs{display:flex;gap:.45rem;padding:.8rem clamp(1rem,3vw,2rem);border-bottom:1px solid var(--color-line);background:#fff}
.vocabulary-mode-tab{min-height:2.65rem;padding:.65rem 1rem;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--color-muted);font:inherit;font-size:.88rem;font-weight:750;cursor:pointer}
.vocabulary-mode-tab:hover{background:#f2f6fc;color:var(--color-blue)}
.vocabulary-mode-tab.is-active{border-color:#075be8;background:#075be8;color:#fff}
.vocabulary-practice-panel{min-width:0;padding:clamp(1.2rem,3vw,2rem)}
.vocabulary-practice-panel[hidden],.vocabulary-layout[hidden],.vocabulary-search-area[hidden]{display:none!important}
.vocabulary-practice-selectors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1.3rem 0 2rem;padding:1rem;border:1px solid var(--color-line);border-radius:14px;background:#f8faff}
.vocabulary-practice-field{display:grid;gap:.45rem;color:var(--color-ink-soft);font-size:.82rem;font-weight:750}
.vocabulary-practice-field select,.vocabulary-answer-field input{width:100%;min-height:2.9rem;padding:.65rem .75rem;border:1px solid rgba(7,26,61,.18);border-radius:9px;background:#fff;color:var(--color-ink);font:inherit;font-weight:500}
.vocabulary-practice-field select:focus,.vocabulary-answer-field input:focus{outline:3px solid rgba(7,91,232,.16);border-color:var(--color-blue)}
.vocabulary-practice-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.8rem}
.vocabulary-practice-section-title h3{margin:0;font-size:1.05rem}
.vocabulary-practice-section-title p,.vocabulary-practice-note{margin:0;color:var(--color-muted);font-size:.8rem}
.vocabulary-exercise-options{display:grid;gap:.7rem}
.vocabulary-exercise-option{display:grid;grid-template-columns:3rem minmax(0,1fr) auto;align-items:center;gap:1rem;width:100%;padding:1rem;border:1px solid var(--color-line);border-radius:13px;background:#fff;text-align:left;cursor:pointer;transition:border-color var(--duration-fast),background var(--duration-fast),transform var(--duration-fast)}
.vocabulary-exercise-option:hover{transform:translateY(-1px);border-color:rgba(7,91,232,.4);background:#f8fbff}
.vocabulary-exercise-number{display:grid;place-items:center;width:2.8rem;height:2.8rem;border-radius:10px;background:#edf4ff;color:#075be8;font-weight:850}
.vocabulary-exercise-copy{display:grid;gap:.3rem}
.vocabulary-exercise-copy strong{font-size:.95rem}
.vocabulary-exercise-copy small{color:var(--color-muted);font-size:.82rem;line-height:1.5}
.vocabulary-exercise-arrow{color:#075be8;font-size:1.3rem}
.vocabulary-practice-note{margin-top:1rem;line-height:1.6}
.vocabulary-text-button{padding:0;border:0;background:none;color:var(--color-blue);font:inherit;font-weight:700;cursor:pointer}
.vocabulary-practice-progress{display:flex;justify-content:space-between;gap:1rem;margin:1.2rem 0 .5rem;color:var(--color-muted);font-size:.82rem;font-weight:700}
.vocabulary-practice-progress-track,.vocabulary-results-track{height:6px;overflow:hidden;border-radius:99px;background:#e8edf5}
.vocabulary-practice-progress-track span,.vocabulary-results-track span{display:block;height:100%;border-radius:inherit;background:#075be8;transition:width .2s ease}
.vocabulary-question-card{max-width:720px;margin:1.5rem auto 0;padding:clamp(1.2rem,4vw,2rem);border:1px solid var(--color-line);border-radius:16px;background:#fff;box-shadow:0 12px 32px rgba(7,26,61,.05)}
.vocabulary-question-card h2{margin:.8rem 0 1.4rem;font-size:clamp(1.4rem,3vw,2rem);line-height:1.25}
.vocabulary-answer-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
.vocabulary-answer-option{display:flex;align-items:center;gap:.7rem;min-height:3.4rem;padding:.75rem;border:1px solid var(--color-line);border-radius:10px;background:#fff;text-align:left;font:inherit;font-weight:650;cursor:pointer}
.vocabulary-answer-option:hover:not(:disabled),.vocabulary-answer-option.is-selected{border-color:#075be8;background:#f0f5ff}
.vocabulary-answer-option>span{display:grid;place-items:center;flex:0 0 1.7rem;height:1.7rem;border-radius:7px;background:#f0f5fc;color:#075be8;font-size:.75rem;font-weight:850}
.vocabulary-answer-option:disabled{cursor:default;opacity:.85}
.vocabulary-answer-field{display:grid;gap:.5rem;margin:1rem 0;color:var(--color-muted);font-size:.82rem;font-weight:700}
.vocabulary-answer-field input{font-size:1rem;color:var(--color-ink)}
.vocabulary-audio-button{display:inline-flex;align-items:center;gap:.6rem;margin:0 0 1rem;padding:.7rem 1rem;border:1px solid rgba(7,91,232,.25);border-radius:10px;background:#f0f5ff;color:#075be8;font:inherit;font-weight:750;cursor:pointer}
.vocabulary-answer-feedback{min-height:1rem;margin-top:1rem}
.vocabulary-answer-feedback p{margin:0;padding:.8rem 1rem;border-radius:9px;font-size:.88rem;line-height:1.5}
.vocabulary-answer-feedback .is-correct{background:#edf9f0;color:#176534}
.vocabulary-answer-feedback .is-incorrect{background:#fff1ef;color:#9d2d20}
.vocabulary-question-actions{display:flex;justify-content:space-between;align-items:center;gap:.8rem;margin-top:1.4rem}
.vocabulary-question-actions button:disabled{opacity:.45;cursor:not-allowed}
.vocabulary-results{max-width:560px;margin:2rem auto;padding:2rem 1.5rem;border:1px solid var(--color-line);border-radius:16px;background:#fff;text-align:center}
.vocabulary-results h2{margin:.5rem 0}
.vocabulary-results-score{margin:1.3rem 0 .25rem;color:#075be8;font-size:3.8rem;font-weight:850;line-height:1}
.vocabulary-results-score span{color:var(--color-muted);font-size:1.3rem}
.vocabulary-results>p{color:var(--color-muted);font-size:.9rem}
.vocabulary-results-track{margin:1.3rem 0}
.vocabulary-results .vocabulary-question-actions{justify-content:center;flex-wrap:wrap}
@media(max-width:600px){.vocabulary-mode-tabs{padding:.7rem;display:grid;grid-template-columns:1fr 1fr}.vocabulary-mode-tab{padding:.6rem .4rem;font-size:.8rem}.vocabulary-practice-panel{padding:1rem}.vocabulary-practice-selectors{grid-template-columns:1fr;padding:.8rem}.vocabulary-answer-options{grid-template-columns:1fr}.vocabulary-exercise-option{grid-template-columns:2.5rem minmax(0,1fr) auto;gap:.7rem;padding:.8rem}.vocabulary-exercise-number{width:2.4rem;height:2.4rem}.vocabulary-question-actions{align-items:stretch;flex-direction:column-reverse}.vocabulary-question-actions button{width:100%}.vocabulary-practice-section-title{align-items:flex-start;flex-direction:column;gap:.3rem}}


/* Diseño simplificado: buscador y filtros compartidos, sin columna lateral */
.vocabulary-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem clamp(1rem,3vw,2rem);border-bottom:1px solid var(--color-line);background:#fff}
.vocabulary-filter-field{display:grid;gap:.45rem;color:var(--color-ink-soft);font-size:.82rem;font-weight:750}
.vocabulary-filter-field select{width:100%;min-height:3rem;padding:.65rem .8rem;border:1px solid rgba(7,26,61,.18);border-radius:10px;background:#fff;color:var(--color-ink);font:inherit;font-weight:500}
.vocabulary-filter-field select:focus{outline:3px solid rgba(7,91,232,.16);border-color:var(--color-blue)}
.vocabulary-filter-field select:disabled{background:#f3f5f8;color:#8a93a3;cursor:not-allowed}
.vocabulary-layout{display:block;min-height:0}
.vocabulary-content{padding:clamp(1.2rem,3vw,2rem)}
.vocabulary-mode-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;padding:1rem clamp(1rem,3vw,2rem);background:#fff}
.vocabulary-mode-tab{min-height:2.9rem;border:1px solid var(--color-line);border-radius:10px;background:#f7f9fc;color:var(--color-ink-soft)}
.vocabulary-mode-tab.is-active{border-color:#075be8;background:#075be8;color:#fff}
.vocabulary-practice-panel{padding:clamp(1.2rem,3vw,2rem)}
@media(max-width:600px){.vocabulary-filters{grid-template-columns:1fr;gap:.75rem;padding:.9rem}.vocabulary-content,.vocabulary-practice-panel{padding:1rem}.vocabulary-mode-tabs{padding:.8rem}.vocabulary-mode-tab{font-size:.82rem}}


/* Pestañas y selectores alineados con el diseño exacto de Conjugación */
.vocabulary-mode-tabs.conjugation-tabs{display:flex;gap:.45rem;padding:.65rem;border-bottom:1px solid var(--color-line);border-radius:var(--radius-lg) var(--radius-lg) 0 0;background:#f2f6fc}
.vocabulary-mode-tabs .conjugation-tab{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:3.1rem;padding:.75rem 1.25rem;border:0;border-radius:13px;background:transparent;color:var(--color-muted);font:inherit;font-weight:800;cursor:pointer;transition:color var(--duration-fast),background var(--duration-fast),box-shadow var(--duration-fast)}
.vocabulary-mode-tabs .conjugation-tab.is-active{background:#fff;color:var(--color-blue);box-shadow:0 4px 14px rgba(7,26,61,.08)}
.vocabulary-mode-tabs .conjugation-tab:focus-visible{outline-offset:-3px}
.vocabulary-filters .form-field{display:grid;gap:.5rem;min-width:0}
.vocabulary-filters .form-field label{color:var(--color-ink);font-size:.88rem;font-weight:800}
.vocabulary-filters .form-field select{width:100%;min-height:3.2rem;padding:.8rem .95rem;border:1px solid rgba(7,26,61,.16);border-radius:13px;outline:none;background:#fff;color:var(--color-ink);font:inherit;font-size:.94rem;transition:border-color var(--duration-fast),box-shadow var(--duration-fast)}
.vocabulary-filters .form-field select:focus{border-color:var(--color-blue);box-shadow:0 0 0 4px rgba(7,91,232,.1)}
.vocabulary-filters .form-field select:disabled{background:#f3f5f8;color:#8994a7;cursor:not-allowed}
@media(max-width:600px){.vocabulary-mode-tabs.conjugation-tabs{display:flex;gap:.45rem;padding:.65rem}.vocabulary-mode-tabs .conjugation-tab{flex:1;padding:.75rem .5rem;font-size:.84rem}}


/* Acción para restablecer los filtros del catálogo */
.vocabulary-filter-actions{grid-column:1/-1;display:flex;justify-content:flex-end}
.vocabulary-filter-actions .button{min-height:2.8rem;padding:.7rem 1.15rem}
@media(max-width:600px){.vocabulary-filter-actions{justify-content:stretch}.vocabulary-filter-actions .button{width:100%}}


/* Ficha de números ordinales: categoría separada y traducciones alineadas */
.vocabulary-numeral-adjective-grid .vocabulary-numeral-category{grid-column:1/-1}
.vocabulary-numeral-adjective-grid .vocabulary-detail-cell strong,
.vocabulary-numeral-adjective-grid .vocabulary-detail-cell small{display:block}
.vocabulary-numeral-adjective-grid .vocabulary-detail-cell strong{margin-top:.18rem}
.vocabulary-numeral-adjective-grid .vocabulary-detail-cell small{margin-top:.2rem;color:var(--color-muted);font-size:.82rem;line-height:1.35}

/* Fichas con variantes de género: separar la forma francesa de su traducción */
.vocabulary-gender-variants .vocabulary-detail-cell strong,
.vocabulary-gender-variants .vocabulary-detail-cell small{display:block}
.vocabulary-gender-variants .vocabulary-detail-cell strong{margin-top:.18rem}
.vocabulary-gender-variants .vocabulary-detail-cell small{margin-top:.2rem}


/* Escena interactiva temporal: Prueba casa */
.vocabulary-scene-intro{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 1rem;color:var(--color-muted);font-size:.88rem}
.vocabulary-scene-intro p{margin:0}
.vocabulary-scene-intro span{flex:0 0 auto;padding:.35rem .65rem;border:1px solid var(--color-line);border-radius:999px;background:#fff;font-size:.75rem;font-weight:700}
.vocabulary-house-scene{max-width:680px;margin:0 auto;padding:1rem;border:1px solid var(--color-line);border-radius:16px;background:linear-gradient(180deg,#f3f7fc,#fff)}
.vocabulary-house-scene svg{display:block;width:100%;height:auto;overflow:visible}
.house-roof{fill:#e9a58a;stroke:#a65e48;stroke-width:5;stroke-linejoin:round}
.house-shell{fill:#fff;stroke:#526b89;stroke-width:5}
.house-room{stroke:#fff;stroke-width:5}
.house-room.room-one{fill:#e7efff}.house-room.room-two{fill:#fff0dc}.house-room.room-three{fill:#e9f3e8}.house-room.room-four{fill:#e9e5f5}
.house-wall{fill:none;stroke:#526b89;stroke-width:7;stroke-linecap:round}
.house-furniture{fill:#c49a78;stroke:#8b684e;stroke-width:3;stroke-linejoin:round}
.house-room-labels{fill:#344b68;font-size:12px;font-weight:800;text-anchor:middle;letter-spacing:1px}
.vocabulary-scene-hotspot{cursor:pointer;outline:none}
.vocabulary-scene-hotspot circle{fill:#075be8;stroke:#fff;stroke-width:3;transition:fill .15s, r .15s}
.vocabulary-scene-hotspot text{fill:#fff;font-size:12px;font-weight:800;text-anchor:middle;pointer-events:none}
.vocabulary-scene-hotspot:hover circle,.vocabulary-scene-hotspot:focus circle,.vocabulary-scene-hotspot.is-selected circle{fill:#ff5b36;stroke:#fff;stroke-width:4}
.vocabulary-scene-hotspot:focus circle{filter:drop-shadow(0 0 4px rgba(7,91,232,.45))}
.vocabulary-scene-hint{margin:.75rem 0 1rem;color:var(--color-muted);font-size:.8rem;text-align:center}
.vocabulary-scene-selection{max-width:680px;margin:0 auto;padding:1.1rem;border:1px dashed rgba(7,91,232,.28);border-radius:12px;background:#f7faff;color:var(--color-muted);font-size:.88rem;text-align:center}
@media(max-width:600px){.vocabulary-scene-intro{align-items:flex-start;flex-direction:column}.vocabulary-house-scene{padding:.35rem}.vocabulary-scene-hint{font-size:.75rem}}


/* Escena moderna de vivienda — categoría temporal Prueba casa */
.vocabulary-scene-intro{align-items:center;margin-bottom:1rem;color:#53647b}
.vocabulary-scene-intro span{border-color:#dce5ef;background:#fff;color:#42536a}
.vocabulary-house-scene{max-width:940px;padding:clamp(.4rem,1.5vw,1rem);overflow:hidden;border:1px solid #e2e9f1;border-radius:20px;background:linear-gradient(145deg,#f7f9fc 0%,#edf3f8 100%);box-shadow:0 16px 40px rgba(31,53,82,.07)}
.vocabulary-house-scene svg{width:100%;height:auto}
.scene-ground-shadow{fill:#dce5ed;opacity:.7}
.scene-roof{fill:#d9e3ec;stroke:#8799ad;stroke-width:3;stroke-linejoin:round}
.scene-roof-detail{fill:none;stroke:#b3c1cf;stroke-width:2}
.scene-house-shell{fill:url(#scene-wall-gradient);stroke:#9aabba;stroke-width:3}
.scene-room{stroke:#fff;stroke-width:5}
.scene-attic{fill:#edf1f6}.scene-bedroom{fill:#e6edf7}.scene-bath{fill:#e5f1f2}
.scene-living{fill:#f1ece4}.scene-dining{fill:#f5f0e8}.scene-kitchen{fill:#eaf0e9}
.scene-wall-line{fill:none;stroke:#a9b7c5;stroke-width:7;stroke-linecap:round}
.scene-cellar{fill:#e9edf1;stroke:#a9b7c5;stroke-width:2}
.scene-cellar-line{stroke:#c1ccd6;stroke-width:2}
.scene-window{fill:#d9edf3;stroke:#90aebe;stroke-width:2}
.scene-window-line{stroke:#fff;stroke-width:2}
.scene-door{fill:#c8b6a2;stroke:#9e8975;stroke-width:2}
.scene-door-knob{fill:#fff}
.scene-balcony{fill:#cbd8e2;stroke:#91a2b2;stroke-width:2}
.scene-balcony-rail{fill:none;stroke:#8fa1b2;stroke-width:4;stroke-linecap:round}
.scene-garage{fill:#e7edf3;stroke:#a5b4c2;stroke-width:3;stroke-linejoin:round}
.scene-garage-door{fill:#d5dfe8;stroke:#a5b4c2;stroke-width:2}
.scene-garage-lines{fill:none;stroke:#a5b4c2;stroke-width:2}
.scene-garden{fill:#dfece2}
.scene-tree{fill:#bdd5c2}.scene-tree-trunk{fill:#a58f7c}
.scene-terrace{fill:#e8e0d4;stroke:#c6b9a7;stroke-width:2}
.scene-terrace-line{stroke:#c6b9a7;stroke-width:2}
.scene-room-labels{fill:#66788d;font-size:11px;font-weight:800;text-anchor:middle;letter-spacing:1.1px}
.vocabulary-scene-hotspot{cursor:pointer;outline:none}
.vocabulary-scene-hotspot .scene-marker-halo{fill:#fff;opacity:.94;stroke:#c4d2e0;stroke-width:1.5}
.vocabulary-scene-hotspot .scene-marker{fill:#1765c1;stroke:#fff;stroke-width:2;transition:fill .16s,transform .16s}
.vocabulary-scene-hotspot text{fill:#fff;font-size:10px;font-weight:800;text-anchor:middle;pointer-events:none}
.vocabulary-scene-hotspot:hover .scene-marker,.vocabulary-scene-hotspot:focus .scene-marker,.vocabulary-scene-hotspot.is-selected .scene-marker{fill:#e87956}
.vocabulary-scene-hotspot:focus .scene-marker-halo{stroke:#1765c1;stroke-width:3}
.vocabulary-scene-hotspot.is-selected .scene-marker-halo{stroke:#e87956;stroke-width:2}
.vocabulary-scene-hint{margin:.8rem 0 1rem;color:#697b90;font-size:.8rem;text-align:center}
.vocabulary-scene-selection{max-width:940px;margin:0 auto;padding:1.2rem;border:1px solid #dfe7f0;border-radius:14px;background:#f8fafc;color:#65768a;font-size:.9rem;text-align:center}
@media(max-width:600px){
 .vocabulary-house-scene{padding:.15rem;border-radius:14px}
 .vocabulary-scene-intro{align-items:flex-start;flex-direction:column;gap:.5rem}
 .scene-room-labels{font-size:10px}
 .vocabulary-scene-hint{font-size:.74rem;line-height:1.5}
}


.vocabulary-scene-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;max-width:940px;margin:1rem auto 0}
.vocabulary-scene-legend-item{display:flex;align-items:center;gap:.65rem;min-width:0;padding:.65rem .75rem;border:1px solid #e1e8f0;border-radius:11px;background:#fff;color:#34465d;text-align:left;font:inherit;cursor:pointer;transition:border-color .16s,background .16s,box-shadow .16s}
.vocabulary-scene-legend-item:hover,.vocabulary-scene-legend-item:focus-visible{border-color:#9bb8d7;background:#f8fbff;outline:none}
.vocabulary-scene-legend-item.is-selected{border-color:#1765c1;background:#eff6ff;box-shadow:inset 3px 0 #1765c1}
.vocabulary-scene-legend-number{display:grid;place-items:center;flex:0 0 1.7rem;height:1.7rem;border-radius:8px;background:#eaf1f8;color:#1765c1;font-size:.75rem;font-weight:850}
.vocabulary-scene-legend-item.is-selected .vocabulary-scene-legend-number{background:#1765c1;color:#fff}
.vocabulary-scene-legend-item>span:last-child{display:grid;gap:.12rem;min-width:0}
.vocabulary-scene-legend-item strong{overflow-wrap:anywhere;font-size:.8rem}
.vocabulary-scene-legend-item small{color:#718096;font-size:.72rem}
@media(max-width:700px){.vocabulary-scene-legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}.vocabulary-scene-legend-item{padding:.55rem}.vocabulary-scene-legend-item strong{font-size:.75rem}}
@media(max-width:390px){.vocabulary-scene-legend{grid-template-columns:1fr}}


/* Layout interactivo de Prueba casa: escena a la izquierda y vocabulario a la derecha */
.vocabulary-scene-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(245px,.85fr);gap:1rem;align-items:stretch}
.vocabulary-scene-visual{position:relative;min-width:0}
.vocabulary-scene-layout .vocabulary-house-scene{max-width:none;margin:0;padding:clamp(.35rem,1vw,.75rem);border-radius:18px}
.vocabulary-scene-layout .vocabulary-house-scene svg{display:block;width:100%;height:auto}
.vocabulary-scene-sidebar{display:flex;flex-direction:column;align-self:stretch;min-width:0;min-height:0;max-height:100%;overflow:hidden;border:1px solid #dfe7f0;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(31,53,82,.06)}
.vocabulary-scene-sidebar h3{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex:0 0 auto;margin:0;padding:1rem 1.1rem;border-bottom:1px solid #e7edf4;color:#243b57;font-size:1rem}
.vocabulary-scene-sidebar h3 span{color:#718096;font-size:.76rem;font-weight:600}
.vocabulary-scene-sidebar .vocabulary-scene-legend{display:grid;grid-template-columns:1fr;align-content:start;flex:1 1 0;min-height:0;gap:0;max-width:none;max-height:100%;margin:0;padding:.35rem .55rem;overflow-x:hidden;overflow-y:auto}
.vocabulary-scene-sidebar .vocabulary-scene-legend-item{padding:.7rem .65rem;border:0;border-bottom:1px solid #edf1f5;border-radius:8px;background:#fff}
.vocabulary-scene-sidebar .vocabulary-scene-legend-item:last-child{border-bottom:0}
.vocabulary-scene-sidebar .vocabulary-scene-legend-item.is-selected{border-color:transparent;background:#eaf3ff;box-shadow:inset 3px 0 #1765c1}
.vocabulary-scene-sidebar .vocabulary-scene-legend-item strong{font-size:.84rem}
.vocabulary-scene-sidebar .vocabulary-scene-legend-item small{font-size:.76rem}
.vocabulary-scene-popover{position:absolute;z-index:5;left:clamp(135px,var(--scene-x),calc(100% - 135px));top:clamp(95px,var(--scene-y),calc(100% - 100px));width:min(290px,calc(100% - 1rem));padding:.85rem;border:1px solid #c9d9eb;border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 16px 38px rgba(19,42,71,.22);transform:translate(-50%,-112%);backdrop-filter:blur(8px)}
.vocabulary-scene-popover .vocabulary-detail{margin:0;padding:.1rem .2rem 0;border:0;background:transparent;box-shadow:none}
.vocabulary-scene-popover .vocabulary-detail-head{padding:0 1.4rem .55rem 0}
.vocabulary-scene-popover .vocabulary-detail-head .eyebrow{font-size:.65rem}
.vocabulary-scene-popover .vocabulary-detail-head h3{margin:.18rem 0;font-size:1.05rem}
.vocabulary-scene-popover .vocabulary-detail-head p{margin:0;font-size:.88rem}
.vocabulary-scene-popover .vocabulary-detail-grid{gap:.45rem;margin-top:.5rem}
.vocabulary-scene-popover .vocabulary-detail-cell{padding:.45rem .55rem;border-radius:8px;background:#f3f7fc}
.vocabulary-scene-popover .vocabulary-detail-cell span{font-size:.66rem}
.vocabulary-scene-popover .vocabulary-detail-cell strong{font-size:.78rem}
.vocabulary-scene-popover .vocabulary-detail-cell small{font-size:.7rem}
.vocabulary-scene-popover-close{position:absolute;top:.45rem;right:.5rem;z-index:1;width:1.8rem;height:1.8rem;border:0;border-radius:50%;background:#edf3fa;color:#425a75;font-size:1.2rem;line-height:1;cursor:pointer}
.vocabulary-scene-selection{position:absolute;left:50%;bottom:1rem;z-index:2;width:min(340px,calc(100% - 2rem));padding:.75rem 1rem;border:1px solid #dce6f0;border-radius:12px;background:rgba(255,255,255,.94);box-shadow:0 8px 20px rgba(19,42,71,.1);transform:translateX(-50%)}
@media(max-width:850px){
 .vocabulary-scene-layout{grid-template-columns:minmax(0,1fr)}
 .vocabulary-scene-sidebar{max-height:none}
 .vocabulary-scene-sidebar .vocabulary-scene-legend{grid-template-columns:repeat(2,minmax(0,1fr));flex:0 1 auto;min-height:0;max-height:360px}
 .vocabulary-scene-popover{width:min(270px,calc(100% - .5rem))}
}
@media(max-width:520px){
 .vocabulary-scene-sidebar .vocabulary-scene-legend{grid-template-columns:1fr;max-height:330px}
 .vocabulary-scene-popover{left:50%;top:auto;bottom:.5rem;transform:translateX(-50%);width:min(280px,calc(100% - .75rem))}
 .vocabulary-scene-selection{bottom:.5rem}
 .vocabulary-scene-intro{align-items:flex-start;flex-direction:column;gap:.5rem}
}


/* Imagen WebP de la casa interactiva */
.vocabulary-scene-layout .vocabulary-house-scene{position:relative;aspect-ratio:3/2;padding:0;overflow:hidden}
.vocabulary-scene-layout .vocabulary-house-image{display:block;width:100%;height:100%;object-fit:fill}
.vocabulary-scene-layout .vocabulary-house-scene .scene-hotspot-overlay{position:absolute;inset:0;display:block;width:100%;height:100%;overflow:visible}

/* Proporción nativa de la imagen interactiva de cocina (1648 × 1024). */
.vocabulary-scene-layout .vocabulary-kitchen-scene{aspect-ratio:1648/1024}
