*{box-sizing:border-box}
:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#182033;background:#f4f7fb;--primary:#5b5bd6;--border:#e3e8f0;--muted:#6c7688}
body{margin:0;background:#f4f7fb}
button,input,textarea,select,math-field{font:inherit}
.topbar{position:sticky;top:0;z-index:50;background:#111827;box-shadow:0 8px 28px rgba(15,23,42,.14)}
.topbar-inner{max-width:1500px;height:70px;margin:auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,#7c66ff,#5548d9);color:#fff;font-weight:900}.brand strong{display:block;color:white}.brand span{display:block;color:#aeb8c8;font-size:.75rem;margin-top:2px}.version{color:#ccd4df;font-size:.72rem;border:1px solid rgba(255,255,255,.12);padding:7px 10px;border-radius:999px}
.workspace{max-width:1500px;margin:26px auto;padding:0 18px 40px;display:grid;grid-template-columns:210px minmax(500px,620px) minmax(0,1fr);gap:20px;align-items:start}
.slides-panel,.editor-panel,.preview-card{background:#fff;border:1px solid var(--border);border-radius:20px;box-shadow:0 16px 45px rgba(24,32,51,.07)}
.slides-panel{position:sticky;top:94px;padding:15px}.editor-panel{padding:24px}.preview-panel{position:sticky;top:94px}.preview-card{padding-bottom:16px;overflow:hidden}
.eyebrow{display:block;color:#6868c5;font-size:.63rem;font-weight:900;letter-spacing:.13em;margin-bottom:5px}
.panel-title-row,.section-head,.preview-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.small-primary{width:34px;height:34px;border:0;border-radius:10px;background:#5b5bd6;color:#fff;font-weight:900;cursor:pointer}
.slide-list{margin-top:12px;display:flex;flex-direction:column;gap:8px;max-height:68vh;overflow:auto}.slide-item{padding:10px;border:1px solid #e3e7ef;border-radius:12px;background:#fff;cursor:pointer;text-align:left}.slide-item.active{border-color:#8989df;background:#f2f1ff;box-shadow:0 0 0 3px rgba(91,91,214,.05)}.slide-item strong{display:block;font-size:.74rem;color:#344054}.slide-item small{display:block;margin-top:3px;color:#8b94a3;font-size:.61rem}.slide-list-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.slide-list-actions button{border:1px solid #dfe4ec;border-radius:9px;background:#fff;padding:8px;color:#5b6475;font-size:.68rem;font-weight:800;cursor:pointer}.slide-list-actions .danger{color:#a94e4e}
.editor-heading h1{margin:0;color:#182033;font-size:1.5rem;letter-spacing:-.03em}.editor-heading p{margin:7px 0 18px;color:var(--muted);font-size:.82rem;line-height:1.45}
.form-grid,.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field{margin-bottom:12px}.field label{display:block;margin-bottom:6px;color:#505b6d;font-size:.69rem;font-weight:850}.field input,.field textarea,.field select{width:100%;padding:10px 11px;border:1px solid #d8dfe9;border-radius:10px;background:white;color:#253044;outline:none}.field textarea{resize:vertical}.field small{display:block;margin-top:5px;color:#8e97a5;font-size:.61rem}.field input:focus,.field textarea:focus,.field select:focus{border-color:#9393df;box-shadow:0 0 0 3px rgba(91,91,214,.06)}
.section-head{margin:19px 0 10px}.section-head strong{font-size:.88rem;color:#303a4e}.secondary,.primary{border-radius:10px;font-weight:850;cursor:pointer}.secondary{border:1px solid #d8ddef;background:#f8f8ff;color:#5050b8;padding:9px 11px}.primary{border:0;background:linear-gradient(135deg,#5c5bdd,#6a56d8);color:#fff}
.symbols{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:10px}.symbols button{min-height:38px;border:1px solid #e0e5ed;border-radius:9px;background:#fff;cursor:pointer;color:#334055;font-family:Georgia,serif}.symbols button:hover{background:#f7f6ff;border-color:#b8b8eb}
.equation-list{border:1px solid #e2e6ed;border-radius:14px;background:#fbfcfe;padding:10px;display:flex;flex-direction:column;gap:7px}.equation-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center}.equation-row.active{background:#f6f5ff;border-radius:10px}.equation-remove{width:32px;height:32px;border:0;border-radius:8px;background:#fff0f0;color:#b95454;cursor:pointer}math-field.equation-field{display:block;width:100%;min-height:56px;padding:11px 12px;border:1px solid #dbe1ea;border-radius:10px;background:#fff;font-size:1.18rem;--caret-color:#5b5bd6}
.presentation-settings-title{margin-top:22px}.main-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:16px}.large{padding:12px 15px}.status{margin-top:12px;padding:10px 12px;border-radius:10px;background:#f7f9fb;color:#687387;font-size:.73rem}
.preview-card-head{padding:17px 18px;border-bottom:1px solid #edf0f5}.ratio-chip{padding:6px 9px;border-radius:999px;background:#f0efff;color:#6262bd;font-size:.68rem;font-weight:850}
.editor-preview{position:relative;margin:16px auto;border-radius:17px;overflow:hidden;padding:8% 7%;background:#0d1714;color:#f4f5ef;box-shadow:inset 0 0 70px rgba(0,0,0,.25)}.ratio-16-9{aspect-ratio:16/9;width:calc(100% - 32px)}.ratio-9-16{aspect-ratio:9/16;width:min(58%,420px)}.ratio-1-1{aspect-ratio:1/1;width:min(78%,580px)}.ratio-4-5{aspect-ratio:4/5;width:min(68%,500px)}
.theme-white{background:#fff;color:#1d2939;box-shadow:inset 0 0 0 8px #d7dce4}.theme-paper{color:#1d2939;background:repeating-linear-gradient(to bottom,#fffdf8 0,#fffdf8 34px,#dce7f2 35px,#fffdf8 36px)}.theme-grid{color:#1d2939;background-color:#fffef9;background-image:linear-gradient(#e0e7ef 1px,transparent 1px),linear-gradient(90deg,#e0e7ef 1px,transparent 1px);background-size:27px 27px}
.p-title{font-weight:850;font-size:1.05rem;margin-bottom:10px}.p-text{font-size:.7rem;line-height:1.4;opacity:.8;margin-bottom:12px}.p-equations{display:flex;flex-direction:column;gap:9px}.p-eq svg{display:block;width:auto!important;height:auto!important;max-width:92%;max-height:54px;overflow:visible}.watermark{position:absolute;right:16px;bottom:12px;opacity:.28;text-align:right;line-height:1;pointer-events:none}.watermark span{display:block;font-size:.76rem;font-weight:900;letter-spacing:.01em}.watermark small{display:block;margin-top:3px;font-size:.43rem;font-weight:750;letter-spacing:.055em;opacity:.82}
.presentation-modal{position:fixed;inset:0;z-index:200;background:#05070b;display:flex;flex-direction:column}.presentation-modal[hidden]{display:none}.present-stage-wrap{flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;padding:10px}.present-stage-wrap canvas{display:block;max-width:100%;max-height:100%;box-shadow:0 0 0 1px rgba(255,255,255,.12);touch-action:none;cursor:crosshair}.present-toolbar{min-height:68px;background:#111827;border-top:1px solid rgba(255,255,255,.09);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:9px 14px;color:#fff}.present-nav,.drawing-tools,.record-tools{display:flex;align-items:center;gap:7px}.present-toolbar button{border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.06);color:#e6ebf2;padding:8px 10px;cursor:pointer;font-size:.72rem;font-weight:800}.present-toolbar button.active{background:#5959cc;border-color:#7979dc}.record-indicator{font-size:.7rem;font-weight:900;color:#d5d9e0}.record-indicator.recording{color:#ff6b6b}.stop-button{background:#9f3333!important}
@media(max-width:1180px){.workspace{grid-template-columns:190px 1fr}.preview-panel{grid-column:1/-1;position:static}.preview-card{max-width:820px;margin:auto}}@media(max-width:760px){.workspace{grid-template-columns:1fr}.slides-panel{position:static}.slide-list{flex-direction:row;max-height:none}.slide-item{min-width:135px}.form-grid,.settings-grid,.main-actions{grid-template-columns:1fr}.symbols{grid-template-columns:repeat(4,1fr)}.present-toolbar{grid-template-columns:1fr}.drawing-tools{overflow:auto}.record-tools{justify-content:space-between}}


/* V5.1 — presentación manual por pasos */
.present-toolbar {
  grid-template-columns: auto auto minmax(260px,1fr) auto;
}

.step-help {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  color: #d7dee8;
}

.step-help strong {
  font-size: .72rem;
  color: #ffffff;
}

.step-help span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #99a5b5;
  font-size: .6rem;
}

.step-help kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,.15);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255,255,255,.07);
  color: #e8edf4;
  font-family: inherit;
  font-size: .58rem;
}

@media(max-width:1050px) {
  .present-toolbar {
    grid-template-columns: auto 1fr auto;
  }
  .step-help {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
  }
}

@media(max-width:760px) {
  .present-toolbar {
    grid-template-columns: 1fr;
  }
  .step-help {
    grid-column: auto;
    grid-row: auto;
  }
  .step-help span {
    white-space: normal;
  }
}

/* V5.2 — contenido científico mixto */
.content-tools{margin:12px 0 10px;padding:12px;border:1px dashed #d9deea;border-radius:13px;background:#fafbfe}
.content-tool-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.content-tool-grid button{border:1px solid #dfe4ed;background:#fff;border-radius:9px;padding:9px 6px;color:#465267;font-size:.68rem;font-weight:800;cursor:pointer}
.content-tool-grid button:hover{border-color:#9d9de0;background:#f6f5ff;color:#5555bc}
.extra-content-list{display:flex;flex-direction:column;gap:7px;margin-top:8px}
.extra-item{display:grid;grid-template-columns:34px 1fr auto auto;align-items:center;gap:7px;border:1px solid #e2e6ed;background:#fff;border-radius:10px;padding:8px}
.extra-icon{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:#f2f1ff;color:#5b5bd6;font-weight:900}
.extra-info strong{display:block;font-size:.7rem;color:#354054}.extra-info small{display:block;font-size:.61rem;color:#8b94a3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.extra-edit,.extra-remove{border:0;border-radius:8px;padding:7px 8px;cursor:pointer;font-size:.65rem;font-weight:800}.extra-edit{background:#f1f4f8;color:#566174}.extra-remove{background:#fff0f0;color:#b95454}
.content-modal{position:fixed;inset:0;z-index:300;background:rgba(10,16,28,.64);display:grid;place-items:center;padding:20px}.content-modal[hidden]{display:none}
.content-dialog{width:min(560px,96vw);background:#fff;border-radius:18px;box-shadow:0 30px 90px rgba(0,0,0,.25);padding:18px}
.content-dialog-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf0f4;padding-bottom:12px;margin-bottom:14px}.content-dialog-head button{border:0;background:#f1f3f6;border-radius:8px;width:32px;height:32px;cursor:pointer}
.content-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}.content-dialog-actions button{padding:9px 13px}
.modal-field{margin-bottom:11px}.modal-field label{display:block;font-size:.68rem;font-weight:850;color:#505b6d;margin-bottom:5px}.modal-field input,.modal-field textarea,.modal-field select{width:100%;padding:9px 10px;border:1px solid #d8dfe9;border-radius:9px}
.graph-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}


/* V5.3 — composición libre tipo PowerPoint */
.preview-head-actions{display:flex;align-items:center;gap:7px}
.preview-reset{border:1px solid #dfe4ec;border-radius:8px;background:#fff;color:#687387;padding:6px 8px;cursor:pointer;font-size:.61rem;font-weight:800}
.editor-preview{padding:0!important;user-select:none}
.free-element{position:absolute!important;z-index:5;cursor:grab;touch-action:none;user-select:none;max-width:88%;margin:0!important}
.free-element:active{cursor:grabbing}
.free-element:hover{outline:1px dashed rgba(110,110,205,.55);outline-offset:4px}
.free-element.dragging{outline:2px solid rgba(91,91,214,.55)}
.free-title{font-weight:850;font-size:1.05rem}
.free-text,.free-extra-text{font-size:.7rem;line-height:1.4;opacity:.85;white-space:pre-wrap;max-width:42%}
.free-equation{min-width:90px;min-height:38px}
.free-equation svg{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:70px!important;overflow:visible}
.free-image img{display:block;max-width:180px;max-height:120px;border-radius:6px}
.free-graph{width:210px;height:125px}
.free-figure{width:160px;height:110px}


/* V5.4 — selección, redimensión y color por elemento */
.preview-head-actions{
  flex-wrap:wrap;
  justify-content:flex-end
}
.element-controls{
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 6px;
  border:1px solid #e1e5ed;
  border-radius:9px;
  background:#fafbfe
}
.element-controls span{
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#667085;
  font-size:.58rem;
  font-weight:800
}
.element-controls input[type="color"]{
  width:28px;
  height:28px;
  padding:2px;
  border:1px solid #d8dfe9;
  border-radius:7px;
  background:#fff;
  cursor:pointer
}
.element-controls button{
  border:1px solid #dfe4ec;
  border-radius:7px;
  background:#fff;
  color:#667085;
  padding:6px 7px;
  cursor:pointer;
  font-size:.57rem;
  font-weight:800
}
.free-element.selected{
  outline:2px solid rgba(91,91,214,.75)!important;
  outline-offset:4px
}
.resize-handle{
  position:absolute;
  right:-9px;
  bottom:-9px;
  width:16px;
  height:16px;
  z-index:30;
  border:2px solid #fff;
  border-radius:50%;
  background:#5b5bd6;
  box-shadow:0 1px 5px rgba(20,25,45,.25);
  cursor:nwse-resize;
  touch-action:none
}
.free-element:not(.selected) .resize-handle{
  display:none
}


/* V5.5 — propiedades profesionales del elemento */
.element-controls{
  max-width:100%;
  flex-wrap:wrap;
  justify-content:flex-end
}
.prop-group{
  display:flex;
  align-items:center;
  gap:4px;
  padding-left:5px;
  border-left:1px solid #e3e7ee
}
.prop-group:first-of-type{border-left:0;padding-left:0}
.element-controls select{
  max-width:86px;
  height:28px;
  border:1px solid #d8dfe9;
  border-radius:7px;
  background:#fff;
  color:#5f697b;
  font-size:.57rem
}
.element-controls button.active{
  border-color:#7d7dd7;
  background:#f0efff;
  color:#5151b5
}
.element-controls .delete-prop{
  color:#b24e4e;
  background:#fff5f5
}
.text-format-controls.is-disabled{
  opacity:.35;
  pointer-events:none
}
.free-title,.free-text,.free-extra-text{
  transform-origin:top left
}


/* V5.6 — biblioteca científica */
.science-library{
  margin:14px 0 16px;
  padding:13px;
  border:1px solid #e3e7ef;
  border-radius:14px;
  background:linear-gradient(180deg,#fbfcff,#f7f9fd)
}
.science-library-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px
}
.science-library-head strong{
  color:#354054;
  font-size:.82rem
}
.library-hint{
  color:#8b94a3;
  font-size:.61rem
}
.science-library-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px
}
.library-item{
  min-height:66px;
  padding:7px 5px;
  border:1px solid #dfe4ec;
  border-radius:10px;
  background:#fff;
  color:#455166;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-align:center
}
.library-item:hover{
  border-color:#9b9be0;
  background:#f5f4ff;
  color:#5555b6
}
.library-icon{
  width:34px;
  height:30px;
  display:grid;
  place-items:center;
  font-size:1.1rem;
  font-weight:900
}
.library-item small{
  font-size:.56rem;
  line-height:1.15
}
.free-science{
  width:180px;
  height:120px
}
.free-science canvas{
  width:100%;
  height:100%;
  display:block
}
@media(max-width:760px){
  .science-library-grid{
    grid-template-columns:repeat(3,1fr)
  }
}


/* V5.7 — biblioteca científica SVG semirrealista */
.library-item{
  min-height:78px
}
.library-svg-preview{
  width:48px;
  height:40px;
  display:block
}
.library-svg-preview svg{
  width:100%;
  height:100%;
  display:block;
  overflow:visible
}
.free-science{
  width:210px;
  height:145px;
  overflow:visible
}
.free-science svg{
  width:100%;
  height:100%;
  display:block;
  overflow:visible
}

/* V5.8 — rotación + biblioteca administrable */
.rotation-control{display:flex;align-items:center;gap:4px;padding-left:4px;color:#667085;font-size:.57rem;font-weight:800}
.rotation-control input[type="range"]{width:72px;accent-color:#5b5bd6}
.rotation-control output{min-width:32px;text-align:right}
.library-head-actions{display:flex;align-items:center;gap:8px}
.library-admin-button{border:1px solid #d8ddef;border-radius:8px;background:#f8f8ff;color:#5050b8;padding:6px 8px;cursor:pointer;font-size:.6rem;font-weight:850}
.library-search-row{display:grid;grid-template-columns:1fr 150px;gap:7px;margin-bottom:9px}
.library-search-row input,.library-search-row select{width:100%;padding:8px 9px;border:1px solid #d8dfe9;border-radius:9px;background:#fff;color:#4d596d;font-size:.66rem}
.annotation-library{margin-top:12px;padding-top:10px;border-top:1px solid #e6eaf1}
.annotation-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.annotation-grid button{border:1px solid #dfe4ec;border-radius:8px;background:#fff;color:#505b6e;padding:7px 5px;cursor:pointer;font-size:.6rem;font-weight:800}
.library-object-thumb{width:54px;height:44px;object-fit:contain;display:block}
.library-empty{grid-column:1/-1;padding:16px;text-align:center;color:#8b94a3;font-size:.68rem}
.library-admin-dialog{width:min(620px,96vw)}
.free-library-object{width:190px;height:135px}
.free-library-object img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.free-annotation{width:180px;height:90px}
.free-annotation svg{width:100%;height:100%;display:block;overflow:visible}
@media(max-width:760px){.library-search-row{grid-template-columns:1fr}.annotation-grid{grid-template-columns:repeat(3,1fr)}}


/* V5.21 — audio de escritura en presentación y grabación */
.writing-audio-control{display:flex;align-items:center;gap:6px;padding:4px 7px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(255,255,255,.04);color:#dfe6ef;font-size:.61rem;font-weight:800;white-space:nowrap}
.writing-audio-control input[type="range"]{width:92px;accent-color:#818cf8;cursor:pointer}
.writing-audio-control strong{min-width:31px;color:#fff;font-size:.59rem;text-align:right}
@media(max-width:760px){.writing-audio-control{width:100%;justify-content:center}.writing-audio-control input[type="range"]{width:min(180px,42vw)}}

/* V5.23 — ajuste responsivo del modo presentación, especialmente 9:16 */
.presentation-modal{--present-toolbar-h:auto}
.presentation-modal .present-stage-wrap{width:100%;min-width:0;min-height:0;box-sizing:border-box}
.presentation-modal .present-stage-wrap canvas{width:auto;height:auto;object-fit:contain}

/* La barra original tenía 4 bloques dentro de una cuadrícula de 3 columnas.
   En pantallas con poca altura esto podía crear una segunda fila muy alta. */
.presentation-modal .present-toolbar{
  grid-template-columns:auto auto minmax(220px,1fr) auto;
  min-height:0;
  box-sizing:border-box;
}
.presentation-modal .step-help{min-width:0}
.presentation-modal .step-help span{white-space:normal}
.presentation-modal .record-tools{justify-self:end}

/* Presentación vertical: barra compacta y máximo espacio para el lienzo 9:16. */
.presentation-modal.is-vertical .present-stage-wrap{padding:6px 10px}
.presentation-modal.is-vertical .present-toolbar{
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:8px;
  padding:6px 10px;
}
.presentation-modal.is-vertical .drawing-tools{grid-column:2;justify-content:center;min-width:0;flex-wrap:wrap}
.presentation-modal.is-vertical .record-tools{grid-column:3;justify-content:flex-end}
.presentation-modal.is-vertical .step-help{display:none}
.presentation-modal.is-vertical .present-toolbar button{padding:6px 8px;font-size:.67rem}
.presentation-modal.is-vertical .writing-audio-control{transform:scale(.92);transform-origin:right center}

@media (max-width:900px){
  .presentation-modal .present-toolbar{grid-template-columns:auto 1fr auto;gap:8px}
  .presentation-modal .step-help{display:none}
  .presentation-modal .drawing-tools{justify-content:center;flex-wrap:wrap}
  .presentation-modal .record-tools{justify-content:flex-end}
}

/* V5.24 · Secuencia universal de presentación */
.sequence-panel{margin-top:14px;border:1px solid #e2e6ed;border-radius:14px;background:#fbfcfe;padding:10px}
.sequence-head{margin:0 0 8px}.sequence-head small{color:#7b8495;font-size:.74rem}
.presentation-sequence-list{display:flex;flex-direction:column;gap:6px}
.sequence-item{display:grid;grid-template-columns:30px 28px 1fr auto;gap:7px;align-items:center;min-height:42px;padding:6px 8px;border:1px solid #dfe4ec;border-radius:10px;background:#fff;cursor:grab;user-select:none}
.sequence-item:active{cursor:grabbing}.sequence-item.dragging{opacity:.42}.sequence-item.drag-over{border-color:#5b5bd6;box-shadow:0 0 0 2px rgba(91,91,214,.10)}
.sequence-number{font-size:.75rem;font-weight:800;color:#8a93a3;text-align:center}.sequence-icon{font-size:1rem;text-align:center}
.sequence-copy{min-width:0}.sequence-copy strong{display:block;font-size:.78rem;color:#313744}.sequence-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7b8495;font-size:.7rem}
.sequence-actions{display:flex;gap:3px}.sequence-actions button{width:27px;height:27px;padding:0;border:1px solid #e0e4eb;border-radius:7px;background:#f8f9fb;color:#555d6c;cursor:pointer}.sequence-actions button:disabled{opacity:.3;cursor:default}

/* V5.25 · Efectos de entrada para textos e imágenes */
.sequence-effect{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:999px;background:#eef0ff;color:#4b4bb8;font-size:.58rem;font-style:normal;font-weight:850;vertical-align:middle}
.image-effect-preview{display:flex;align-items:center;justify-content:center;min-height:120px;border:1px solid #e1e5ec;border-radius:10px;background:#f7f8fa;overflow:hidden}
.image-effect-preview img{max-width:100%;max-height:180px;object-fit:contain;display:block}
.modal-field small{display:block;margin-top:5px;color:#737d8c;font-size:.66rem;line-height:1.35}

/* V5.28 · Narración con micrófono */
.narration-field{grid-column:1/-1}
.narration-toggle{display:flex;align-items:center;gap:9px;min-height:42px;padding:9px 11px;border:1px solid #d8dee8;border-radius:10px;background:#f8fafc;cursor:pointer;font-weight:800;color:#27364a}
.narration-toggle input{width:18px;height:18px;accent-color:#5959cc;cursor:pointer}
.narration-field small{display:block;margin-top:6px;color:#6b7280;line-height:1.35}
.voice-audio-control[hidden]{display:none!important}
.voice-audio-control{border-color:rgba(110,231,183,.25);background:rgba(16,185,129,.07)}

/* V5.29 · Prueba de micrófono y procesamiento de voz */
.mic-setup-panel{margin-top:10px;padding:12px;border:1px solid #d8dee8;border-radius:12px;background:#fff}
.mic-setup-panel[hidden]{display:none!important}
.mic-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mic-control{display:flex;flex-direction:column;gap:5px}
.mic-control label{font-size:.76rem;font-weight:800;color:#334155}
.mic-control select{width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:9px;padding:7px 9px;background:#fff;color:#1e293b}
.mic-meter-row{display:grid;grid-template-columns:auto auto minmax(110px,1fr) auto;gap:8px;align-items:center;margin-top:12px}
.mic-status-dot{width:10px;height:10px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.15)}
.mic-status-dot.ok{background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.15)}
.mic-status-dot.warn{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.15)}
.mic-status-dot.error{background:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.15)}
#micStatusText{font-size:.72rem;color:#334155;white-space:nowrap}
.mic-meter{height:12px;border-radius:999px;overflow:hidden;background:linear-gradient(90deg,#e2e8f0 0%,#e2e8f0 100%);border:1px solid #cbd5e1}
.mic-meter-fill{height:100%;width:0%;border-radius:inherit;background:linear-gradient(90deg,#22c55e 0 62%,#f59e0b 78%,#ef4444 100%);transition:width .08s linear}
.mic-level-text{min-width:68px;text-align:right;font-size:.66rem;font-weight:900;color:#64748b}
.mic-options{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:11px;padding-top:10px;border-top:1px dashed #d8dee8}
.mic-options label{display:flex;align-items:center;gap:5px;font-size:.72rem;font-weight:700;color:#475569}
.mic-options input{accent-color:#5959cc}
.mic-test-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:11px}
.mic-test-actions button{min-height:36px}
.mic-test-actions button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:760px){.mic-grid{grid-template-columns:1fr}.mic-meter-row{grid-template-columns:auto 1fr auto}.mic-meter-row #micStatusText{grid-column:2/-1}.mic-test-actions button{flex:1 1 150px}}

/* V5.30 — guardar y abrir proyectos .mathmotion */
.topbar-actions{display:flex;align-items:center;gap:8px;min-width:0}
.project-name-wrap{display:flex;align-items:center;gap:7px;padding:5px 7px 5px 10px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.05)}
.project-name-wrap span{color:#9ca7b7;font-size:.62rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.project-name-wrap input{width:170px;min-width:90px;border:0;outline:0;background:transparent;color:#fff;font-size:.72rem;font-weight:750;padding:4px 2px}
.project-name-wrap input::selection{background:#6b63dc}
.topbar-btn{border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.07);color:#e8edf5;padding:8px 10px;cursor:pointer;font-size:.68rem;font-weight:850;white-space:nowrap}
.topbar-btn:hover{background:rgba(255,255,255,.12)}
.topbar-btn.primary-save{border-color:#756ee7;background:#5b5bd6;color:#fff}
.topbar-btn.primary-save:hover{background:#6868df}
@media(max-width:980px){.project-name-wrap span{display:none}.project-name-wrap input{width:130px}.topbar-btn{padding:8px}.topbar-btn{font-size:0}.topbar-btn::first-letter{font-size:.8rem}.topbar-actions .version{display:none}}
@media(max-width:680px){.topbar-inner{padding:0 12px}.brand span{display:none}.project-name-wrap{display:none}.topbar-actions{gap:5px}}
