/* AIM OFFICE · AIM Grabar. Solo variables del estilo elegido (estilo.css y aim-app.css). Móvil primero. */
.gb-cuerpo { display: flex; flex-direction: column; }
.gb-oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }
.gb-bloque { display: block; }
.ap .gb-btn-grabar svg circle[fill] { fill: currentColor; }

/* ── Biblioteca ── */
.gb-biblioteca { width: 100%; }
.gb-bib-cabeza { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; }
.gb-bib-cabeza h2 { font: 750 26px/1.15 var(--titulo); }
.gb-bib-herr { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gb-buscar { width: min(320px, 100%); }
.gb-rejilla { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gb-nada { color: var(--tinta-3); padding: 20px 0; }
.gb-tarjeta { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio, 14px); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.gb-tarjeta:hover { border-color: var(--linea-2); box-shadow: 0 8px 26px color-mix(in srgb, var(--tinta) 10%, transparent); }
.gb-tarjeta-abrir { border: 0; padding: 0; background: none; cursor: pointer; display: block; width: 100%; }
.gb-tarjeta-abrir[disabled] { cursor: default; }
.gb-mini { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--ap-acento) 14%, var(--papel)); color: var(--ap-acento); overflow: hidden; }
.gb-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gb-mini svg { width: 40px; height: 40px; }
.gb-mini-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; font: 650 12.5px/1.4 var(--cuerpo); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--tinta) 78%, transparent); color: var(--blanco); }
.gb-tarjeta-pie { display: flex; align-items: center; gap: 6px; padding: 10px 6px 10px 12px; }
.gb-tarjeta-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gb-tarjeta-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.gb-tarjeta-txt small { color: var(--tinta-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-pie { font-size: 13.5px; }
.gb-bienvenida { margin: 4vh auto 0; max-width: 680px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 18px; background: var(--blanco); border: 1px solid var(--linea); border-radius: 20px; }
.gb-bienvenida h2 { font: 800 clamp(24px, 4vw, 32px)/1.1 var(--titulo); }
.gb-bienvenida p { color: var(--tinta-2); max-width: 560px; }
.gb-bienvenida-icono { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--ap-acento); color: var(--ap-sobre); }
.gb-bienvenida-icono svg { width: 34px; height: 34px; }
.gb-ventajas { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; text-align: left; width: 100%; }
@media (min-width: 640px) { .gb-ventajas { grid-template-columns: 1fr 1fr; } }
.gb-ventajas li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--ap-suave); color: var(--tinta-2); font-size: 14.5px; }
.gb-ventajas svg { color: var(--ap-acento); margin-top: 1px; }

/* ── Preparar ── */
.gb-prep { display: flex; flex-direction: column; gap: 16px; }
.gb-fuentes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gb-fuente { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linea-2); background: var(--blanco); cursor: pointer; text-align: left; }
.gb-fuente svg { width: 26px; height: 26px; color: var(--tinta-3); }
.gb-fuente small { color: var(--tinta-3); font-size: 13px; }
.gb-fuente[aria-checked="true"] { border-color: var(--ap-acento); background: var(--ap-suave); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ap-acento) 35%, transparent); }
.gb-fuente[aria-checked="true"] svg { color: var(--ap-acento); }
.gb-prep-dos { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .gb-prep-dos { grid-template-columns: 1.15fr 1fr; } }
.gb-prep-opciones { display: flex; flex-direction: column; gap: 12px; }
.gb-prep-vista { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gb-prep-cam { width: min(220px, 60vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--papel); border: 3px solid var(--blanco); box-shadow: 0 10px 30px color-mix(in srgb, var(--tinta) 22%, transparent); transform: scaleX(-1); }
.gb-prep-cam.es-cuadrada { border-radius: 22%; }
.gb-prep-sin { width: min(220px, 60vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--papel); color: var(--tinta-3); border: 1px dashed var(--linea-2); }
.gb-nivel { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--tinta) 10%, transparent); overflow: hidden; }
.gb-nivel-barra { display: block; height: 100%; width: 0; background: var(--ap-acento); transition: width .06s linear; }
.ap-casilla small.gb-bloque { margin-top: 2px; }

