/* ===== Creador de GIF =====
   Diseño solo de esta herramienta. Se carga después de /assets/style.css. */
.vg { padding: 40px 16px 80px; }
.vg h1 { font-size: clamp(28px, 5vw, 40px); margin: 16px 0 8px; letter-spacing: -.02em; }
.vg .lead { max-width: 760px; }
.vg-tool { max-width: 860px; }
.vg-drop { aspect-ratio: auto; min-height: 170px; }
.vg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.vg-head b { word-break: break-all; }
.vg video { width: 100%; max-height: 380px; background: #000; border-radius: 12px; display: block; }
.vg-h { font-size: 17px; margin: 20px 0 10px; }

/* Barra para elegir el fragmento */
.vg-range { position: relative; height: 44px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; margin: 0 10px; touch-action: none; cursor: pointer; }
.vg-sel { position: absolute; top: 0; bottom: 0; background: rgba(98, 70, 234, .22); border-left: 3px solid var(--brand); border-right: 3px solid var(--brand); }
.vg-play { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); pointer-events: none; }
.vg-handle { position: absolute; top: 50%; width: 22px; height: 34px; margin-left: -11px; transform: translateY(-50%); border-radius: 7px;
             background: var(--brand); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: ew-resize; padding: 0; touch-action: none; }
.vg-handle::after { content: ""; position: absolute; left: 50%; top: 9px; bottom: 9px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .8); }
.vg-handle:focus-visible { outline: 3px solid rgba(98, 70, 234, .4); }
.vg-times { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin: 6px 10px 0; }
.vg-marks { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 12px; }
.vg-marks label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 600; }
.vg-marks input { width: 80px; padding: 7px 9px; font-size: 14px; font-variant-numeric: tabular-nums; }
.vg-marks .btn, .vg-len .btn { width: auto; }
.vg-len { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; font-size: 15px; }
#limit-msg .nudge, #file-msg .nudge { margin-top: 12px; }
#limit-msg:empty { display: none; }

/* Formatos */
                     padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
#go:disabled { opacity: .5; cursor: not-allowed; }
.vg-done { margin-top: 14px; display: grid; gap: 8px; }
.vg-done .hint { margin: 0; }
.vg-done a { color: var(--brand-2); font-weight: 600; }

/* Opciones */
.vg-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 6px 0 16px; }
@media (max-width: 640px) { .vg-opts { grid-template-columns: minmax(0, 1fr); } }
.vg-opt > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.vg-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.vg-seg button { flex: 1; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 8px; border-radius: 10px; border: 1px solid var(--line);
                 background: var(--bg-2); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.vg-seg button.active { border-color: var(--brand); background: rgba(98, 70, 234, .15); color: var(--text); }
.vg-seg button small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.vg-checks { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 16px; }
.vg-checks label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 0; cursor: pointer; }
.vg-checks input { width: 18px; height: 18px; accent-color: var(--brand); }
.vg-est { font-size: 13px; margin: -4px 0 14px; }

/* Resultado */
.vg-result { margin-top: 18px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); }
.vg-result-img { display: grid; place-items: center; border-radius: 10px; overflow: hidden;
                 background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 18px 18px; }
.vg-result-img img { max-width: 100%; max-height: 420px; display: block; }
.vg-result-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.vg-result-bar .btn { width: auto; }
.vg-size b { font-size: 16px; }
.vg-heavy { color: #b45309; font-size: 14px; margin: 10px 0 0; }
