/* Diseño general RVN. Alcance exclusivo: body.rvn-platform.
   La capa aprobada de Frases/Primaria se incorpora al final durante build.py. */
body.rvn-platform {
  --rvn-paper:#fbf8f0; --rvn-ink:#193b35; --rvn-muted:#61766a;
  --rvn-accent:#176961; --rvn-line:#d8dfd1; --rvn-tint:#e7eee3;
  --rvn-board:#143e39; --rvn-board-ink:#fffce9; --rvn-board-es:#ffdb97;
  --bg-darker:#f2ecdf; --bg-dark:#fbf8f0; --bg-input:#fffdf8;
  --text-primary:#193b35; --text-main:#193b35; --text-secondary:#39564b; --text-muted:#61766a;
  --primary:#176961; --primary-light:#176961; --primary-glow:#17696115;
  --border:#d8dfd1; --border-hover:#7a9b85; --premium-gold:#976021;
  background:radial-gradient(ellipse at 5% 0%,#fffdf5 0,transparent 55%),var(--rvn-environment,#f2ecdf);
  color:var(--rvn-ink); font-family:'Poppins',system-ui,sans-serif;
}
body.rvn-platform[data-rvn-view="cuaderno"] {--rvn-accent:#315c46; --primary:#315c46; --primary-light:#315c46;}
html[data-theme="verde-esmeralda"] body.rvn-platform {--rvn-tint:#e1efdf;--rvn-environment:#edf2e5;}
html[data-theme="acero-metalico"] body.rvn-platform {--rvn-tint:#e2edf0;--rvn-environment:#edf1ee;}
html[data-theme="naranja-volcan"] body.rvn-platform {--rvn-tint:#f8e5d3;--rvn-environment:#f6eddf;}
html[data-theme="claro-profesional"] body.rvn-platform {--rvn-tint:#f1f3ee;--rvn-environment:#f4f4ec;}
html[data-theme="oro-negro"] body.rvn-platform {--rvn-tint:#f5edce;--rvn-environment:#f3eedb;}
html[data-theme="lima-acido"] body.rvn-platform {--rvn-tint:#eaf2d2;--rvn-environment:#f0f2df;}
html[data-theme="purpura-oscuro"] body.rvn-platform {--rvn-tint:#eee3f0;--rvn-environment:#f1eaf0;}
html[data-theme="rojo-carbon"] body.rvn-platform {--rvn-tint:#f5e2df;--rvn-environment:#f5eae3;}
html[data-theme="oceano-profundo"] body.rvn-platform {--rvn-tint:#ddedeb;--rvn-environment:#eaf1ec;}
body.rvn-platform[data-rvn-view="tutor"] {
  --rvn-accent:#2362d7; --rvn-ink:#193558; --rvn-muted:#627891;
  --rvn-paper:#fff; --rvn-line:#d9e4f2; --rvn-tint:#eaf1ff;
  --primary:#2362d7; --primary-light:#2362d7; --text-primary:#193558; --text-secondary:#42607e;
  --bg-dark:#fff; --bg-darker:#f5f8fd; --border:#d9e4f2;
  background:radial-gradient(ellipse at 0 10%,#e6f0ff 0,transparent 60%),#f5f8fd;
}
body.rvn-platform *, body.rvn-platform *::before, body.rvn-platform *::after {box-sizing:border-box;}
body.rvn-platform [hidden] {display:none !important;}
body.rvn-platform :focus-visible {outline:3px solid #d99936; outline-offset:3px;}
body.rvn-platform :is(input,select,textarea) {max-width:100%; accent-color:var(--rvn-accent);}
body.rvn-platform :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),select,textarea) {
  background:var(--rvn-paper);color:var(--rvn-ink);border-color:var(--rvn-line);
}
body.rvn-platform :is(input,textarea)::placeholder {color:var(--rvn-muted);opacity:1;}
body.rvn-platform :is(button,a,input,select,textarea) {touch-action:manipulation;}
body.rvn-platform .rvn-toolbar {
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  width:100%;max-width:1540px;margin:0 auto 22px;padding:4px 0;min-width:0;
}
body.rvn-platform .rvn-intro {display:grid;gap:5px;color:var(--rvn-muted);font-size:.78rem;}
body.rvn-platform .rvn-intro > :first-child {color:var(--rvn-accent);font-size:.62rem;font-weight:800;letter-spacing:.15em;}
body.rvn-platform .rvn-view-switch {
  display:flex;gap:4px;background:#e4e7dc;border:1px solid var(--rvn-line);border-radius:16px;padding:4px;flex-shrink:0;
}
body.rvn-platform .rvn-view-switch button {
  display:flex;align-items:center;justify-content:center;gap:9px;
  border:0;border-radius:12px;background:transparent;color:#506459;
  padding:12px 18px;min-height:44px;font:700 .86rem 'Poppins',sans-serif;cursor:pointer;
}
body.rvn-platform .rvn-view-switch button[aria-pressed="true"] {background:var(--rvn-accent);color:#fff;box-shadow:0 3px 8px #193b3520;}
body.rvn-platform .rvn-main {min-width:0;}
body.rvn-platform.fs-studio .fs-main > .rvn-toolbar {order:-10;}
body.rvn-platform[data-rvn-section="clases"] > .cl-layout {grid-template-columns:260px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);}
body.rvn-platform[data-rvn-section="clases"] > .cl-layout > .cl-sidebar {grid-column:1;grid-row:1 / span 2;}
body.rvn-platform[data-rvn-section="clases"] > .cl-layout > .rvn-toolbar {grid-column:2;grid-row:1;padding:0;margin-bottom:0;}
body.rvn-platform[data-rvn-section="clases"] > .cl-layout > .rvn-stage {grid-column:2;grid-row:2;margin:0;max-width:100%;}
body.rvn-platform .rvn-stage {
  --rvn-surface-ink:var(--rvn-board-ink); --rvn-surface-muted:#bad2be;
  --rvn-surface-es:var(--rvn-board-es);
  display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,22%);
  align-items:center;gap:24px;width:100%;min-width:0;position:relative;
  padding:28px;border:10px solid #b98b57;border-radius:14px;
  background:radial-gradient(ellipse at 12% 0,#24584e,transparent 70%),var(--rvn-board);
  box-shadow:inset 0 0 0 2px #76552f,0 12px 32px #263c2414;
  color:var(--rvn-surface-ink);margin:0 0 24px;
}
body.rvn-platform .rvn-stage.rvn-long-copy {grid-template-columns:minmax(0,1fr) 130px;}
body.rvn-platform .rvn-stage.rvn-no-teacher {grid-template-columns:minmax(0,1fr);}
body.rvn-platform .rvn-lesson {
  width:100%;min-width:0;max-width:none;margin:0;position:relative;
  border:0;border-radius:0;background:transparent;box-shadow:none;
  color:var(--rvn-surface-ink);padding:0;transform:none;
  --text-primary:var(--rvn-surface-ink); --text-main:var(--rvn-surface-ink);
  --text-secondary:var(--rvn-surface-muted); --text-muted:var(--rvn-surface-muted);
  --bg-dark:#1d4a42; --bg-darker:#143e39; --bg-input:#1d4a42; --border:#9ac8ab40;--primary-light:#b7dccb;
}
body.rvn-platform .rvn-teacher {position:relative;min-width:0;margin:0;align-self:center;text-align:center;}
body.rvn-platform .rvn-teacher img {display:block;width:100%;height:auto;max-height:390px;object-fit:contain;}
body.rvn-platform .rvn-teacher figcaption {color:var(--rvn-surface-muted);font-size:.58rem;letter-spacing:.04em;margin-top:8px;}
body.rvn-platform .rvn-long-copy .rvn-teacher img {max-height:190px;}
body.rvn-platform[data-rvn-view="cuaderno"] .rvn-stage {
  --rvn-surface-ink:#214b37;--rvn-surface-es:#994b2d;--rvn-surface-muted:#667a59;
  grid-template-columns:minmax(0,1fr) 130px;gap:26px;
  background:linear-gradient(90deg,transparent 49.8%,#b8a88822 50%,transparent 50.4%),#fcf7e9;
  border:1px solid #d4c7a9;border-left:12px solid #7d9872;border-radius:8px 18px 18px 8px;
  padding:30px 30px 30px 38px;box-shadow:0 12px 30px #473c1c14,inset 4px 0 8px #9a7f3d0a;
}
body.rvn-platform[data-rvn-view="cuaderno"] .rvn-stage::before {
  content:'';position:absolute;left:-17px;top:18px;bottom:18px;width:23px;
  background:repeating-linear-gradient(0deg,transparent 0 26px,#91805d 28px,#e2d3a8 31px,#a8956d 33px,transparent 35px 58px);
  pointer-events:none;
}
body.rvn-platform[data-rvn-view="cuaderno"] .rvn-lesson {
  --bg-dark:#fcf7e9;--bg-darker:#eee8d7;--bg-input:#fffdf5;--border:#c8ccb4;--primary-light:#315c46;
}
body.rvn-platform[data-rvn-view="tutor"] .rvn-stage {
  --rvn-surface-ink:#193558;--rvn-surface-es:#2362d7;--rvn-surface-muted:#627891;
  grid-template-columns:minmax(190px,34%) minmax(0,1fr);padding:22px;
  background:#fff;border:1px solid #d8e5f5;border-radius:24px;gap:30px;
  box-shadow:0 12px 38px #29548912;
}
body.rvn-platform[data-rvn-view="tutor"] .rvn-lesson {grid-column:2;grid-row:1;--bg-dark:#fff;--bg-darker:#f3f7fc;--bg-input:#f3f7fc;--border:#d9e4f2;--primary-light:#2362d7;}
body.rvn-platform[data-rvn-view="tutor"] .rvn-teacher {
  grid-column:1;grid-row:1;align-self:stretch;display:flex;flex-direction:column;justify-content:flex-end;
  padding:35px 12px 16px;border-radius:18px;min-height:330px;
  background:radial-gradient(ellipse at 25% 10%,#fff8e9,transparent 60%),linear-gradient(145deg,#f6e3c7,#dfbfa0);
  border:1px solid #ebdbc4;
}
body.rvn-platform[data-rvn-view="tutor"] .rvn-teacher::before {content:'ENGLISH ACADEMY';position:absolute;top:18px;left:18px;color:#90775d;letter-spacing:.14em;font-size:.53rem;font-weight:700;}
body.rvn-platform[data-rvn-view="tutor"] .rvn-teacher figcaption {color:#765c40;}
body.rvn-platform[data-rvn-view="tutor"] .rvn-stage.rvn-long-copy {grid-template-columns:minmax(150px,23%) minmax(0,1fr);}
body.rvn-platform[data-rvn-view="tutor"] .rvn-long-copy .rvn-teacher img {max-height:300px;}
body.rvn-platform[data-rvn-view="tutor"] .rvn-long-copy .rvn-teacher {align-self:start;}
body.rvn-platform[data-rvn-view="tutor"] .rvn-no-teacher .rvn-lesson {grid-column:1;}
body.rvn-platform[data-rvn-view] .rvn-stage.rvn-no-teacher {grid-template-columns:minmax(0,1fr);}
/* Tipografía de contenido; nunca se modifica display, visibility, blur o respuestas. */
body.rvn-platform .rvn-lesson :is(#cardEn,#cardPhrase,#cardWord,#sfEn,#questionText,#paraText,.lec-page-en,.cl-ejemplo-en,.ejemplo-en,.sentence-en) {
  color:var(--rvn-surface-ink);overflow-wrap:anywhere;line-height:1.6;text-shadow:none;
}
body.rvn-platform .rvn-lesson :is(#cardEs,#cardWhen,#cardTrans,#sfEs,#paraEsText,.lec-page-es,.ejemplo-es,.sentence-es) {
  color:var(--rvn-surface-es);overflow-wrap:anywhere;line-height:1.65;text-shadow:none;
}
body.rvn-platform .rvn-lesson :is(#cardEn,#cardPhrase,#sfEn) {font-size:var(--mod-font-en,clamp(1.3rem,2.1vw,2.3rem));}
body.rvn-platform .rvn-lesson :is(#cardEs,#cardWhen,#sfEs) {font-size:var(--mod-font-es,clamp(1.05rem,1.4vw,1.4rem));}
body.rvn-platform .rvn-lesson :is([class$="-card-top"],[class$="-card-tense"],[class$="-card-counter"],[class$="-card-animo"],[class$="-card-when"],[class$="-mic-label"]) {color:var(--rvn-surface-muted);}
body.rvn-platform .rvn-lesson :is([class$="-card-divider"],.sf-divider) {background:#8da99155;}
body.rvn-platform .rvn-lesson :is([class$="-card-body"]) {min-width:0;min-height:0;padding:18px 0;}
body.rvn-platform .rvn-lesson :is([class$="-card-verb-banner"],[class$="-card-unit-banner"],[class$="-card-topic-banner"],[class$="-card-word-banner"]) {position:relative;inset:auto;margin:0 0 18px;padding:12px;background:#789b7e1a;color:var(--rvn-surface-ink);border-color:#a4bd9440;}
body.rvn-platform .rvn-lesson :is(#cardVerbNameDisplay,#cardUnitNameDisplay,#cardTopicNameDisplay,#cardWordNameDisplay,#cardVerbTransDisplay,#cardWordTransDisplay) {color:var(--rvn-surface-ink);}
body.rvn-platform .rvn-lesson :is(#answerText,.answer-text,.dp-resp-text,.cv-bubble-en,.cn-line-en) {overflow-wrap:anywhere;}
body.rvn-platform .rvn-lesson .vc-card-ejemplo-en {color:var(--rvn-surface-ink) !important;}
body.rvn-platform .rvn-lesson .vc-card-ejemplo-es {color:var(--rvn-surface-es) !important;}
body.rvn-platform .rvn-lesson .vc-card-ejemplo-item {background:#8ca7870b;border-color:#8ca78740;}
body.rvn-platform .rvn-lesson .vc-card-ejemplo-item.is-active {background:#8ca78720;border-color:var(--rvn-accent);}
body.rvn-platform .rvn-lesson :is(.hi-para-en,.hi-para-es) {background:transparent;border-color:#8da99155;}
body.rvn-platform[data-rvn-family="card"][data-rvn-view="cuaderno"] .rvn-lesson #cardBodyLectura:not([style*="none"]) {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:36px;align-items:start;
}
body.rvn-platform[data-rvn-family="card"][data-rvn-view="cuaderno"] .rvn-lesson #cardBodyLectura > :is(#cardEn,#cardPhrase) {grid-column:1;grid-row:1;}
body.rvn-platform[data-rvn-family="card"][data-rvn-view="cuaderno"] .rvn-lesson #cardBodyLectura > :is(#cardEs,#cardWhen) {grid-column:2;grid-row:1;}
body.rvn-platform[data-rvn-family="card"][data-rvn-view="cuaderno"] .rvn-lesson #cardBodyLectura > [class$="-card-divider"] {display:none;}
body.rvn-platform .rvn-actions {display:grid;grid-template-columns:repeat(var(--rvn-action-count,3),minmax(0,1fr));gap:8px;min-width:0;}
body.rvn-platform .rvn-actions > button {
  min-width:0;min-height:46px;height:auto;width:100%;padding:10px 8px;border-radius:12px;
  font-size:.76rem;white-space:normal;line-height:1.3;background:var(--rvn-tint);color:var(--rvn-accent);border:1px solid var(--rvn-line);grid-column:auto;
}
body.rvn-platform .rvn-actions > :is(.playing,.active,.running,[aria-pressed="true"]) {background:var(--rvn-accent);color:#fff;}
body.rvn-platform .rvn-actions > :is([id*="Stop"],[id*="stop"]) {background:#b7473f;color:#fff;}
body.rvn-platform .rvn-actions > :is(#btnNext,#btnAuto,#sfStartPause) {background:var(--rvn-accent);color:#fff;}
/* Mobiliario y controles de cada familia, fuera de las superficies de práctica. */
body.rvn-platform .rvn-chrome {background:var(--rvn-paper);color:var(--rvn-ink);border-color:var(--rvn-line);box-shadow:none;}
body.rvn-platform [class*="-bottom-sheet"]:not(.open):not(.active) {visibility:hidden;}
body.rvn-platform :is([class$="-controls-panel"],[class$="-controls-bar"],.vc-controls,.hi-controls,.lec-controls,.cv-controls,.sf-controls,.qz-controls,.cn-player,.selectors,.player) {
  background:var(--rvn-paper);color:var(--rvn-ink);border-color:var(--rvn-line);border-radius:16px;
}
body.rvn-platform :is([class$="-logo"],[class$="-sidebar-title"],[class$="-sb-title"],[class$="-cat-name"],[class$="-verb-name"],[class$="-unit-name"],[class$="-topic-name"],[class$="-word-name"]) {color:var(--rvn-ink);text-shadow:none;}
body.rvn-platform :is([class$="-sidebar-header"],[class$="-sidebar-head"],[class$="-sb-header"],[class$="-sheet-header"]) {background:var(--rvn-paper);border-color:var(--rvn-line);}
body.rvn-platform :is([class$="-mode-opt"],[class$="-mode-btn"],[class$="-mode"],.sec-nav-btn,.cl-btn,.sf-mode) {color:var(--rvn-muted);}
body.rvn-platform :is([class$="-mode-opt"],[class$="-mode-btn"],[class$="-mode"],.sec-nav-btn,.cl-btn,.sf-mode).active {background:var(--rvn-accent);color:#fff;border-color:var(--rvn-accent);}
body.rvn-platform :is(.vb-card-bg,.un-card-bg,.sn-card-bg,.qz-card-bg1,.qz-card-bg2) {display:none;}
/* Los lectores y las aplicaciones conservan sus nodos y desplazamientos originales. */
body.rvn-platform[data-rvn-section="lecturas"] .rvn-lesson {display:flex;min-height:0;}
body.rvn-platform[data-rvn-section="lecturas"] .rvn-lesson :is(.lec-page-left,.lec-page-right) {background:transparent;box-shadow:none;color:var(--rvn-surface-ink);min-width:0;}
body.rvn-platform[data-rvn-section="lecturas"] .lec-spine {background:#9d82543b;}
body.rvn-platform[data-rvn-section="lecturas"] .lec-mobile-reading-card {background:transparent;border-color:#8da99155;box-shadow:none;}
body.rvn-platform[data-rvn-section="lecturas"] .lec-mobile-reading-text {color:var(--rvn-surface-ink);}
body.rvn-platform[data-rvn-section="lecturas"] .showing-es .lec-mobile-reading-text {color:var(--rvn-surface-es);}
body.rvn-platform[data-rvn-section="interview"] .rvn-lesson {display:grid;grid-template-columns:minmax(0,1fr);gap:18px;}
body.rvn-platform[data-rvn-section="interview"] .rvn-lesson :is(.question-card,.answer-card) {background:transparent;color:var(--rvn-surface-ink);border-color:#9eaf9840;}
body.rvn-platform[data-rvn-section="interview"] #answerText {color:var(--rvn-surface-ink);}
body.rvn-platform[data-rvn-section="interview"] #questionTextSecondary {color:var(--rvn-surface-es);}
body.rvn-platform[data-rvn-section="clases"] .rvn-stage {margin:20px;max-width:calc(100% - 40px);align-self:start;}
body.rvn-platform[data-rvn-section="clases"] .rvn-toolbar {padding:16px 24px;}
body.rvn-platform[data-rvn-section="clases"] .rvn-lesson :is(.seccion-header,.ejemplo-card,.estructura-card,.vocab-card,.ac-item,.ac-header,.tabla-wrap) {background:transparent;color:var(--rvn-surface-ink);border-color:#92ac9440;}
body.rvn-platform[data-rvn-section="clases"] .rvn-lesson :is(.seccion-header h3,.ejemplo-en,.seccion-formula,.ac-label) {color:var(--rvn-surface-ink);}
body.rvn-platform[data-rvn-section="clases"] .cl-sidebar .cl-card {background:var(--rvn-paper);color:var(--rvn-ink);border-color:var(--rvn-line);}
/* Verbos Inmersos utiliza una paleta y un grid propios en el código original. */
body.rvn-platform[data-rvn-section="verbos-inmersos"] {--bg:var(--rvn-paper);--surface:var(--rvn-paper);--surface2:var(--rvn-tint);--line:var(--rvn-line);--text:var(--rvn-ink);--muted:var(--rvn-muted);}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .workspace {height:auto !important;align-items:start;min-width:0;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .workspace > .rvn-stage {margin:0;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] :is(.panel:not(.rvn-lesson),.topbar,.forms span,.filter-chip,.filter-head button,.mode-card,.repeat-console,.related-item,.verb-library,.round,.pattern-card) {background:var(--rvn-paper);border-color:var(--rvn-line);color:var(--rvn-ink);box-shadow:none;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] :is(.brand,.brand small,.top-progress,.hello small,.sidebar button,.sidebar .side-module-toggle,.verb-item,.verb-item strong,.verb-item small,.breadcrumb,.verb-identity em,.verb-hero > blockquote,.progress-card span,.progress-card small,.filter-row > span,.range-list-summary) {color:var(--rvn-ink);}
body.rvn-platform[data-rvn-section="verbos-inmersos"] :is(.filter-chip.active,.sidebar button.active,.related-item.active,.verb-item.active) {background:var(--rvn-accent);color:#fff;box-shadow:none;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .related-item.active :is(strong,small,span) {color:#fff;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .sentence-top {flex-wrap:wrap;padding:0;gap:12px;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .sentence-top > span {flex:1 0 100%;min-width:0;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .sentence-badges {flex-wrap:wrap;max-width:calc(100% - 50px);margin:0;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .sentence-badges span {white-space:nowrap;overflow-wrap:normal;word-break:normal;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .repeat-console :is(h2,label,.session-progress,.repeat-console-head p,.audio-status) {color:var(--rvn-ink);}
body.rvn-platform[data-rvn-section="verbos-inmersos"] :is(.mode-card p,.related-item small,.session-progress > div:last-child) {color:var(--rvn-muted);}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .mode-card button {background:var(--rvn-accent);color:#fff;border-color:var(--rvn-accent);min-height:42px;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .session-progress strong {color:var(--rvn-accent);}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .progress-ring {background:radial-gradient(circle,var(--rvn-paper) 55%,transparent 57%),conic-gradient(var(--rvn-accent) var(--p),#d8dfd1 0);color:var(--rvn-ink);border-color:var(--rvn-line);}
body.rvn-platform .rvn-lesson :is(.cv-bubble,.dp-bubble,.hi-para-card,.sf-question) {border-color:#92ac9440;}
body.rvn-platform[data-rvn-section="canciones"] .cn-lyric-line {color:var(--rvn-surface-muted);}
body.rvn-platform[data-rvn-section="canciones"] .cn-lyric-line.active {color:var(--rvn-surface-ink);background:#8da99120;}
body.rvn-platform[data-rvn-section="rivi"] .rvn-no-teacher {margin-top:18px;}
body.rvn-platform[data-rvn-section="rivi"] .rvn-toolbar {padding:10px 16px;background:var(--rvn-paper);border-radius:16px;}
body.rvn-platform[data-rvn-section="rivi"] .rvn-lesson :is(.prompt,.target,.kicker) {color:var(--rvn-surface-ink);}
body.rvn-platform[data-rvn-section="rivi"] .rvn-lesson .translation {color:var(--rvn-surface-es);}
body.rvn-platform[data-rvn-section="rivi"] .rvn-lesson .exercise-stage {background:transparent;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .rvn-lesson #englishSentence {color:var(--rvn-surface-ink);overflow-wrap:anywhere;}
body.rvn-platform[data-rvn-section="verbos-inmersos"] .rvn-lesson #spanishSentence {color:var(--rvn-surface-es);overflow-wrap:anywhere;}
body.rvn-platform .rvn-lesson .sf-turn-cue.idle {color:#2f5b4e;background:#edf2e7;}
body.rvn-platform .sf-free-notice {color:#976021;}
body.rvn-platform .rvn-lesson .rvn-actions {position:static;}
/* Identidad común en portadas y cuenta; sus interacciones permanecen propias. */
body.rvn-platform[data-rvn-family="shell"] :is(.auth-card,.auth-container,.profile-card,.plan-card) {border-color:var(--rvn-line);}
@media(min-width:901px) {
  body.rvn-platform .rvn-lesson {overflow-wrap:anywhere;}
}
@media(max-width:1100px) {
  body.rvn-platform[data-rvn-section="rivi"] .layout {grid-template-columns:minmax(0,1fr);}
  body.rvn-platform[data-rvn-section="rivi"] :is(.layout > main,.layout > aside) {min-width:0;}
  body.rvn-platform :is([class$="-nav-inner"],[class$="-nav-left"],[class$="-nav-right"]) {min-width:0;max-width:100%;flex-wrap:wrap;}
  body.rvn-platform [class$="-nav-inner"] {height:auto;min-height:62px;gap:10px;padding-block:12px;}
  body.rvn-platform [class$="-nav-right"] {gap:8px;}
  body.rvn-platform .rvn-stage {grid-template-columns:minmax(0,1fr) 130px;gap:16px;padding:22px;}
  body.rvn-platform[data-rvn-view="tutor"] .rvn-stage {grid-template-columns:160px minmax(0,1fr);gap:20px;}
  body.rvn-platform .rvn-toolbar {flex-wrap:wrap;}
}
@media(max-width:900px) {
  body.rvn-platform[data-rvn-section="clases"] > .cl-layout {grid-template-columns:minmax(0,1fr);}
  body.rvn-platform[data-rvn-section="clases"] > .cl-layout > .rvn-toolbar {grid-column:1;grid-row:1;}
  body.rvn-platform[data-rvn-section="clases"] > .cl-layout > .rvn-stage {grid-column:1;grid-row:2;}
}
@media(max-width:700px) {
  body.rvn-platform :is([class$="-nav-inner"],[class$="-nav-left"],[class$="-nav-right"]) {min-width:0;max-width:100%;flex-wrap:wrap;}
  body.rvn-platform [class$="-nav-inner"] {width:100%;height:auto;gap:10px;padding:12px;}
  body.rvn-platform [class$="-nav-right"] {justify-content:center;gap:7px;}
  body.rvn-platform [class$="-user-chip"] > span {display:none;}
  body.rvn-platform :is([class$="-controls-row"],[class$="-audio-row"],[class$="-ctrl-row"]) {flex-wrap:wrap;min-width:0;gap:10px;}
  body.rvn-platform :is([class$="-mode-toggle"],[class$="-mode-group"]) {display:flex;flex-wrap:wrap;flex:1 0 100%;width:100%;min-width:0;justify-content:center;}
  body.rvn-platform :is([class$="-mode-toggle"],[class$="-mode-group"]) > button {flex:1 1 40%;min-width:0;min-height:40px;}
  body.rvn-platform .vc-mode-pill {display:flex;flex-wrap:wrap;flex:1 0 100%;width:100%;min-width:0;}
  body.rvn-platform .vc-mode-pill > button {flex:1 1 40%;min-width:0;min-height:40px;}
  body.rvn-platform .vc-range-controls {grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);min-width:0;}
  body.rvn-platform .vc-range-title {grid-column:1 / 4;white-space:normal;}
  body.rvn-platform .vc-current-voc {grid-column:4;min-width:0;}
  body.rvn-platform #vcRangeInfo {min-width:0;overflow-wrap:anywhere;}
  body.rvn-platform .rvn-toolbar {display:block;margin-bottom:16px;}
  body.rvn-platform .rvn-intro {display:none;}
  body.rvn-platform .rvn-view-switch {width:100%;border-radius:13px;}
  body.rvn-platform .rvn-view-switch button {flex:1;min-width:0;padding:10px 6px;font-size:.7rem;gap:5px;}
  body.rvn-platform .rvn-stage,
  body.rvn-platform .rvn-stage.rvn-long-copy,
  body.rvn-platform[data-rvn-view="cuaderno"] .rvn-stage,
  body.rvn-platform[data-rvn-view="tutor"] .rvn-stage,
  body.rvn-platform[data-rvn-view="tutor"] .rvn-stage.rvn-long-copy {
    grid-template-columns:minmax(0,1fr);gap:12px;padding:17px;border-width:6px;border-radius:12px;
  }
  body.rvn-platform .rvn-teacher {grid-row:1;grid-column:1;justify-self:end;width:78px;}
  body.rvn-platform .rvn-teacher img {max-height:100px;}
  body.rvn-platform .rvn-teacher figcaption {display:none;}
  body.rvn-platform .rvn-lesson {grid-row:2;grid-column:1;padding:0;}
  body.rvn-platform[data-rvn-view="tutor"] .rvn-teacher {grid-row:1;grid-column:1;width:100%;min-height:135px;height:135px;align-items:center;padding:12px;}
  body.rvn-platform[data-rvn-view="tutor"] .rvn-teacher img,
  body.rvn-platform[data-rvn-view="tutor"] .rvn-long-copy .rvn-teacher img {width:105px;height:118px;max-height:118px;}
  body.rvn-platform[data-rvn-view="tutor"] .rvn-lesson {grid-row:2;grid-column:1;}
  body.rvn-platform .rvn-stage.rvn-no-teacher .rvn-lesson {grid-row:1;}
  body.rvn-platform[data-rvn-view="cuaderno"] .rvn-stage {border:1px solid #d4c7a9;border-left:8px solid #7d9872;padding-left:21px;background:#fcf7e9;}
  body.rvn-platform[data-rvn-view="cuaderno"] .rvn-stage::before {left:-13px;width:18px;}
  body.rvn-platform[data-rvn-family="card"][data-rvn-view="cuaderno"] .rvn-lesson #cardBodyLectura:not([style*="none"]) {grid-template-columns:minmax(0,1fr);gap:22px;}
  body.rvn-platform[data-rvn-family="card"][data-rvn-view="cuaderno"] .rvn-lesson #cardBodyLectura > :is(#cardEs,#cardWhen) {grid-column:1;grid-row:auto;}
  body.rvn-platform .rvn-actions {grid-template-columns:repeat(min(var(--rvn-action-count,3),3),minmax(0,1fr));}
  body.rvn-platform .rvn-actions > button {font-size:.66rem;min-height:44px;padding:8px 4px;}
  body.rvn-platform .rvn-lesson :is(#cardEn,#cardPhrase,#sfEn) {font-size:var(--mod-font-en,1.2rem);}
  body.rvn-platform .rvn-lesson :is(#cardEs,#cardWhen,#sfEs) {font-size:var(--mod-font-es,1.06rem);}
  body.rvn-platform[data-rvn-section="clases"] .rvn-stage {margin:12px;max-width:calc(100% - 24px);}
  body.rvn-platform[data-rvn-section="clases"] .rvn-toolbar {padding:12px;margin:0;}
}
@media(prefers-reduced-motion:reduce) {body.rvn-platform .rvn-stage,body.rvn-platform .rvn-view-switch button {transition:none;}}


/* ================================================================
   AULA / CUADERNO · October 2026
   Scoped presentation layer. Original styles above remain available.
   ================================================================ */
body.fs-studio {
    --studio-paper: #fbf8f0;
    --studio-ink: #193b35;
    --studio-muted: #6b7c71;
    --studio-accent: #176961;
    --studio-line: #d8dfd1;
    --studio-tint: #e7eee3;
    --studio-board: #143e39;
    --bg-darker: #f2ecdf;
    --bg-dark: #fbf8f0;
    --bg-input: #fffdf8;
    --text-primary: #193b35;
    --text-main: #193b35;
    --text-secondary: #39564b;
    --text-muted: #6b7c71;
    --primary: #176961;
    --primary-light: #176961;
    --primary-glow: #17696112;
    --border: #d8dfd1;
    --border-hover: #7a9b85;
    --premium-gold: #976021;
    background: radial-gradient(ellipse at 5% 0%, #fffdf5 0, transparent 55%), #f2ecdf;
    color: var(--studio-ink);
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}
body.fs-studio[data-fs-view="cuaderno"] { --studio-accent: #315c46; --primary: #315c46; --primary-light: #315c46; }
/* Theme choices tint the surroundings; paper and board keep readable contrast. */
html[data-theme="verde-esmeralda"] body.fs-studio { --studio-tint: #e1efdf; }
html[data-theme="acero-metalico"] body.fs-studio { --studio-tint: #e2edf0; }
html[data-theme="naranja-volcan"] body.fs-studio { --studio-tint: #f8e5d3; }
html[data-theme="claro-profesional"] body.fs-studio { --studio-tint: #f1f3ee; }
html[data-theme="oro-negro"] body.fs-studio { --studio-tint: #f5edce; }
html[data-theme="lima-acido"] body.fs-studio { --studio-tint: #eaf2d2; }
html[data-theme="purpura-oscuro"] body.fs-studio { --studio-tint: #eee3f0; }
html[data-theme="rojo-carbon"] body.fs-studio { --studio-tint: #f5e2df; }
html[data-theme="cian-profundo"] body.fs-studio { --studio-tint: #def0eb; }
body.fs-studio *, body.fs-studio *::before, body.fs-studio *::after { box-sizing: border-box; }
body.fs-studio button, body.fs-studio input, body.fs-studio select, body.fs-studio textarea { font-family: inherit; }
body.fs-studio button:focus-visible, body.fs-studio a:focus-visible, body.fs-studio [tabindex]:focus-visible { outline: 3px solid #dd9d40; outline-offset: 4px; }
body.fs-studio [hidden] { display: none !important; }
body.fs-studio .fs-nav { background: #fbf8f0f2; border-color: var(--studio-line); backdrop-filter: blur(18px); }
body.fs-studio .fs-nav-inner { max-width: 1600px; height: 70px; padding-inline: 28px; }
body.fs-studio .fs-logo { font-size: 1.05rem; letter-spacing: -.035em; color: var(--studio-ink); }
body.fs-studio .fs-logo span { color: var(--studio-ink); }
body.fs-studio .fs-logo .fs-logo-rvn { color: var(--studio-accent); }
body.fs-studio .fs-logo-icon { font-size: 1.3rem; }
body.fs-studio .fs-breadcrumb { font-size: .67rem; }
body.fs-studio .fs-immersive-back { background: transparent; border-color: var(--studio-line); color: var(--studio-ink); margin-left: auto; }
body.fs-studio .fs-user-chip, body.fs-studio .fs-avatar, body.fs-studio .font-switcher, body.fs-studio .theme-dot-nav, body.fs-studio .fs-logout { background: #fffdf8; border-color: var(--studio-line); }
body.fs-studio .fs-avatar { background: var(--studio-accent); color: white; border: 0; }
body.fs-studio .nav-plan-premium { background: #ffedc7; color: #9a6415; border-color: #e9c890; }
body.fs-studio .theme-panel-float { top: 78px; box-shadow: 0 16px 50px #213d3026; }
body.fs-studio .fs-layout { display: flex; flex-direction: column; max-width: 1600px; margin: auto; min-height: calc(100vh - 70px); padding: 0 28px 28px; }
body.fs-studio .fs-main { order: 1; padding: 22px 0 0; gap: 14px; min-height: 0; overflow: visible; min-width: 0; }
body.fs-studio .fs-studio-toolbar { order: -5; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
body.fs-studio .fs-studio-caption { display: flex; flex-direction: column; gap: 3px; font-size: .76rem; color: var(--studio-muted); }
body.fs-studio .fs-studio-eyebrow { font-size: .58rem; font-weight: 800; letter-spacing: .16em; color: var(--studio-accent); }
body.fs-studio .fs-view-switch { display: flex; background: #e7e7dc; border: 1px solid #d7dacd; border-radius: 16px; padding: 4px; gap: 3px; flex-shrink: 0; }
body.fs-studio .fs-view-switch button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 30px; border: 0; border-radius: 12px; background: transparent; color: #526252; font-weight: 700; font-size: .83rem; cursor: pointer; }
body.fs-studio .fs-view-switch button[aria-pressed="true"] { background: var(--studio-accent); color: #fffef4; box-shadow: 0 3px 9px #193b3526; }
body.fs-studio .fs-content-header { order: -4; padding: 0; align-items: center; gap: 13px; }
body.fs-studio .fs-content-title-block { flex: 1; min-width: 0; }
body.fs-studio .fs-cat-name { font-size: clamp(1.5rem, 2.5vw, 2.35rem); color: var(--studio-ink); letter-spacing: -.045em; overflow-wrap: anywhere; }
body.fs-studio .fs-cat-desc { color: var(--studio-muted); font-size: .7rem; margin-top: 4px; }
body.fs-studio .fs-list-btn { display: flex !important; width: 42px; height: 42px; background: var(--studio-paper); border-color: var(--studio-line); border-radius: 12px; color: var(--studio-accent); flex-shrink: 0; }
body.fs-studio .fs-stat-pills { gap: 7px; flex-wrap: wrap; }
body.fs-studio .fs-stat-pill { background: #fcfaf4; color: var(--studio-ink); border-color: var(--studio-line); font-size: .7rem; }
body.fs-studio .fs-stat-pill.accent { color: var(--studio-accent); border-color: #b5caba; background: #e4eee4; }
body.fs-studio .fs-stat-pill.ok { color: #277a43; background: #e7efdd; border-color: #c7d9bf; }
body.fs-studio .fs-stat-pill.err { color: #ad4030; background: #f9e7de; border-color: #e6c8bc; }
body.fs-studio .fs-studio-modes { order: -3; display: flex; align-items: center; justify-content: center; min-width: 0; }
body.fs-studio:not(.fs-lesson-ready) .fs-studio-modes { display: none; }
body.fs-studio .fs-mode-group { margin: 0; width: auto; display: flex; border: 1px solid var(--studio-line); background: #fcfaf5; padding: 4px; border-radius: 14px; gap: 4px; overflow: visible; }
body.fs-studio .fs-mode-opt { min-height: 42px; padding: 9px 23px; border: 0; border-radius: 10px; background: transparent; color: #647365; font-size: .76rem; white-space: nowrap; }
body.fs-studio .fs-mode-opt.active { color: #fffef4; background: var(--studio-accent); }
body.fs-studio .fs-cat-banner { order: -2; min-height: 0; background: transparent; border: 0; padding: 0 2px; color: var(--studio-muted); font-size: .65rem; }
body.fs-studio .fs-banner-count { background: var(--studio-paper); border-color: var(--studio-line); color: var(--studio-ink); font-size: .62rem; }
body.fs-studio .fs-progress-wrap { order: -1; padding: 0; }
body.fs-studio .fs-prog-bar { height: 4px; background: #d4ddcf; }
body.fs-studio .fs-prog-fill { background: var(--studio-accent); box-shadow: none; }
body.fs-studio .fs-prog-label { color: var(--studio-muted); font-size: .65rem; }
body.fs-studio .fs-card-area { order: 0; gap: 12px; }
body.fs-studio .fs-card-stack { min-height: 0 !important; }
body.fs-studio .fs-card-bg { display: none; }
body.fs-studio .fs-main-card {
    display: grid !important; grid-template-columns: minmax(0, 1fr) clamp(200px, 22vw, 300px);
    grid-template-areas: 'top top' 'lesson teacher' 'transcript transcript' 'steps steps';
    align-items: center; gap: 22px 14px; padding: 26px 30px 22px !important;
    min-height: 390px !important; max-height: none !important; overflow: visible;
    background: radial-gradient(ellipse at 35% 0, #27554c 0, transparent 65%), linear-gradient(120deg, #173f39, #10342f);
    border: 10px solid #b9834e; border-radius: 12px;
    outline: 1px solid #92673b; outline-offset: 0;
    box-shadow: inset 0 0 0 2px #8e6130, inset 0 2px 24px #00180f55, 0 3px 0 #e0b77d, 0 14px 32px #43351b1c;
    color: #fffdf0;
}
body.fs-studio .fs-main-card::before { display: none; }
body.fs-studio .fs-main-card:hover { transform: none; box-shadow: inset 0 0 0 2px #8e6130, inset 0 2px 24px #00180f55, 0 3px 0 #e0b77d, 0 14px 32px #43351b1c; }
body.fs-studio .fs-card-top { grid-area: top; flex-wrap: wrap; gap: 10px; }
body.fs-studio .fs-card-top-left { flex-wrap: wrap; gap: 7px; }
body.fs-studio .fs-card-tense { font-size: .6rem; letter-spacing: .1em; color: #bad5bf; }
body.fs-studio .fs-card-counter { color: #c2d7bf; }
body.fs-studio .fs-repeat-counter, body.fs-studio .fs-pencil-toggle, body.fs-studio .fs-export-btn { color: #f8f5df; background: #ffffff0d; border-color: #abc7b24d; min-width: 29px; min-height: 29px; }
body.fs-studio .fs-export-excel { color: #b7ecc5; }
body.fs-studio .fs-export-ppt { color: #ffc395; }
body.fs-studio .fs-export-html { color: #d9c1ef; }
body.fs-studio .fs-sub-toggle { background: #428b6e; }
body.fs-studio .fs-card-body { grid-area: lesson; min-width: 0; max-height: none !important; overflow: visible; gap: 22px; padding: 0; justify-content: center !important; }
body.fs-studio .fs-reading-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
body.fs-studio .fs-card-en { color: #fffdf0; font-size: var(--mod-font-en, clamp(1.65rem, 2.9vw, 2.9rem)) !important; line-height: 1.36 !important; letter-spacing: -.025em; font-weight: 600; max-width: none; text-shadow: none; text-wrap: pretty; overflow-wrap: anywhere; }
body.fs-studio .fs-card-es { color: #f2dfad; font-size: var(--mod-font-es, clamp(1.12rem, 1.8vw, 1.7rem)) !important; line-height: 1.6 !important; max-width: none; overflow-wrap: anywhere; }
body.fs-studio .fs-card-divider { background: #b9d6bd40; flex-shrink: 0; }
body.fs-studio .fs-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 0; }
body.fs-studio .fs-meta-verbo, body.fs-studio .fs-meta-patron, body.fs-studio .fs-tag { color: #d0dfc9; background: #ffffff0a; border: 1px solid #c6dbbf2e; }
body.fs-studio .fs-virtual-teacher { grid-area: teacher; position: relative; align-self: end; justify-self: end; width: 100%; max-width: 300px; margin: 0; isolation: isolate; }
body.fs-studio .fs-virtual-teacher img { display: block; width: 100%; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 12px 12px #00170e36); }
body.fs-studio .fs-teacher-halo { position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; bottom: 35px; left: 7%; background: #9ec5a311; border: 1px solid #cce2b611; }
body.fs-studio .fs-virtual-teacher figcaption { display: flex; justify-content: center; align-items: center; gap: 7px; color: #c5dbc4; font-size: .55rem; letter-spacing: .06em; padding: 12px 4px 0; }
body.fs-studio .fs-teacher-dot { width: 5px; height: 5px; border-radius: 50%; background: #b8d18c; }
body.fs-studio .fs-main-card.fs-long-copy { grid-template-columns: minmax(0, 1fr) 160px; }
body.fs-studio .fs-long-copy .fs-card-en { font-size: var(--mod-font-en, clamp(1.2rem, 2vw, 1.95rem)) !important; line-height: 1.55 !important; }
body.fs-studio .fs-long-copy .fs-card-es { font-size: var(--mod-font-es, clamp(1.05rem, 1.6vw, 1.5rem)) !important; }
body.fs-studio .fs-story-copy .fs-card-en { font-size: var(--mod-font-en, 1.2rem) !important; }
body.fs-studio .fs-story-copy .fs-card-es { font-size: var(--mod-font-es, 1.08rem) !important; }
body.fs-studio .fs-card-step-nav { grid-area: steps; margin-top: 0; gap: 12px; flex-wrap: wrap; }
body.fs-studio .fs-card-step-btn { border-color: #9cbda96b; color: #fff7d9; background: #ffffff0b; border-radius: 50%; width: 46px; height: 46px; }
body.fs-studio .fs-card-step-btn:hover:not(:disabled) { background: #ffffff19; border-color: #e3e5be; }
body.fs-studio .fs-card-step-position { color: #bcd1bc; }
body.fs-studio .fs-card-practice-mic { background: #ecead9; color: #175449; margin-left: 6px; }
body.fs-studio .fs-card-practice-mic.listening { color: white; background: #b34838; border-color: #d77055; }
body.fs-studio .fs-practice-transcript { grid-area: transcript; color: #fff7dc; background: #ffffff0b; border-color: #a9c6b64d; margin: 0; width: 100%; }
body.fs-studio .fs-practice-transcript-label { color: #e4d5a2; }
body.fs-studio .fs-esc-input { color: #fff7df; background: #ffffff0b; border-color: #b3d0ba6b; min-height: 105px; font-size: 1rem; }
body.fs-studio .fs-esc-input::placeholder { color: #bacbc1; }
body.fs-studio .fs-card-animo { color: #e4dbac; }
body.fs-studio .fs-mic-goal { color: #e0e4ca; }
body.fs-studio .fs-mic-goal select { color: #193b35; background: #f6f2e5; border-color: #b8c8b8; }
body.fs-studio .fs-mic-btn, body.fs-studio .fs-pencil-action { background: #f3efda; color: #24574a; border-color: #c6d3b8; }
body.fs-studio .fs-studio-verify { padding: 10px 18px; border: 1px solid #a4c3aa; border-radius: 12px; background: #f1e8c8; color: #214f42; cursor: pointer; font-weight: 700; }
body.fs-studio .fs-nav-btns { display: flex; gap: 8px; border: 1px solid #d7d8c9; padding: 9px; border-radius: 17px; background: #fbf8f0; box-shadow: 0 4px 14px #42391908; }
body.fs-studio .fs-btn-nav { color: var(--studio-accent); background: #f0f1e7; border-color: #d9dfd0; border-radius: 12px; min-height: 44px; padding: 10px 17px; font-size: .75rem; }
body.fs-studio .fs-nav-btns .fs-btn-auto { background: var(--studio-accent); color: #fffdf1; flex: 1; width: auto; }
body.fs-studio .fs-btn-stop { color: #9b4031; background: #f6e7dc; }
body.fs-studio .fs-nav-btns-2 { display: flex; gap: 8px; align-items: stretch; }
body.fs-studio .fs-autosig-control { flex: 1; grid-template-columns: 145px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
body.fs-studio .fs-btn-autosig-big, body.fs-studio .fs-btn-autosig-stop { color: var(--studio-accent); background: #e5ebdf; border-color: #c4d0ba; border-radius: 12px; min-height: 44px; }
body.fs-studio .fs-btn-autosig-big.active { background: #285d49; color: #fff; }
body.fs-studio .fs-autosig-bound { font-size: .62rem; gap: 3px; }
body.fs-studio .fs-autosig-bound select { background: #fffdf7; color: var(--studio-ink); font-size: .7rem; border-color: #d2d9ca; height: 38px; }
body.fs-studio .fs-settings-wrap { order: 5; margin-top: 2px; }
body.fs-studio:not(.fs-lesson-ready) .fs-settings-wrap { display: none; }
body.fs-studio .fs-settings-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; color: var(--studio-ink); background: var(--studio-tint); border: 1px solid var(--studio-line); padding: 13px 18px; border-radius: 14px 14px 0 0; font-size: .75rem; font-weight: 600; cursor: pointer; }
body.fs-studio .fs-settings-toggle span { display: flex; gap: 10px; align-items: center; }
body.fs-studio .fs-settings-toggle > i { display: none; }
body.fs-studio #fsControlsPanel { gap: 12px; padding: 16px; background: #fbf8f0; border: 1px solid var(--studio-line); border-top: 0; box-shadow: none; border-radius: 0 0 14px 14px; overflow: visible; }
body.fs-studio .fs-progressive-range { padding: 0 !important; background: transparent; border: 0 !important; gap: 14px; }
body.fs-studio .fs-progressive-field { color: #5b6d5b; font-size: .68rem; }
body.fs-studio .fs-progressive-field .fs-rango-input { color: #254c40; background: #fffdf7; border: 1px solid #ccd8c7; height: 43px; font-size: .9rem; border-radius: 10px; text-align: center; }
body.fs-studio .fs-controls-audio { border-top: 1px solid #dce1d3; padding-top: 12px; justify-content: flex-start; }
body.fs-studio .fs-audio-group { gap: 10px; }
body.fs-studio .fs-select { color: #2b5345; background: #fffdf7; border-color: #ccd8c7; min-height: 39px; }
body.fs-studio .fs-progressive-status { color: #73846b; font-size: .63rem; }
body.fs-studio .fs-progressive-track { height: 4px; background: #e2e8d7; }
body.fs-studio .fs-progressive-track i { background: #679271; }
/* The original category nodes are a horizontal shelf, not a second sidebar. */
body.fs-studio .fs-sidebar { order: 2; position: static; top: auto; height: auto; max-height: none; min-width: 0; background: transparent; border: 0; display: flex !important; flex-direction: column; gap: 10px; overflow: visible; margin-top: 22px; }
body.fs-studio .fs-sidebar-header { padding: 0; border: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(200px, 320px); gap: 16px; align-items: center; }
body.fs-studio .fs-back-btn { font-size: .65rem; }
body.fs-studio .fs-area-label { color: var(--studio-ink); font-size: .75rem; }
body.fs-studio .fs-area-total { color: var(--studio-accent); font-size: .6rem; }
body.fs-studio .fs-area-emoji { font-size: 1.1rem; }
body.fs-studio .fs-search-wrap input { background: #fffcf5; color: var(--studio-ink); border-color: #d2d9c7; border-radius: 11px; min-height: 40px; font-size: .7rem; }
body.fs-studio #fsCatList { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 12px; scrollbar-color: #b6c3a7 transparent; scrollbar-width: thin; flex: auto; }
body.fs-studio #fsCatList .fs-cat-item { position: relative; flex: 0 0 180px; min-height: 66px; padding: 11px 14px; background: var(--studio-paper); border: 1px solid #d3d9c7; border-radius: 11px 11px 5px 5px; box-shadow: 0 3px 0 #d0c4a7; }
body.fs-studio #fsCatList .fs-cat-item:nth-child(3n+2) { background: #f4ebe0; }
body.fs-studio #fsCatList .fs-cat-item:nth-child(3n+3) { background: #e7eddf; }
body.fs-studio #fsCatList .fs-cat-item.active { background: var(--studio-accent); border-color: var(--studio-accent); box-shadow: 0 3px 0 #0e4436; }
body.fs-studio .fs-cat-name-sb { color: var(--studio-ink); font-size: .72rem; }
body.fs-studio .fs-cat-count { color: var(--studio-muted); font-size: .59rem; }
body.fs-studio .fs-cat-item.active .fs-cat-name-sb, body.fs-studio .fs-cat-item.active .fs-cat-count { color: #fffced; }
body.fs-studio .fs-resume-banner { margin: 0; background: #e3eddd; border-color: #b7c9a6; color: #3d6948; font-size: .68rem; }
body.fs-studio .fs-resume-btn { background: var(--studio-accent); }
body.fs-studio .fs-fab { display: none !important; }
body.fs-studio .fs-bottom-sheet { background: var(--studio-paper); border-color: var(--studio-line); color: var(--studio-ink); border-radius: 24px 24px 0 0; visibility: hidden; }
body.fs-studio .fs-bottom-sheet.open { visibility: visible; }
body.fs-studio .fs-sheet-title { color: var(--studio-ink); }
body.fs-studio .fs-sheet-search input { background: #fffcf5; color: var(--studio-ink); border-color: var(--studio-line); }
body.fs-studio .fs-sheet-cat-list .fs-cat-item { border-radius: 10px; margin: 3px 8px; }
body.fs-studio .fs-sheet-cat-list .fs-cat-item.active { background: var(--studio-accent); border: 0; }
body.fs-studio .fs-sheet-cat-list .fs-cat-item.active .fs-cat-count { color: #e5efdb; }
body.fs-studio .fs-empty-state { padding-block: 45px; }
body.fs-studio .fs-empty-state h2 { color: var(--studio-ink); }
body.fs-studio .fs-toast { color: #fff8e8; background: #245449; border-color: #619777; }
body.fs-studio .sb-pregunta-inline { color: #d6e3b6; }
/* CUADERNO: use the same content nodes and a two-page reading grid. */
body.fs-studio[data-fs-view="cuaderno"] .fs-main-card {
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-template-areas: 'top top' 'lesson lesson' 'transcript transcript' 'steps teacher';
    gap: 20px; border: 1px solid #d8caae; border-left: 16px solid #72826a;
    outline: 0; border-radius: 12px 24px 24px 12px; padding: 28px 34px 22px 38px !important;
    background: linear-gradient(90deg, transparent calc(50% - 8px), #c8b99b44 50%, transparent calc(50% + 8px)), repeating-linear-gradient(0deg, #b59f7410 0, #b59f7410 1px, transparent 1px, transparent 4px), #fcf7e9;
    box-shadow: 0 4px 0 #e5d7b9, 0 7px 0 #b6ab8b, 0 16px 30px #51402a1c;
    color: #193e30;
}
body.fs-studio[data-fs-view="cuaderno"] .fs-main-card::before { display: block; content: ''; position: absolute; inset: 15px auto 15px -23px; width: 28px; background: repeating-linear-gradient(0deg, transparent 0, transparent 29px, #a19166 30px, #ded1a9 33px, #8b7b52 35px, transparent 36px, transparent 64px); z-index: 3; opacity: 1; mask-image: none; border-radius: 4px; pointer-events: none; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-en { color: #214b37; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-es { color: #994b2d; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-tense, body.fs-studio[data-fs-view="cuaderno"] .fs-card-counter, body.fs-studio[data-fs-view="cuaderno"] .fs-card-step-position { color: #6a7b5e; }
body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 62px; row-gap: 22px; align-items: start; }
body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy #cardEn { grid-column: 1; grid-row: 2; }
body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy #cardEs { grid-column: 2; grid-row: 2; }
body.fs-studio[data-fs-view="cuaderno"] #cardEn::before, body.fs-studio[data-fs-view="cuaderno"] #cardEs::before { display: block; font: 700 .62rem 'Poppins', sans-serif; letter-spacing: .14em; margin-bottom: 16px; color: #738161; }
body.fs-studio[data-fs-view="cuaderno"] #cardEn::before { content: 'INGLÉS'; }
body.fs-studio[data-fs-view="cuaderno"] #cardEs::before { content: 'ESPAÑOL'; color: #a97450; }
body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy > .fs-card-divider { display: none; }
body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy .sb-pregunta-inline { grid-column: 1 / -1; grid-row: 1; color: #49764c; }
body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy .fs-card-meta { grid-column: 1 / -1; grid-row: 3; }
body.fs-studio[data-fs-view="cuaderno"] .fs-meta-verbo, body.fs-studio[data-fs-view="cuaderno"] .fs-meta-patron, body.fs-studio[data-fs-view="cuaderno"] .fs-tag { color: #587144; background: #ecedda; border-color: #d7dfc5; }
body.fs-studio[data-fs-view="cuaderno"] .fs-virtual-teacher { max-width: 150px; }
body.fs-studio[data-fs-view="cuaderno"] .fs-virtual-teacher figcaption { color: #637252; padding-top: 5px; font-size: .5rem; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-step-btn { background: #e5e9d9; color: #3b6049; border-color: #ccd4b9; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-practice-mic { background: #386a50; color: #fff; }
body.fs-studio[data-fs-view="cuaderno"] .fs-repeat-counter, body.fs-studio[data-fs-view="cuaderno"] .fs-pencil-toggle, body.fs-studio[data-fs-view="cuaderno"] .fs-export-btn { color: #5c6b4c; background: #eeebdc; border-color: #d9d9c2; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-divider { background: #c8ccb4; }
body.fs-studio[data-fs-view="cuaderno"] .fs-esc-input { color: #274e39; background: #fffdf5; border-color: #b9c6a7; }
body.fs-studio[data-fs-view="cuaderno"] .fs-esc-input::placeholder { color: #859079; }
body.fs-studio[data-fs-view="cuaderno"] .fs-card-animo, body.fs-studio[data-fs-view="cuaderno"] .fs-mic-goal { color: #66834e; }
body.fs-studio[data-fs-view="cuaderno"] .fs-practice-transcript { background: #e9eedc; color: #294c37; border-color: #c4d3b1; }
body.fs-studio[data-fs-view="cuaderno"] .fs-practice-transcript-label { color: #63834b; }
body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-subs-hidden .fs-reading-copy { grid-template-columns: minmax(0, 1fr); }
body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-subs-hidden #cardEs { display: none; }
body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-subs-hidden { background: #fcf7e9; }
@media (min-width: 701px) {
    body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-reading-view:not(.fs-long-copy) {
        grid-template-columns: minmax(0, 1fr) clamp(230px, 27vw, 360px);
        grid-template-areas: 'top top' 'lesson teacher' 'transcript transcript' 'steps steps';
    }
    body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-reading-view:not(.fs-long-copy) .fs-reading-copy { display: flex; flex-direction: column; gap: 22px; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-reading-view:not(.fs-long-copy) .fs-reading-copy > .fs-card-divider { display: block; width: 100%; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-main-card.fs-reading-view:not(.fs-long-copy) .fs-virtual-teacher { max-width: 360px; }
}
/* Primary-school image support keeps its original single shared image node. */
body.fs-studio #cardBodyLectura.fs-has-image { grid-template-columns: minmax(0, 1fr) minmax(140px, 220px); gap: 24px; }
body.fs-studio[data-fs-view="cuaderno"] #cardBodyLectura.fs-has-image { display: flex; flex-direction: column; }
body.fs-studio[data-fs-view="cuaderno"] #cardBodyLectura.fs-has-image .fs-reading-copy { display: grid; width: 100%; }
body.fs-studio .fs-card-visual { border-color: #becdbf; border-radius: 14px; background: #edf0de; width: 100%; }
/* Mini-histories retain the original internal autoscroll target and behavior. */
body.fs-studio.fs-mh-active .fs-card-body { max-height: 58vh !important; overflow-y: auto; scroll-behavior: auto; padding-right: 12px; }
@media (min-width: 901px) {
    body.fs-studio .fs-layout { grid-template-columns: none; }
    body.fs-studio .fs-card-area { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
    body.fs-studio .fs-breadcrumb { display: none; }
    body.fs-studio .fs-nav-inner { padding-inline: 20px; gap: 12px; }
    body.fs-studio .fs-layout { padding-inline: 20px; }
    body.fs-studio .fs-main-card { grid-template-columns: minmax(0, 1fr) 210px; }
    body.fs-studio .fs-mode-opt { padding-inline: 17px; }
    body.fs-studio .fs-cat-desc { display: none; }
}
@media (max-width: 700px) {
    body.fs-studio .fs-nav-inner { height: auto; min-height: 62px; flex-wrap: wrap; justify-content: space-between; padding: 12px 14px; gap: 10px; }
    body.fs-studio .fs-nav-left { width: 100%; padding: 0; justify-content: center !important; flex: 1 0 100%; }
    body.fs-studio .fs-logo { font-size: .89rem; width: auto; text-align: left; }
    body.fs-studio .fs-logo-icon { display: inline !important; }
    body.fs-studio .fs-nav-right { gap: 8px; width: 100%; justify-content: center; flex-wrap: wrap; }
    body.fs-studio .fs-user-chip > span, body.fs-studio .fs-immersive-back { display: none !important; }
    body.fs-studio .fs-user-chip { padding: 0; border: 0; background: none; }
    body.fs-studio .font-switcher, body.fs-studio .fs-nav-plan { display: flex !important; }
    body.fs-studio .theme-dot-nav { width: 30px; height: 30px; }
    body.fs-studio .fs-layout { padding: 0 12px 22px; }
    body.fs-studio .fs-main { padding: 14px 0 0; gap: 12px; overflow: visible; }
    body.fs-studio .fs-studio-caption { display: none; }
    body.fs-studio .fs-view-switch { width: 100%; border-radius: 14px; }
    body.fs-studio .fs-view-switch button { flex: 1; padding: 10px; font-size: .86rem; min-height: 44px; }
    body.fs-studio .fs-content-header { flex-wrap: wrap; gap: 8px; }
    body.fs-studio .fs-cat-name { font-size: 1.22rem; }
    body.fs-studio .fs-stat-pills { width: 100%; justify-content: flex-start; padding-left: 48px; gap: 6px; }
    body.fs-studio .fs-stat-pill { font-size: .6rem; padding: 4px 9px; }
    body.fs-studio .fs-list-btn { width: 40px; height: 40px; }
    body.fs-studio .fs-studio-modes { justify-content: stretch; }
    body.fs-studio .fs-mode-group { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; width: 100%; margin: 0; padding: 3px; border: 1px solid var(--studio-line); background: var(--studio-paper); }
    body.fs-studio .fs-mode-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 2px; min-height: 52px; font-size: .6rem; }
    body.fs-studio .fs-mode-opt i { font-size: .86rem; }
    body.fs-studio .fs-main-card, body.fs-studio .fs-main-card.fs-long-copy {
        grid-template-columns: minmax(0, 1fr) 92px;
        grid-template-areas: 'top top' 'lesson lesson' 'transcript transcript' 'steps teacher';
        gap: 18px 6px; min-height: 0 !important; padding: 18px 16px 14px !important;
        border-width: 7px; border-radius: 9px;
    }
    body.fs-studio .fs-card-top { gap: 8px; }
    body.fs-studio .fs-card-top-left { gap: 5px; }
    body.fs-studio .fs-card-tense { font-size: .5rem; }
    body.fs-studio .fs-card-counter { font-size: .58rem; }
    body.fs-studio .fs-repeat-counter, body.fs-studio .fs-pencil-toggle, body.fs-studio .fs-export-btn { min-width: 28px; min-height: 30px; font-size: .65rem; }
    body.fs-studio .fs-export-tools { display: flex !important; gap: 4px; }
    body.fs-studio .fs-card-en, body.fs-studio .fs-long-copy .fs-card-en { font-size: var(--mod-font-en, 1.18rem) !important; line-height: 1.6 !important; letter-spacing: -.015em; }
    body.fs-studio .fs-card-es, body.fs-studio .fs-long-copy .fs-card-es { font-size: var(--mod-font-es, 1.06rem) !important; line-height: 1.65 !important; }
    body.fs-studio .fs-story-copy .fs-card-en { font-size: var(--mod-font-en, 1.12rem) !important; }
    body.fs-studio .fs-story-copy .fs-card-es { font-size: var(--mod-font-es, 1.03rem) !important; }
    body.fs-studio .fs-reading-copy { gap: 20px; }
    body.fs-studio .fs-card-body { gap: 18px; padding: 0; }
    body.fs-studio .fs-virtual-teacher { max-width: 92px; }
    body.fs-studio .fs-virtual-teacher figcaption { display: none; }
    body.fs-studio .fs-card-step-nav { justify-content: flex-start; gap: 6px; }
    body.fs-studio .fs-card-step-btn { width: 40px; height: 40px; font-size: .85rem; }
    body.fs-studio .fs-card-step-position { min-width: 36px; font-size: .6rem; }
    body.fs-studio .fs-card-practice-mic { margin-left: 0; }
    body.fs-studio .fs-nav-btns { position: sticky; bottom: 8px; z-index: 12; padding: 7px; margin-top: 0; gap: 7px; box-shadow: 0 5px 24px #2a3d2826; }
    body.fs-studio .fs-btn-nav { min-height: 44px; min-width: 44px; padding: 9px 11px; font-size: .7rem; }
    body.fs-studio .fs-autosig-control { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    body.fs-studio .fs-btn-autosig-big { grid-column: 1 / -1; min-height: 42px; }
    body.fs-studio .fs-autosig-bound select { font-size: .66rem; height: 42px; }
    body.fs-studio .fs-btn-autosig-stop { align-self: start; margin-top: 0; min-width: 40px; }
    body.fs-studio .fs-settings-toggle { border-radius: 13px; min-height: 48px; }
    body.fs-studio .fs-settings-toggle > i { display: inline; transition: transform .15s; }
    body.fs-studio .is-open .fs-settings-toggle { border-radius: 13px 13px 0 0; }
    body.fs-studio .is-open .fs-settings-toggle > i { transform: rotate(180deg); }
    body.fs-studio .fs-settings-wrap:not(.is-open) #fsControlsPanel { display: none !important; }
    body.fs-studio #fsControlsPanel { padding: 13px !important; }
    body.fs-studio .fs-progressive-range { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 !important; }
    body.fs-studio .fs-progressive-field { font-size: .67rem; }
    body.fs-studio .fs-progressive-field .fs-rango-input { min-height: 44px; font-size: .9rem; }
    body.fs-studio .fs-audio-group { display: grid; grid-template-columns: auto minmax(0, 1fr); width: 100%; gap: 8px 12px; overflow: visible; }
    body.fs-studio .fs-audio-group .fs-select { width: 100%; min-height: 44px; }
    body.fs-studio .fs-sidebar { margin-top: 18px; }
    body.fs-studio .fs-sidebar-header { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    body.fs-studio .fs-area-info { order: 0; }
    body.fs-studio .fs-back-btn { order: 3; padding-block: 7px; }
    body.fs-studio .fs-search-wrap { order: 1; }
    body.fs-studio #fsCatList .fs-cat-item { flex-basis: 158px; min-height: 60px; }
    body.fs-studio #fsCatList .fs-cat-name-sb { font-size: .67rem; }
    body.fs-studio .fs-resume-banner { font-size: .65rem; }
    body.fs-studio .fs-toast { bottom: 82px; max-width: calc(100vw - 24px); white-space: normal; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-main-card { padding: 22px 17px 16px 22px !important; border-left-width: 9px; background: repeating-linear-gradient(0deg, #b59f7409 0, #b59f7409 1px, transparent 1px, transparent 4px), #fcf7e9; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-main-card::before { left: -16px; width: 21px; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy { display: flex; flex-direction: column; gap: 22px; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-reading-copy > .fs-card-divider { display: block; width: 100%; }
    body.fs-studio[data-fs-view="cuaderno"] #cardEn::before, body.fs-studio[data-fs-view="cuaderno"] #cardEs::before { margin-bottom: 12px; font-size: .56rem; }
    body.fs-studio[data-fs-view="cuaderno"] .fs-virtual-teacher { max-width: 92px; }
    body.fs-studio #cardBodyLectura.fs-has-image { display: flex; flex-direction: column; align-items: stretch; }
    body.fs-studio[data-fs-view="cuaderno"] #cardBodyLectura.fs-has-image .fs-reading-copy { display: flex; }
    body.fs-studio #cardBodyLectura.fs-has-image .fs-card-visual { width: 160px; align-self: center; order: 0; }
    body.fs-studio.fs-mh-active .fs-card-body { max-height: 65vh !important; padding-right: 8px; }
}
@media (max-width: 380px) {
    body.fs-studio .fs-nav-inner { padding-inline: 10px; }
    body.fs-studio .fs-logo { font-size: .76rem; }
    body.fs-studio .theme-dot-nav { display: none; }
    body.fs-studio .fs-layout { padding-inline: 9px; }
    body.fs-studio .fs-main-card, body.fs-studio .fs-main-card.fs-long-copy { grid-template-columns: minmax(0, 1fr) 64px; padding-inline: 12px !important; }
    body.fs-studio .fs-card-step-btn { width: 36px; height: 40px; }
    body.fs-studio .fs-card-step-nav { gap: 4px; }
    body.fs-studio .fs-card-step-position { min-width: 28px; }
    body.fs-studio .fs-virtual-teacher { max-width: 64px; }
    body.fs-studio .fs-stat-pills { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    body.fs-studio *, body.fs-studio *::before, body.fs-studio *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* V2 · balanced transport and third view: Cara a cara. */
body.fs-studio .fs-nav-btns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%; max-width: 960px; margin-inline: auto;
    align-items: stretch;
}
body.fs-studio .fs-nav-btns.fs-has-stop { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.fs-studio .fs-nav-btns .fs-btn-nav { width: 100%; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 12px; }
body.fs-studio .fs-nav-btns #btnStop[style*="none"] { display: none; }
body.fs-studio .fs-nav-btns-2 { width: 100%; max-width: 960px; margin-inline: auto; }
body.fs-studio .fs-autosig-control { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
body.fs-studio .fs-btn-autosig-big { width: 100%; min-height: 44px; height: 44px; grid-column: auto; }
body.fs-studio .fs-autosig-bound select { height: 44px; }
body.fs-studio .fs-autosig-cycle-status { grid-column: 1 / -1; text-align: center; }
body.fs-studio .fs-view-switch button { padding-inline: 20px; }
body.fs-studio[data-fs-view="tutor"] {
    --studio-accent: #2362d7; --primary: #2362d7; --primary-light: #2362d7;
    --studio-ink: #193558; --studio-muted: #627891;
    --studio-paper: #ffffff; --studio-line: #d9e4f2; --studio-tint: #eaf1ff;
    background: radial-gradient(ellipse at 0 10%, #e6f0ff 0, transparent 60%), #f5f8fd;
}
body.fs-studio[data-fs-view="tutor"] .fs-main-card {
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
    grid-template-areas: 'teacher top' 'teacher lesson' 'teacher transcript' 'teacher steps';
    gap: 20px 34px; padding: 24px 30px 24px 24px !important;
    background: #fff; border: 1px solid #d8e5f5; outline: 0; border-radius: 24px;
    box-shadow: 0 12px 38px #29548912; color: #193558;
}
body.fs-studio[data-fs-view="tutor"] .fs-main-card.fs-long-copy { grid-template-columns: minmax(200px, .6fr) minmax(0, 1.4fr); }
body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher {
    align-self: stretch; justify-self: stretch; max-width: none; min-height: 350px;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
    padding: 36px 12px 16px; border-radius: 18px; overflow: hidden;
    background: radial-gradient(ellipse at 28% 15%, #fff8e9 0, transparent 55%), linear-gradient(145deg, #f6e3c7, #ead5bb 70%, #dfbfa0);
    border: 1px solid #ebdbc4;
}
body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher::before { content: 'ENGLISH ACADEMY'; position: absolute; top: 22px; left: 20px; font-size: .55rem; font-weight: 700; letter-spacing: .16em; color: #9b8063; }
body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher img { width: 100%; max-width: 440px; margin-top: auto; }
body.fs-studio[data-fs-view="tutor"] .fs-teacher-halo { background: #fffaf53d; border-color: #fff7e5; bottom: 20%; }
body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher figcaption { color: #765c40; margin-top: 12px; }
body.fs-studio[data-fs-view="tutor"] .fs-card-en { color: #193558; }
body.fs-studio[data-fs-view="tutor"] .fs-card-es { color: #2362d7; background: #edf4ff; padding: 16px 20px; border-radius: 14px; }
body.fs-studio[data-fs-view="tutor"] .fs-card-divider { background: #dfe8f3; }
body.fs-studio[data-fs-view="tutor"] .fs-card-tense, body.fs-studio[data-fs-view="tutor"] .fs-card-counter, body.fs-studio[data-fs-view="tutor"] .fs-card-step-position { color: #657f9f; }
body.fs-studio[data-fs-view="tutor"] .fs-repeat-counter, body.fs-studio[data-fs-view="tutor"] .fs-pencil-toggle, body.fs-studio[data-fs-view="tutor"] .fs-export-btn { color: #36649b; background: #f3f7fc; border-color: #d8e4f2; }
body.fs-studio[data-fs-view="tutor"] .fs-card-step-btn { color: #2362d7; background: #eff5ff; border-color: #ccdff8; }
body.fs-studio[data-fs-view="tutor"] .fs-card-practice-mic { background: #2362d7; color: #fff; }
body.fs-studio[data-fs-view="tutor"] .fs-card-practice-mic.listening { background: #c94c4c; }
body.fs-studio[data-fs-view="tutor"] .fs-meta-verbo, body.fs-studio[data-fs-view="tutor"] .fs-meta-patron, body.fs-studio[data-fs-view="tutor"] .fs-tag { color: #4e73a0; background: #f0f5fc; border-color: #dce6f4; }
body.fs-studio[data-fs-view="tutor"] .fs-esc-input { color: #193558; background: #f8faff; border-color: #b9d1f1; }
body.fs-studio[data-fs-view="tutor"] .fs-esc-input::placeholder { color: #8296b0; }
body.fs-studio[data-fs-view="tutor"] .fs-card-animo, body.fs-studio[data-fs-view="tutor"] .fs-mic-goal, body.fs-studio[data-fs-view="tutor"] .sb-pregunta-inline { color: #36649b; }
body.fs-studio[data-fs-view="tutor"] .fs-practice-transcript { color: #193558; background: #edf4ff; border-color: #d2e2f9; }
body.fs-studio[data-fs-view="tutor"] .fs-practice-transcript-label { color: #2362d7; }
body.fs-studio[data-fs-view="tutor"] .fs-reading-copy { display: flex; flex-direction: column; }
@media (max-width: 900px) and (min-width: 701px) {
    body.fs-studio[data-fs-view="tutor"] .fs-main-card,
    body.fs-studio[data-fs-view="tutor"] .fs-main-card.fs-long-copy { grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); gap: 20px; padding: 20px !important; }
}
@media (max-width: 700px) {
    body.fs-studio .fs-view-switch button { flex: 1 1 0; min-width: 0; padding: 10px 4px; gap: 5px; font-size: .7rem; }
    body.fs-studio .fs-nav-btns .fs-btn-nav { gap: 6px; min-height: 46px; padding-inline: 5px; font-size: .65rem; }
    body.fs-studio .fs-autosig-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.fs-studio .fs-btn-autosig-big { grid-column: 1 / -1; }
    body.fs-studio[data-fs-view="tutor"] .fs-main-card,
    body.fs-studio[data-fs-view="tutor"] .fs-main-card.fs-long-copy {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'teacher' 'top' 'lesson' 'transcript' 'steps';
        padding: 14px !important; gap: 18px;
    }
    body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher { min-height: 0; height: 175px; padding: 0 14px; flex-direction: row; justify-content: flex-end; align-items: flex-end; }
    body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher::before { content: 'Tu maestro virtual'; top: 45px; left: 18px; max-width: 110px; letter-spacing: 0; font-size: 1rem; line-height: 1.5; color: #876b4e; }
    body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher img { width: 150px; max-width: 55%; margin: 0; }
    body.fs-studio[data-fs-view="tutor"] .fs-virtual-teacher figcaption { display: none; }
    body.fs-studio[data-fs-view="tutor"] .fs-card-es { padding: 14px; }
    body.fs-studio[data-fs-view="tutor"] .fs-card-step-nav { justify-content: center; }
}


/* Primaria adaptations. Keep all seven original actions and Rivi. */
body.fs-primary .rvn-section-back { color: var(--studio-ink); background: var(--studio-paper); border-color: var(--studio-line); min-height: 36px; }
body.fs-primary .fs-sidebar .fs-area-label { margin-left: 0; text-shadow: none; }
body.fs-primary .fs-sidebar .fs-area-total { margin-left: auto; }
body.fs-primary .fs-card-phrase-emoji { grid-column: 1 / -1; grid-row: 1; font-size: 2.5rem; text-align: left; margin: 0; }
body.fs-primary .fs-card-visual img { max-height: 280px; object-fit: contain; background: #f7f4e6; }
body.fs-primary .fs-card-visual { aspect-ratio: auto; max-width: 260px; }
body.fs-primary .fs-primary-filters { width: 100%; border: 1px solid var(--studio-line); padding: 12px; border-radius: 12px; background: var(--studio-paper); }
body.fs-primary .fs-primary-filters summary { font-weight: 600; color: var(--studio-accent); font-size: .75rem; cursor: pointer; min-height: 24px; }
body.fs-primary #fsControlsPanel .fs-primary-filters .fs-controls-row { display: flex !important; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; }
body.fs-primary .fs-primary-filters .fs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
body.fs-primary .fs-primary-filters button { min-height: 36px; }
body.fs-primary #fsControlsPanel .fs-rango-row { display: flex !important; flex-wrap: wrap; padding: 0; gap: 12px; }
body.fs-primary .fs-rango-group { border-color: var(--studio-line); background: #fffdf5; padding: 8px 14px; gap: 12px; min-height: 56px; }
body.fs-primary .fs-rango-label, body.fs-primary .fs-rango-sep { color: var(--studio-muted); }
body.fs-primary .fs-rango-input { background: #f4f5eb; border-color: #bccfbc; color: var(--studio-ink); width: 90px; min-height: 42px; }
body.fs-primary .fs-audio-help-btn { min-width: 40px; min-height: 40px; border: 1px solid var(--studio-line); border-radius: 12px; background: var(--studio-tint); color: var(--studio-accent); }
body.fs-primary .fs-audio-help-content { background: var(--studio-paper); color: var(--studio-ink); border: 1px solid var(--studio-line); box-shadow: 0 20px 70px #1d3e3226; }
body.fs-primary .fs-audio-help-content h3, body.fs-primary .fs-audio-help-label { color: var(--studio-accent); }
body.fs-primary .fs-audio-help-desc { color: var(--studio-ink); }

/* Same visual teacher; Rivi remains its distinct, fully functional action. */
body.fs-primary .fs-card-area { display: flex !important; }
body.fs-primary #riviGradeLauncher {
    order: -1; align-self: flex-end; position: relative; inset: auto;
    display: inline-flex; align-items: center; gap: 8px;
    width: auto; min-height: 48px; padding: 5px 16px 5px 8px;
    border-radius: 16px; transform: none; color: var(--studio-ink);
    border: 1px solid var(--studio-line); background: var(--studio-paper);
    box-shadow: 0 4px 16px #153b3310;
}
body.fs-primary #riviGradeLauncher:hover { transform: translateY(-1px); }
body.fs-primary #riviGradeLauncher svg { width: 38px; height: 38px; margin: 0; filter: none; }
body.fs-primary #riviGradeLauncher .rivi-launcher-copy { display: grid; text-align: left; }
body.fs-primary #riviGradeLauncher .rivi-launcher-copy b { color: var(--studio-accent); font-size: .85rem; }
body.fs-primary #riviGradeLauncher .rivi-launcher-copy small { display: block; color: var(--studio-muted); font-size: .53rem; margin-top: 3px; }
body.fs-primary #riviGradeLauncher .rivi-launcher-alert { top: -5px; right: -5px; width: 18px; height: 18px; border-color: var(--studio-paper); font-size: .56rem; }
body.fs-primary .rivi-teacher-window { border-color: #a4c6b7; }
body.fs-primary .rivi-teacher-header { background: #224e43; }
body.fs-primary .rivi-teacher-header strong { color: #f3f0dc; }

/* Override old seven-button dark styles, preserving every handler and state. */
body.fs-primary .fs-card-area .fs-nav-btns {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important; max-width: 1120px; margin: 6px auto 0 !important;
    padding: 9px; gap: 8px !important;
}
body.fs-primary .fs-card-area .fs-nav-btns > .fs-btn-nav,
body.fs-primary .fs-card-area .fs-nav-btns > .fs-btn-autosig-big {
    min-width: 0 !important; height: 48px !important; min-height: 48px !important;
    color: var(--studio-accent) !important; background: #eff2e8 !important;
    border-color: #cdd9c7 !important; box-shadow: none; font-size: .72rem !important;
    white-space: normal !important; line-height: 1.25 !important; padding: 8px !important;
    grid-column: auto;
}
body.fs-primary .fs-card-area .fs-nav-btns #btnNext,
body.fs-primary .fs-card-area .fs-nav-btns #btnAuto { color: white !important; background: var(--studio-accent) !important; border-color: var(--studio-accent) !important; }
body.fs-primary .fs-card-area .fs-nav-btns :is(#btnPrev, #btnReset, #btnAudio, #btnAutoSig) { color: var(--studio-accent) !important; background: #edf2e7 !important; border-color: #cbd7bf !important; }
body.fs-primary .fs-card-area .fs-nav-btns #btnStopAll,
body.fs-primary .fs-card-area .fs-nav-btns #btnAuto.playing,
body.fs-primary .fs-card-area .fs-nav-btns #btnAutoSig.playing { color: white !important; background: #b7473f !important; border-color: #a33a33 !important; }
body.fs-primary .fs-primary-filters .fs-nchip.on, body.fs-primary .fs-primary-filters .fs-tchip.on, body.fs-primary .fs-primary-filters .fs-chip.active { border-color: var(--studio-accent); color: var(--studio-accent); background: var(--studio-tint); }
/* Redesign the grade selector too; retain its original cards, covers and links. */
body.fs-primary .fs-selector { width: min(1240px, calc(100% - 40px)); margin: 28px auto 60px; padding: 0; }
body.fs-primary .fs-selector-header { min-height: 300px; border: 1px solid var(--studio-line); background: linear-gradient(110deg, #f9f8edf5 30%, #e2ecdef0), url('../images/dashboard/primaria.webp') center / cover; border-radius: 24px; box-shadow: 0 16px 40px #203b2510; padding: 38px; }
body.fs-primary .fs-selector-header::before { background: linear-gradient(90deg, var(--studio-accent), #c8c98e, transparent); }
body.fs-primary .fs-selector-header h1 { color: var(--studio-ink); text-shadow: none; }
body.fs-primary .grade-hero-accent { background: none; -webkit-text-fill-color: var(--studio-accent); color: var(--studio-accent); }
body.fs-primary .fs-selector-header p { color: #63745e; }
body.fs-primary .grade-hero-badge { color: var(--studio-accent); background: #fffdf0; border-color: #cad7bc; }
body.fs-primary .grade-hero-stats > div { background: #fffdf1b8; border-color: #d7dec9; }
body.fs-primary .grade-hero-stats strong { color: var(--studio-accent); }
body.fs-primary .grade-hero-stats span { color: #6e7f67; }
body.fs-primary .fs-selector-search-wrap input { background: #fffdf7; color: var(--studio-ink); border-color: #cad8c1; }
body.fs-primary .fs-industry-title { color: var(--studio-ink); }
body.fs-primary .fs-area-card { border: 1px solid #b6c9ad; border-radius: 18px; box-shadow: 0 6px 22px #273f2414; }
body.fs-primary .fs-area-card:hover { border-color: #648c60; box-shadow: 0 10px 28px #273f2422; }
body.fs-primary .fs-area-card .fs-area-label { flex: 0 0 auto; color: #fff; font-size: 1.1rem; margin-bottom: 3px; }
body.fs-primary .fs-area-card .fs-area-card-top { position: static !important; }
body.fs-primary .fs-area-card .fs-area-niveles { color: #c2d1d5; }
body.fs-primary .fs-area-card .fs-area-total-frases { color: #bfdfc1; }
body.fs-primary .fs-area-card .fs-badge-free, body.fs-primary .fs-area-card .fs-badge-nuevo { color: #e4f5d5; background: #245a3ecc; border-color: #7fb77788; }
body.fs-primary .fs-selector-search-wrap input { box-shadow: 0 5px 20px #244c3010; }
@media (min-width: 701px) {
    body.fs-primary[data-fs-view="cuaderno"] .fs-main-card:not(.fs-long-copy) #cardBodyLectura .fs-reading-copy { display: flex; flex-direction: column; }
}

@media (max-width: 1100px) {
    body.fs-primary #cardBodyLectura.fs-has-image { display: flex; flex-direction: column; align-items: stretch; }
    body.fs-primary #cardBodyLectura.fs-has-image .fs-card-visual { max-width: 200px; align-self: center; order: 0; }
    body.fs-primary .fs-card-area .fs-nav-btns { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    body.fs-primary .fs-card-area .fs-nav-btns #btnStopAll { grid-column: span 2; }
}
@media (max-width: 700px) {
    body.fs-primary .rvn-section-back { display: none !important; }
    body.fs-primary .fs-card-area .fs-nav-btns { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; position: static; gap: 6px !important; padding: 7px; }
    body.fs-primary .fs-card-area .fs-nav-btns > .fs-btn-nav,
    body.fs-primary .fs-card-area .fs-nav-btns > .fs-btn-autosig-big { font-size: .59rem !important; padding: 5px 3px !important; gap: 4px !important; min-height: 46px !important; height: auto !important; }
    body.fs-primary .fs-rango-group { width: 100%; gap: 8px; padding: 9px; }
    body.fs-primary .fs-rango-input { width: 68px; min-height: 44px; }
    body.fs-primary .fs-audio-help-btn { grid-column: 1 / -1; }
    body.fs-primary .fs-card-phrase-emoji { font-size: 2rem; }
    body.fs-primary .fs-selector { width: calc(100% - 24px); margin: 18px auto 40px; }
    body.fs-primary .fs-selector-header { padding: 25px 20px; min-height: 350px; }
    body.fs-primary .fs-selector-header h1 { font-size: 1.85rem; }
    body.fs-primary .grade-hero-stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.fs-primary #riviGradeLauncher { min-height: 44px; padding: 3px 12px 3px 6px; }
    body.fs-primary #riviGradeLauncher svg { width: 32px; height: 32px; }
    body.fs-primary #riviGradeLauncher .rivi-launcher-copy small { display: none; }
    body.fs-primary[data-fs-view="cuaderno"] #cardBodyLectura.fs-has-image .fs-reading-copy { display: flex; }
}

/* Ajustes de integración posteriores al estilo aprobado. */
body.rvn-platform.fs-primary .fs-card-area .fs-nav-btns {grid-template-columns:repeat(var(--rvn-action-count,7),minmax(0,1fr)) !important;}
body.rvn-platform[data-rvn-section="secundaria"] .fs-selector-header {background-image:linear-gradient(110deg,#f9f8edf5 30%,#e2ecdef0),url('../images/dashboard/secundaria.webp');}
body.rvn-platform[data-rvn-section="bachillerato"] .fs-selector-header {background-image:linear-gradient(110deg,#f9f8edf5 30%,#e2ecdef0),url('../images/dashboard/bachillerato.webp');}
body.rvn-platform.fs-primary .fs-main-card .fs-virtual-teacher img {display:block;width:100%;height:auto;object-fit:contain;}
@media(max-width:1100px) {body.rvn-platform.fs-primary .fs-card-area .fs-nav-btns {grid-template-columns:repeat(min(var(--rvn-action-count,7),4),minmax(0,1fr)) !important;}}