/* Botones segmentados */
.gb-segmentado { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 11px; background: color-mix(in srgb, var(--tinta) 6%, transparent); }
.gb-seg { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 11px; border-radius: 8px; border: 0; background: none; color: var(--tinta-2); font: 600 14px/1.2 var(--cuerpo); cursor: pointer; }
.gb-seg svg { width: 18px; height: 18px; }
.gb-seg[aria-pressed="true"] { background: var(--blanco); color: var(--tinta); box-shadow: 0 1px 3px color-mix(in srgb, var(--tinta) 18%, transparent); }
.ap-boton.gb-seg[aria-pressed="true"] { border-color: var(--ap-acento); background: var(--ap-suave); }

/* ── Cuenta atrás y grabando ── */
.gb-cuenta { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: color-mix(in srgb, var(--tinta) 72%, transparent); color: var(--blanco); }
.gb-cuenta-num { font: 800 clamp(120px, 22vw, 220px)/1 var(--titulo); font-variant-numeric: tabular-nums; animation: gb-latir 1s ease-in-out infinite; }
.gb-cuenta p { font: 600 20px/1.2 var(--cuerpo); }
@keyframes gb-latir { 0% { transform: scale(1.15); opacity: .4; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .8; } }
.gb-grabando { max-width: 980px; }
.gb-vivo-cabeza { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 18px; }
.gb-punto { width: 14px; height: 14px; border-radius: 50%; background: var(--pdf); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pdf) 60%, transparent); animation: gb-pulso 1.4s infinite; }
.gb-punto.en-pausa { background: var(--tinta-3); animation: none; }
@keyframes gb-pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pdf) 55%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.gb-reloj-vivo { font: 750 28px/1 var(--titulo); font-variant-numeric: tabular-nums; }
.gb-vivo-escena { position: relative; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--tinta) 90%, var(--papel)); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.gb-vivo-pantalla { width: 100%; height: 100%; object-fit: contain; }
.gb-espejo { transform: scaleX(-1); }
.gb-vivo-cam { position: absolute; width: 22%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--blanco); transform: scaleX(-1); box-shadow: 0 8px 24px color-mix(in srgb, var(--tinta) 35%, transparent); }
.gb-vivo-cam.es-cuadrada { border-radius: 18%; }
.gb-esq-abajo-derecha { right: 3%; bottom: 4%; } .gb-esq-abajo-izquierda { left: 3%; bottom: 4%; }
.gb-esq-arriba-derecha { right: 3%; top: 4%; } .gb-esq-arriba-izquierda { left: 3%; top: 4%; }
.gb-vivo-controles { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Editor ── */
.gb-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--papel); }
.gb-ed-barra { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--blanco); border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.gb-nombre { display: inline-flex; align-items: center; gap: 6px; max-width: min(46vw, 420px); padding: 6px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; font: 700 16px/1.2 var(--titulo); color: var(--tinta); }
.gb-nombre span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-nombre svg { width: 16px; height: 16px; color: var(--tinta-3); }
.gb-nombre:hover { background: color-mix(in srgb, var(--tinta) 6%, transparent); }
.gb-guardado { font-size: 13px; }
.gb-ed-centro { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 0; overflow: auto; }
.gb-ed-escena { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; min-height: 200px; }
.gb-escena { width: 100%; display: flex; justify-content: center; align-items: center; }
.gb-lienzo { display: block; border-radius: 10px; background: color-mix(in srgb, var(--tinta) 85%, var(--papel)); box-shadow: 0 10px 34px color-mix(in srgb, var(--tinta) 18%, transparent); touch-action: none; max-width: 100%; }
.gb-ayuda-escena { font-size: 13px; text-align: center; min-height: 1.2em; }
.gb-panel { background: var(--blanco); border-top: 1px solid var(--linea); display: flex; flex-direction: column; min-height: 0; }
.gb-pestanas { padding: 0 8px; flex: 0 0 auto; }
.gb-pestana { display: inline-flex; align-items: center; gap: 6px; }
.gb-pestana svg { width: 17px; height: 17px; }
.gb-panel-cuerpo { padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
@media (min-width: 900px) {
  .gb-ed-centro { flex-direction: row; overflow: hidden; }
  .gb-panel { width: 340px; flex: 0 0 auto; border-top: 0; border-left: 1px solid var(--linea); }
}
.gb-control { gap: 6px; }
.gb-etiqueta-fila { display: flex; justify-content: space-between; gap: 10px; }
.gb-valor { color: var(--tinta-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.gb-deslizador { width: 100%; accent-color: var(--ap-acento); min-height: 28px; }
.gb-fondos { display: flex; flex-wrap: wrap; gap: 8px; }
.gb-fondo { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--linea); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.gb-fondo[aria-pressed="true"] { border-color: var(--tinta); box-shadow: 0 0 0 2px var(--blanco), 0 0 0 4px var(--ap-acento); }
.gb-fondo-color { display: grid; place-items: center; background: conic-gradient(from 0deg, var(--pdf), var(--notas), var(--calculo), var(--calendario), var(--texto), var(--correo), var(--pdf)); }
.gb-color { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.gb-esquinas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 120px; }
.gb-esquina { position: relative; height: 40px; border-radius: 8px; border: 1px solid var(--linea-2); background: var(--papel); cursor: pointer; }
.gb-esquina span { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--ap-acento); }
.gb-esquina-ai span { left: 5px; top: 5px; } .gb-esquina-ad span { right: 5px; top: 5px; } .gb-esquina-bi span { left: 5px; bottom: 5px; } .gb-esquina-bd span { right: 5px; bottom: 5px; }
.gb-esquina:hover { border-color: var(--ap-acento); }
.gb-zoom-cabeza { display: flex; flex-direction: column; gap: 10px; }
.gb-lista-zoom { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.gb-lista-zoom svg { color: var(--ap-acento); }
.gb-zoom-sel { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.gb-subs-gen { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.gb-transcribe { display: flex; flex-direction: column; gap: 8px; }
.gb-subs-estilo { display: flex; flex-direction: column; gap: 12px; }
.gb-subs-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gb-sub { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: start; }
.gb-sub.es-sel .gb-sub-txt { border-color: var(--ap-acento); }
.gb-sub-hora { border: 0; background: var(--ap-suave); color: color-mix(in srgb, var(--ap-acento) 80%, var(--tinta)); border-radius: 8px; padding: 6px 8px; font: 650 12.5px/1.2 var(--cuerpo); font-variant-numeric: tabular-nums; cursor: pointer; margin-top: 4px; }
.gb-sub-txt.ap-campo { min-height: 0; resize: vertical; font-size: 14.5px !important; padding: 6px 9px; }
.gb-subs-mas summary { cursor: pointer; color: var(--tinta-2); font-weight: 600; padding: 4px 0; }
.gb-subs-mas[open] { display: flex; flex-direction: column; gap: 10px; }

/* Transporte y herramientas */
.gb-transporte { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 8px 12px; background: var(--blanco); border-top: 1px solid var(--linea); }
.gb-transporte-a { display: flex; align-items: center; gap: 8px; }
.gb-play { width: 44px; min-height: 44px; border-radius: 50%; }
.gb-tiempo { font: 650 14px/1 var(--cuerpo); font-variant-numeric: tabular-nums; color: var(--tinta-2); white-space: nowrap; }
.gb-barra { width: 100%; accent-color: var(--ap-acento); }
.gb-herramientas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gb-herramientas .ap-boton { min-height: 38px; padding: 6px 11px; font-size: 14px !important; }
@media (min-width: 900px) { .gb-transporte { grid-template-columns: auto minmax(160px, 1fr) auto; align-items: center; } }
@media (max-width: 640px) { .gb-herramientas .ap-boton:not(.ap-solo-icono) span { display: none; } .gb-herramientas .ap-boton:not(.ap-solo-icono) { width: 42px; padding: 0; } }

/* Línea de tiempo */
.gb-linea { flex: 0 0 auto; overflow-x: auto; overflow-y: hidden; padding: 6px 12px 12px; background: var(--blanco); border-top: 1px solid var(--linea); touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.gb-linea-dentro { position: relative; min-width: 100%; }
.gb-regla { position: relative; height: 20px; border-bottom: 1px solid var(--linea); cursor: pointer; }
.gb-marca { position: absolute; top: 2px; font: 600 11px/1 var(--cuerpo); color: var(--tinta-3); font-variant-numeric: tabular-nums; padding-left: 4px; border-left: 1px solid var(--linea-2); height: 16px; }
.gb-pista { position: relative; height: 34px; margin-top: 6px; border-radius: 8px; background: color-mix(in srgb, var(--tinta) 4%, transparent); }
.gb-pista-video { height: 52px; }
.gb-pista-nombre { position: sticky; left: 0; top: 0; z-index: 0; display: inline-block; padding: 9px 8px; font: 650 11.5px/1 var(--cuerpo); letter-spacing: .03em; text-transform: uppercase; color: var(--tinta-3); pointer-events: none; }
.gb-clip { position: absolute; top: 0; height: 100%; box-sizing: border-box; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--ap-acento) 45%, var(--linea-2)); background: color-mix(in srgb, var(--ap-acento) 13%, var(--blanco)); overflow: hidden; cursor: grab; touch-action: none; }
.gb-clip.es-sel { border: 2px solid var(--ap-acento); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ap-acento) 25%, transparent); }
.gb-clip.es-moviendo { opacity: .85; z-index: 5; cursor: grabbing; box-shadow: 0 8px 22px color-mix(in srgb, var(--tinta) 25%, transparent); }
.gb-onda { position: absolute; inset: 6px 0 6px 0; width: 100%; height: calc(100% - 12px); pointer-events: none; }
.gb-clip-txt { position: absolute; left: 6px; top: 4px; display: flex; gap: 6px; align-items: center; font: 650 11.5px/1 var(--cuerpo); color: var(--tinta-2); font-variant-numeric: tabular-nums; pointer-events: none; }
.gb-vel { background: var(--ap-acento); color: var(--ap-sobre); border-radius: 5px; padding: 2px 5px; }
.gb-asa { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 2; }
.gb-asa-ini { left: 0; } .gb-asa-fin { right: 0; }
.es-sel > .gb-asa::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 4px; width: 3px; border-radius: 2px; background: var(--ap-acento); }
.gb-silencio { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 1; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--pdf) 22%, transparent) 0 5px, transparent 5px 10px); border-left: 1px dashed var(--pdf); border-right: 1px dashed var(--pdf); }
.gb-bloque-zoom, .gb-bloque-sub { position: absolute; top: 3px; bottom: 3px; box-sizing: border-box; border-radius: 7px; overflow: hidden; cursor: grab; touch-action: none; display: flex; align-items: center; padding: 0 8px; font: 650 11.5px/1 var(--cuerpo); white-space: nowrap; }
.gb-bloque-zoom { background: color-mix(in srgb, var(--ap-acento) 70%, var(--blanco)); color: var(--ap-sobre); border: 1px solid var(--ap-acento); }
.gb-bloque-zoom.es-auto { background: color-mix(in srgb, var(--ap-acento) 38%, var(--blanco)); color: var(--tinta); }
.gb-bloque-sub { background: color-mix(in srgb, var(--tinta) 10%, var(--blanco)); color: var(--tinta-2); border: 1px solid var(--linea-2); }
.gb-bloque-sub span { overflow: hidden; text-overflow: ellipsis; }
.gb-bloque.es-sel { outline: 2px solid var(--tinta); outline-offset: 1px; z-index: 3; }
.gb-cabezal { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--pdf); z-index: 6; pointer-events: none; }
.gb-cabezal::before { content: ""; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 9px solid var(--pdf); }

/* Exportar */
.gb-exp-tipos { display: flex; flex-direction: column; gap: 8px; }
.gb-exp-tipo { padding: 10px 12px; border: 1px solid var(--linea); border-radius: 10px; }
.gb-exp-tipo:has(input:checked) { border-color: var(--ap-acento); background: var(--ap-suave); }
kbd { font: 600 13px/1 var(--cuerpo); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--linea-2); background: var(--papel); white-space: nowrap; }

@media (max-width: 899px) {
  .gb-editor { flex: none; }
  .gb-ed-centro { flex: none; overflow: visible; }
  .gb-ed-escena { padding: 8px; min-height: 0; flex: none; }
  .gb-panel { max-height: none; }
  .gb-ed-barra .ap-boton.ap-plano span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gb-cuenta-num, .gb-punto { animation: none; } }
