/* Estados: panel, visor y editor. Las capas se dimensionan con unidades del contenedor (cqw) para verse igual en cualquier tamaño. */
:root{--est-nuevo:var(--primary);--est-visto:color-mix(in srgb,var(--muted) 45%,transparent);--est-oscuro:#0e0a0c}
body:has(.est-panel-capa,.est-visor,.est-ed) .toast{z-index:95}
:is(.est-panel-capa,.est-visor,.est-ed) [hidden]{display:none!important}
@media (max-width:1040px){
  .nav-link{position:relative}
  .nav-link b.nav-nuevos{display:block;position:absolute;top:7px;right:calc(50% - 16px);width:9px;min-width:0;height:9px;margin:0;padding:0;border-radius:50%;font-size:0;line-height:0;background:var(--primary);box-shadow:0 0 0 2px var(--surface)}
}

/* Panel */
.est-panel-capa{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:20px;background:#14080866;backdrop-filter:blur(4px);animation:mm-aparece .16s ease-out}
.est-panel{display:flex;flex-direction:column;width:min(440px,100%);max-height:min(720px,calc(100dvh - 40px));background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 80px #1a080838;overflow:hidden}
.est-panel-cabeza{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 12px}
.est-sobre{margin:0 0 2px;font-size:9px;letter-spacing:1.6px;font-weight:700;color:var(--muted)}
.est-panel-cabeza h2{margin:0;font-size:22px;letter-spacing:-.4px}
.est-panel-cuerpo{overflow-y:auto;overscroll-behavior:contain;padding:0 12px 16px}
.est-mio{padding:6px 8px 14px;border-bottom:1px solid var(--line);margin-bottom:6px}
.est-persona{display:flex;align-items:center;gap:12px;width:100%;padding:8px;border-radius:14px;text-align:left;color:var(--text);transition:background .12s ease}
.est-persona:hover,.est-persona:focus-visible{background:var(--surface2)}
.est-aro{position:relative;display:grid;place-items:center;flex:none;width:52px;height:52px;border-radius:50%;padding:3px}
.est-aro .avatar{width:100%;height:100%;font-size:14px;border:2.5px solid var(--surface)}
.est-aro-vacio{padding:0}
.est-aro-vacio .avatar{border:0}
.est-mas{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--primary);color:var(--sobre-acento,#fff);border:2px solid var(--surface)}
.est-mas .ico{width:12px;height:12px;stroke-width:2.6}
.est-mio-fila{position:relative}
.est-mas-boton{left:42px;top:42px;right:auto;bottom:auto;width:22px;height:22px;padding:0;cursor:pointer}
.est-mas-boton::after{content:"";position:absolute;inset:-10px;border-radius:50%}
.est-quien{display:flex;flex-direction:column;gap:2px;min-width:0}
.est-quien strong{font-size:13.5px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.est-quien small{font-size:11px;color:var(--muted)}
.est-mas-boton .ico{transition:transform .18s ease}
.est-mas-boton[aria-expanded=true] .ico{transform:rotate(45deg)}
.est-crear{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}
.est-crear[hidden]{display:none}
.est-crear.est-crear-abre{animation:est-crear-abre .18s ease-out}
@keyframes est-crear-abre{from{opacity:0;transform:translateY(-6px)}}
@media(prefers-reduced-motion:reduce){.est-crear.est-crear-abre{animation:none}.est-mas-boton .ico{transition:none}}
.est-crear button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border-radius:14px;border:1px solid var(--line);background:var(--surface2);font-size:11.5px;font-weight:600;color:var(--text);transition:border-color .12s ease,transform .12s ease}
.est-crear button:hover,.est-crear button:focus-visible{border-color:var(--primary)}
.est-crear button:active{transform:scale(.97)}
.est-crear-ico{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;color:#fff}
.est-crear-ico .ico{width:19px;height:19px}
.est-c-texto{background:linear-gradient(150deg,#8f2236,#d39a45)}
.est-c-galeria{background:linear-gradient(150deg,#1b6aa0,#58bfd3)}
.est-c-camara{background:linear-gradient(150deg,#3f2a6b,#b37dd6)}
.est-c-audio{background:linear-gradient(150deg,#1f6b4f,#9fd36a)}
.est-seccion{margin:12px 8px 4px;font-size:10px;letter-spacing:1.2px;font-weight:700;color:var(--muted);text-transform:uppercase}
.est-lista{list-style:none;margin:0;padding:0}
.est-vacio{display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 18px 10px;text-align:center;color:var(--muted);font-size:12px;line-height:1.6}
.est-vacio .ico{width:34px;height:34px;color:var(--primary);opacity:.8}
.est-vacio strong{color:var(--text);font-size:13px}
.est-vacio p{margin:0}
.est-nota{display:flex;gap:8px;align-items:flex-start;margin:14px 8px 0;font-size:10.5px;line-height:1.6;color:var(--muted)}
.est-nota .ico{flex:none;width:14px;height:14px;margin-top:2px}

/* Botones comunes sobre fondo oscuro */
.est-redondo{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;color:#fff;background:#ffffff1f;transition:background .12s ease}
.est-redondo:hover,.est-redondo:focus-visible{background:#ffffff38}
.est-redondo .ico{width:19px;height:19px}
.est-redondo.est-peligro:hover{background:#d9364a}
.est-btn-claro{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:7px 13px;border-radius:999px;color:#fff;background:#ffffff1f;font-size:12.5px;font-weight:600;white-space:nowrap}
.est-btn-claro:hover,.est-btn-claro:focus-visible{background:#ffffff38}
.est-btn-claro .ico{width:16px;height:16px}
.est-chip{min-height:34px;padding:6px 14px;border-radius:999px;color:#fff;background:#ffffff1a;border:1px solid #ffffff2e;font-size:12.5px;white-space:nowrap}
.est-chip[aria-checked=true]{background:#fff;color:#1b1b1b;border-color:#fff}

/* Lienzo 9:16 compartido por el visor y el editor */
.est-lienzo{position:relative;height:100%;aspect-ratio:9/16;container-type:size;overflow:hidden;border-radius:16px;background:var(--fondo);isolation:isolate;user-select:none;-webkit-user-select:none;touch-action:none}
.est-medio{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:0}
.est-capas{position:absolute;inset:0;z-index:1}
.est-el{position:absolute;transform:translate(-50%,-50%) rotate(var(--giro,0deg)) scale(var(--escala,1));transform-origin:center;line-height:1}
.est-texto{width:max-content;max-width:84cqw;padding:.12em .34em;font-size:6.4cqw;line-height:1.24;font-weight:700;color:var(--color);white-space:pre-wrap;overflow-wrap:anywhere;text-shadow:0 1px 4px #0007}
.est-texto.est-resaltado{background:var(--color);color:var(--contra);border-radius:.32em;text-shadow:none;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.est-texto.est-contorno{-webkit-text-stroke:.07em var(--contra);paint-order:stroke fill;text-shadow:none}
.est-al-centro{text-align:center}.est-al-izquierda{text-align:left}.est-al-derecha{text-align:right}
.est-f-moderna{font-family:inherit}
.est-f-clasica{font-family:Georgia,'Times New Roman',serif;font-weight:600}
.est-f-manuscrita{font-family:'Segoe Script','Brush Script MT','Snell Roundhand',cursive;font-weight:600}
.est-f-maquina{font-family:'Courier New',Consolas,monospace;font-weight:700}
.est-f-impacto{font-family:Impact,'Arial Black','Segoe UI Black',sans-serif;font-weight:900;text-transform:uppercase;letter-spacing:.01em}
.est-emoji{font-size:16cqw;line-height:1.1;filter:drop-shadow(0 2px 6px #0005)}
.est-el img.emoji-propio{width:1em;height:1em;vertical-align:-.12em}
.est-sticker img{display:block;width:34cqw;height:34cqw;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 8px #0005)}
.est-sticker-roto{display:block;padding:.4em .7em;border-radius:10px;background:#0006;color:#fff;font-size:3.6cqw}
.est-sugerencia{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-size:6cqw;font-weight:600;color:#ffffffa6;pointer-events:none}

/* Visor */
.est-visor{position:fixed;inset:0;z-index:61;display:flex;align-items:center;justify-content:center;gap:16px;padding:12px;background:var(--est-oscuro);color:#fff;animation:mm-aparece .16s ease-out}
.est-visor-marco{position:relative;height:min(calc(100dvh - 24px),calc((100vw - 24px) * 16 / 9));aspect-ratio:9/16}
.est-visor-lienzo{height:100%}
.est-visor-arriba{position:absolute;left:0;right:0;top:0;z-index:3;padding:10px 10px 26px;border-radius:16px 16px 0 0;background:linear-gradient(#000a,#0000)}
.est-barras{display:flex;gap:4px}
.est-barra{flex:1;height:3px;border-radius:2px;background:#ffffff4d;overflow:hidden}
.est-barra i{display:block;height:100%;width:100%;background:#fff;transform-origin:left;transform:scaleX(var(--p,0))}
.est-visor-cabeza{display:flex;align-items:center;gap:6px;margin-top:10px}
.est-visor-cabeza .est-redondo{width:34px;height:34px;background:transparent}
.est-visor-cabeza .est-redondo:hover,.est-visor-cabeza .est-redondo:focus-visible{background:#ffffff2e}
.est-visor-quien{display:flex;align-items:center;gap:9px;flex:1;min-width:0}
.est-visor-quien span{display:flex;flex-direction:column;min-width:0}
.est-visor-quien strong{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 3px #0008}
.est-visor-quien small{font-size:11px;opacity:.8}
.est-zona{position:absolute;top:84px;bottom:64px;z-index:2;width:35%;background:transparent;cursor:pointer}
.est-zona-ant{left:0}.est-zona-sig{right:0;width:65%}
.est-zona:focus-visible{outline:none}
.est-flecha{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:#fff;background:#ffffff1a}
.est-flecha:hover{background:#ffffff33}
.est-flecha:disabled{visibility:hidden}
.est-flecha-sig .ico{transform:scaleX(-1)}
.est-vistas-btn{position:absolute;left:50%;bottom:14px;z-index:3;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;transform:translateX(-50%);color:#fff;background:#0007;backdrop-filter:blur(6px);font-size:12.5px;font-weight:600}
.est-vistas-btn .ico{width:16px;height:16px}
.est-vistas{position:absolute;left:0;right:0;bottom:0;z-index:4;max-height:60%;overflow-y:auto;padding:12px 14px 16px;border-radius:18px 18px 16px 16px;background:var(--surface);color:var(--text);box-shadow:0 -10px 40px #0006;animation:flot-hoja .18s ease-out}
.est-vistas-cabeza{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.est-vistas-cabeza .est-redondo{color:var(--text);background:var(--surface2)}
.est-vistas-lista{list-style:none;margin:0;padding:0}
.est-vistas-lista li{display:flex;align-items:center;gap:10px;padding:7px 2px;font-size:13px}
.est-vistas-lista strong{flex:1;font-weight:600}
.est-vistas-lista small{font-size:11px;color:var(--muted)}
.est-vistas-nota{margin:8px 0;font-size:12px;color:var(--muted)}
.est-lienzo.est-cargando::after,.est-lienzo.est-fallo::after{position:absolute;left:50%;top:50%;z-index:2;transform:translate(-50%,-50%)}
.est-lienzo.est-cargando::after{content:"";width:34px;height:34px;border-radius:50%;border:3px solid #ffffff40;border-top-color:#fff;animation:est-gira .8s linear infinite}
.est-lienzo.est-fallo::after{content:"No se pudo reproducir este video";padding:8px 14px;border-radius:10px;background:#0009;color:#fff;font-size:12px;white-space:nowrap}
@keyframes est-gira{to{transform:translate(-50%,-50%) rotate(360deg)}}

/* Audio en el visor: etiqueta abajo o, sin nada más, disco al centro */
.est-audio{display:none}
.est-aud-marca{position:absolute;left:12px;bottom:14px;z-index:1;display:inline-flex;align-items:center;gap:7px;padding:6px 11px;border-radius:999px;background:#0008;backdrop-filter:blur(6px);color:#fff;font-size:12px;font-weight:600;pointer-events:none}
.est-aud-marca .ico{width:15px;height:15px}
.est-aud-marca small{font-size:11px;opacity:.85;font-variant-numeric:tabular-nums}
.est-ondas{display:inline-flex;align-items:center;gap:2px;height:14px}
.est-ondas i{display:block;width:3px;height:30%;border-radius:2px;background:currentColor;transform-origin:center}
.est-sonando .est-ondas i{animation:est-onda .9s ease-in-out infinite alternate}
.est-ondas i:nth-child(2){animation-delay:-.2s}
.est-ondas i:nth-child(3){animation-delay:-.5s}
.est-ondas i:nth-child(4){animation-delay:-.1s}
.est-ondas i:nth-child(5){animation-delay:-.35s}
@keyframes est-onda{from{height:25%}to{height:100%}}
.est-aud-solo{left:50%;top:50%;bottom:auto;flex-direction:column;gap:14px;padding:0;background:none;backdrop-filter:none;transform:translate(-50%,-50%);font-size:14px}
.est-aud-disco{display:grid;place-items:center;width:30cqh;max-width:60cqw;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffffff40,#ffffff12 60%,#0002);box-shadow:0 0 0 1px #ffffff40,0 18px 40px #0005}
.est-aud-disco .ico{width:36%;height:36%}
.est-aud-solo .est-ondas{height:28px;gap:4px}
.est-aud-solo .est-ondas i{width:5px}
.est-aud-solo small{font-size:13px}

/* Reproductor movible del lienzo: barra con ondas o disco que gira */
.est-repro{color:#fff}
.est-repro svg{display:block;width:100%;height:100%}
.est-repro-barra{display:flex;align-items:center;gap:3.2cqw;width:66cqw;padding:2.4cqw 4.2cqw 2.4cqw 2.4cqw;border-radius:999px;background:#0000006b;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);box-shadow:0 4px 18px #0004,inset 0 0 0 1px #ffffff2e}
.est-repro-boton{flex:none;display:grid;place-items:center;width:9.4cqw;height:9.4cqw;padding:2.3cqw 2cqw 2.3cqw 2.6cqw;border-radius:50%;background:#fff;color:#1b1b1b}
.est-repro-ondas{position:relative;flex:1;height:8cqw}
.est-repro-pista,.est-repro-lleno{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between}
.est-repro-ondas i{display:block;width:.9cqw;height:var(--h);border-radius:1cqw;background:currentColor}
.est-repro-pista i{opacity:.38}
.est-repro-lleno{clip-path:inset(0 calc(100% - var(--avance,0) * 100%) 0 0)}
.est-repro-tiempo{flex:none;font-size:3.4cqw;font-weight:700;font-variant-numeric:tabular-nums;text-shadow:0 1px 3px #0006}
.est-repro-disco{display:flex;flex-direction:column;align-items:center;gap:2.6cqw}
.est-repro-anillo{display:grid;place-items:center;width:40cqw;height:40cqw;padding:1.3cqw;border-radius:50%;background:conic-gradient(#fff calc(var(--avance,0) * 360deg),#ffffff3d 0);box-shadow:0 8px 26px #0006}
.est-repro-vinilo{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:conic-gradient(from 20deg,#fff0,#ffffff24 8%,#fff0 18%,#fff0 50%,#ffffff24 58%,#fff0 68%),repeating-radial-gradient(circle,#171214 0 1.1%,#282124 1.1% 2%);animation:est-disco 4s linear infinite;animation-play-state:paused}
.est-sonando .est-repro-vinilo{animation-play-state:running}
.est-repro-etiqueta{display:grid;place-items:center;width:38%;height:38%;padding:9%;border-radius:50%;background:linear-gradient(150deg,#8f2236,#d39a45);box-shadow:0 0 0 .8cqw #0003}
.est-repro-disco .est-repro-tiempo{padding:.7cqw 2.6cqw;border-radius:999px;background:#0000006b}
@keyframes est-disco{to{transform:rotate(360deg)}}

/* Editor */
.est-ed{position:fixed;inset:0;z-index:61;display:flex;flex-direction:column;background:var(--est-oscuro);color:#fff;animation:mm-aparece .16s ease-out}
.est-ed-cabeza{display:flex;align-items:center;gap:12px;padding:10px 14px;flex:none}
.est-ed-titulo{font-size:15px}
.est-ed-paso{margin-left:auto;font-size:12px;opacity:.7}
.est-rec,.est-esc{flex:1 1 0;min-height:0;display:flex;flex-direction:column;align-items:center;gap:10px;padding:0 14px 12px}
.est-rec-marco{flex:1 1 0;min-height:0;width:100%;display:grid;place-items:center}
.est-rec-lienzo{display:block;width:min(100%,calc((100dvh - 250px) * var(--p,1)));aspect-ratio:var(--p,1);border-radius:12px;cursor:grab;touch-action:none;box-shadow:0 0 0 1px #ffffff40}
.est-rec-lienzo.arrastrando{cursor:grabbing}
.est-rec-lienzo:focus-visible{outline:2px solid #fff;outline-offset:3px}
.est-rec-formatos,.est-rec-controles,.est-rec-pie{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
.est-rec-zoom{display:flex;align-items:center;gap:8px;min-width:180px}
.est-rec-zoom .ico{width:16px;height:16px;opacity:.8}
.est-rec-zoom input,.est-sel-rango input{flex:1;accent-color:#fff}
.est-rec-pie{width:min(520px,100%);justify-content:space-between}
.est-esc-marco{flex:1 1 0;min-height:0;width:100%;display:grid;place-items:center}
.est-caja{position:relative;height:min(100%,calc((100vw - 28px) * 16 / 9));aspect-ratio:9/16}
.est-caja-lienzo{height:100%}
.est-editable .est-el{cursor:grab;touch-action:none;outline:none}
.est-editable .est-el:focus-visible,.est-editable .est-el.est-elegido{outline:calc(2px / var(--escala,1)) dashed #ffffffd9;outline-offset:calc(4px / var(--escala,1))}
.est-editable.est-moviendo .est-el.est-elegido{cursor:grabbing;outline-color:transparent}
.est-papelera{position:absolute;left:50%;bottom:14px;z-index:2;display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;transform:translateX(-50%);background:#000a;font-size:12px;opacity:0;pointer-events:none;transition:opacity .12s ease,background .12s ease}
.est-papelera .ico{width:16px;height:16px}
.est-moviendo .est-papelera{opacity:1}
.est-borrando .est-papelera{background:#d9364a}
.est-borrando .est-el.est-elegido{opacity:.55}
.est-herr{position:absolute;top:0;left:calc(100% + 12px);display:flex;flex-direction:column;gap:8px}
.est-herr-btn{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 14px 0 10px;border-radius:999px;color:#fff;background:#ffffff1a;font-size:12.5px;font-weight:600;white-space:nowrap}
.est-herr-btn:hover,.est-herr-btn:focus-visible,.est-herr-btn[aria-expanded=true]{background:#ffffff38}
.est-herr-btn .ico{width:20px;height:20px}
.est-paleta{position:absolute;top:0;left:calc(100% + 150px);display:grid;grid-template-columns:repeat(2,34px);gap:8px;padding:10px;border-radius:16px;background:#1d1719;box-shadow:0 12px 30px #0008}
.est-muestra{width:34px;height:34px;border-radius:50%;border:2px solid #ffffff40}
.est-muestra[aria-checked=true]{border-color:#fff;box-shadow:0 0 0 2px var(--est-oscuro),0 0 0 4px #fff}
.est-sel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;width:min(620px,100%)}
.est-sel-rango{display:flex;align-items:center;gap:6px;min-width:130px;flex:1}
.est-sel-rango .ico{width:16px;height:16px;opacity:.8}
.est-tramo{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;width:min(620px,100%)}
.est-tramo-pista{position:relative;height:38px;border-radius:10px;background:#ffffff14}
.est-tramo-sel{position:absolute;top:0;bottom:0;left:var(--a,0%);right:calc(100% - var(--b,100%));border:2px solid #fff;border-radius:10px;background:#ffffff26}
.est-tramo-cabezal{position:absolute;top:4px;bottom:4px;left:var(--t,0%);width:2px;background:#f6d365;border-radius:1px;pointer-events:none}
.est-tramo-pista input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;pointer-events:none;-webkit-appearance:none;appearance:none}
.est-tramo-pista input::-webkit-slider-runnable-track{background:none;height:100%}
.est-tramo-pista input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:38px;border-radius:5px;background:#fff;box-shadow:0 0 0 1px #0004;cursor:ew-resize;pointer-events:auto}
.est-tramo-pista input::-moz-range-thumb{width:14px;height:38px;border:0;border-radius:5px;background:#fff;cursor:ew-resize;pointer-events:auto}
.est-tramo-pista input::-moz-range-track{background:none}
.est-tramo-pista input:focus-visible::-webkit-slider-thumb{outline:2px solid #f6d365;outline-offset:1px}
.est-tramo-info{grid-column:1/-1;margin:0;text-align:center;font-size:12px;opacity:.85}
.est-ed-pie{display:flex;align-items:center;justify-content:space-between;gap:12px;width:min(620px,100%);flex:none}
.est-aviso{margin:0;font-size:12px;line-height:1.5;opacity:.85}
.est-aviso.est-error{color:#ffb3bb;opacity:1}
.est-publicar{flex:none;display:inline-flex;align-items:center;gap:8px}
.est-subiendo .est-publicar{background:linear-gradient(90deg,var(--primary) var(--subida,0%),color-mix(in srgb,var(--primary) 45%,#000) var(--subida,0%))}

/* Editor de texto */
.est-ted{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;gap:12px;padding:12px 14px 16px;background:#0e0a0cd9;backdrop-filter:blur(6px)}
.est-ted-arriba{display:flex;justify-content:space-between;align-items:center}
.est-ted-fuentes{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;justify-content:center;flex-wrap:wrap}
.est-ted-centro{flex:1;min-height:0;display:grid;place-items:center;padding:8px}
.est-ted-area{width:min(560px,100%);max-height:50dvh;resize:none;border:0;outline:none;background:transparent;color:var(--color);font-size:clamp(24px,4.4vw,40px);line-height:1.24;font-weight:700;caret-color:#fff;overflow-y:auto;padding:.12em .34em;text-shadow:0 1px 4px #0007}
.est-ted-area.est-resaltado{background:var(--color);color:var(--contra);border-radius:.32em;text-shadow:none}
.est-ted-area.est-contorno{-webkit-text-stroke:.07em var(--contra);paint-order:stroke fill;text-shadow:none}
.est-ted-area::placeholder{color:#ffffff73;-webkit-text-stroke:0}
.est-ted-abajo{display:flex;flex-direction:column;align-items:center;gap:12px}
.est-ted-colores{display:flex;flex-wrap:wrap;justify-content:center;gap:9px}
.est-color{width:30px;height:30px;border-radius:50%;background:var(--c);border:2px solid #ffffff59}
.est-color[aria-checked=true]{border-color:#fff;box-shadow:0 0 0 2px #0e0a0c,0 0 0 4px #fff}
.est-ted-opciones{display:flex;gap:8px;align-items:center}
.est-ted-a{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;font-weight:800;color:var(--color)}
.est-ted-a.est-resaltado{background:var(--color);color:var(--contra)}
.est-ted-a.est-contorno{-webkit-text-stroke:1px var(--contra);paint-order:stroke fill}

/* Audio en el editor: etiqueta sobre el pie y hoja para grabar o elegir */
.est-aud-chip{display:flex;align-items:center;gap:8px;width:min(620px,100%);flex:none}
.est-aud-chip audio{display:none}
.est-aud-chip-info{flex:1;min-width:0;display:flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:999px;color:#fff;background:#ffffff1a;font-size:12.5px;font-weight:600;text-align:left}
.est-aud-chip-info:hover,.est-aud-chip-info:focus-visible{background:#ffffff38}
.est-aud-chip-info .ico{flex:none;width:17px;height:17px}
.est-aud-chip-info span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.est-aud-chip-info small{flex:none;font-size:11.5px;opacity:.8;font-variant-numeric:tabular-nums}
.est-aud-chip.est-sonando .est-aud-chip-info{box-shadow:inset 0 0 0 1px #9fd36a}
.est-aud{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;gap:14px;padding:12px 14px 16px;background:#0e0a0ce6;backdrop-filter:blur(6px)}
.est-aud-arriba{display:flex;justify-content:space-between;align-items:center;gap:10px}
.est-aud-arriba strong{font-size:14px}
.est-aud-arriba .primary:disabled{opacity:.45}
.est-aud-cuerpo{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;width:min(620px,100%);margin:0 auto}
.est-aud-opciones{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
.est-aud-op{display:flex;flex-direction:column;align-items:center;gap:8px;padding:22px 12px;border-radius:18px;border:1px solid #ffffff2e;background:#ffffff0f;color:#fff;text-align:center;transition:border-color .12s ease,background .12s ease}
.est-aud-op:hover,.est-aud-op:focus-visible{border-color:#9fd36a;background:#ffffff1a}
.est-aud-op strong{font-size:14px}
.est-aud-op small{font-size:11.5px;opacity:.75;line-height:1.4}
.est-aud-op-ico{display:grid;place-items:center;flex:none;width:52px;height:52px;border-radius:16px;color:#fff;background:linear-gradient(150deg,#1f6b4f,#9fd36a)}
.est-aud-op-ico .ico{width:24px;height:24px}
.est-aud-nota{margin:0;font-size:12px;opacity:.75;text-align:center}
.est-aud-ficha{display:flex;align-items:center;gap:12px;width:100%}
.est-aud-ficha div{min-width:0;display:flex;flex-direction:column;gap:2px}
.est-aud-ficha strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.est-aud-ficha small{font-size:12px;opacity:.75}
.est-aud .est-tramo{width:100%;grid-template-columns:auto 1fr}
.est-aud-acciones{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.est-btn-claro.est-peligro:hover{background:#d9364a}
.est-aud-grab{display:flex;flex-direction:column;align-items:center;gap:10px}
.est-aud-nivel{display:grid;place-items:center;width:112px;height:112px;margin:22px 0 14px;border-radius:50%;background:#d9364a;box-shadow:0 0 0 calc(var(--nivel,0) * 22px) #d9364a40;transition:box-shadow .08s linear}
.est-aud-nivel .ico{width:40px;height:40px}
.est-aud-tiempo{margin:0;font-size:30px;font-weight:700;font-variant-numeric:tabular-nums}
.est-aud-grab small{font-size:12px;opacity:.75}
.est-aud-aviso{margin:0;min-height:1.5em;font-size:12px;text-align:center;opacity:.85}
.est-aud-aviso.est-error{color:#ffb3bb;opacity:1}

/* Celular: herramientas sobre la escena y paneles a todo lo ancho */
@media (max-width:720px){
  .est-panel-capa{padding:0;align-items:stretch;bottom:calc(66px + env(safe-area-inset-bottom))}
  .est-panel{width:100%;max-height:none;border-radius:0;border:0}
  .est-visor{padding:0;gap:0}
  .est-visor-marco{height:min(100dvh,calc(100vw * 16 / 9))}
  .est-visor .est-lienzo,.est-visor-arriba{border-radius:0}
  .est-flecha{display:none}
  .est-herr{left:auto;right:8px;top:8px}
  .est-herr-btn{width:42px;padding:0;justify-content:center;background:#0006;backdrop-filter:blur(6px)}
  .est-herr-btn span{display:none}
  .est-paleta{left:auto;right:58px;top:8px}
  .est-ted-area{font-size:26px}
  .est-ted-colores{gap:min(9px,1.6vw)}
  .est-color{width:min(30px,7.4vw);height:min(30px,7.4vw)}
  .est-crear{gap:6px}
  .est-aud-op{padding:16px 8px}
}
@media (prefers-reduced-motion:reduce){.est-panel-capa,.est-visor,.est-ed,.est-vistas{animation:none}.est-sonando .est-ondas i{animation:none;height:70%}.est-repro-vinilo{animation:none}.est-aud-nivel{transition:none}}
