/*
 * The GIF maker (/play/gif-maker). Loaded after play.css, whose .pl tokens (--p-ui, --p-bg, --p-surface, --p-text,
 * --p-line-2) and buttons it reuses. No label is set below 12 px (.75rem). The three fonts are only for lettering
 * drawn into GIFs (SIL Open Font License 1.1; their licence texts sit beside them): the browser fetches one only
 * when the script first draws with it.
 */
@font-face{font-family:'Anton';src:url('fonts/Anton-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Passion One';src:url('fonts/PassionOne-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Russo One';src:url('fonts/RussoOne-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}

.gm-app{margin:0 0 40px;padding:16px;border:1px solid var(--p-line-2);border-radius:8px;background:var(--p-surface)}
.gm-h{margin:0 0 12px!important;font:900 1.75rem/1 var(--display);text-transform:uppercase}
.gm-h3{margin:0 0 12px!important;font:900 1.5rem/1 var(--display);text-transform:uppercase}
.gm-h3:focus{outline:none}
.gm-unsupported{padding:12px 16px;border-left:4px solid var(--pink);border-radius:6px;background:var(--p-bg);color:#fff}
.gm-hint{color:var(--muted);font-size:.875rem;line-height:1.5}
.gm-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

/* Choosing files */
.gm-drop{display:grid;gap:12px;justify-items:start;padding:24px 16px;border:2px dashed var(--p-line-2);border-radius:8px;background:var(--p-bg)}
.gm-drop.gm-over{border-color:var(--amber)}
.gm-drop-title{color:#fff;font:700 1.125rem/1.3 var(--p-ui)}
.gm-pick{cursor:pointer}
.gm-file{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}
.gm-row:has(.gm-file:focus-visible) .gm-pick{outline:3px solid var(--amber);outline-offset:2px}

/* The editor: the clip on one side, the settings on the other */
.gm-cols{display:grid;gap:20px}
@media (min-width:900px){.gm-cols{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start}}
.gm-col{min-width:0;margin:0;padding:0;border:0}
.gm-lock{min-width:0;margin:0;padding:0;border:0}
.gm-lock:disabled{opacity:.55}
.gm-stage{position:relative;margin:0 auto;overflow:hidden;border-radius:6px;background:#000;line-height:0}
.gm-video,.gm-still{display:block;width:100%;height:auto}
.gm-frame{position:absolute;left:0;top:0;width:100%;height:100%;outline:2px solid var(--amber);outline-offset:-2px;box-shadow:0 0 0 2000px rgba(0,0,0,.55);cursor:move;touch-action:none}
.gm-preview{display:block;width:100%;height:100%}
.gm-transport{display:flex;align-items:center;gap:10px;margin:10px 0}
.gm-play{min-width:76px}
.gm-scrub{flex:1;min-width:0;min-height:32px;accent-color:var(--amber)}
.gm-time{color:var(--muted);font:400 .8125rem/1.2 var(--p-ui);white-space:nowrap}
.gm-trim{display:grid;gap:0 12px;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.gm-length{margin:8px 0!important;color:var(--fog);font-size:.875rem;line-height:1.5}
.gm-change{margin:0 0 4px!important}
.gm-slide-list{display:grid;gap:6px;margin:0 0 12px;padding:0;list-style:none}
.gm-slide-list li{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.gm-slide-name{flex:1;min-width:120px;font-size:.875rem;overflow-wrap:anywhere}

/* Controls */
.gm-small{min-height:44px;padding:6px 12px;border:1px solid var(--p-line-2);border-radius:4px;background:var(--p-bg);color:var(--paper);font:700 .875rem/1.2 var(--p-ui);cursor:pointer}
.gm-small:hover{border-color:var(--amber);color:var(--amber)}
.gm-small:disabled{opacity:.5;cursor:default}
.gm-small[aria-pressed="true"]{border-color:var(--amber);color:var(--amber)}
.gm-set{min-width:0;margin:0 0 16px;padding:12px 14px 6px;border:1px solid var(--p-line-2);border-radius:6px}
.gm-set legend{padding:0 6px;color:var(--amber);font:800 .8125rem/1.3 var(--p-ui);letter-spacing:.12em;text-transform:uppercase}
.gm-field{display:grid;gap:6px;min-width:0;margin:0 0 12px}
.gm-field label{color:var(--p-text);font:700 .9375rem/1.35 var(--p-ui)}
.gm-field :is(input[type=text],input[type=number],select){width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--p-line-2);border-radius:4px;background:var(--p-bg);color:var(--p-text);font:400 1rem/1.3 var(--p-ui)}
.gm-field :is(input,select):focus-visible{border-color:var(--amber)}
.gm-field :is(input,select):disabled{opacity:.5}
.gm-field input[type=range]{width:100%;min-height:32px;accent-color:var(--amber)}
.gm-with-btn{display:flex;gap:8px;align-items:center}
.gm-with-btn input{flex:1;min-width:0}
.gm-with-btn .gm-small{flex:none}
.gm-grid{display:grid;gap:0 12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.gm-radios{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.gm-radio{position:relative;display:inline-flex}
.gm-radio input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.gm-radio label{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border:1px solid var(--p-line-2);border-radius:4px;background:var(--p-bg);color:var(--p-text);font:700 .875rem/1.2 var(--p-ui)}
.gm-radio input:checked + label{border-color:var(--amber);background:#1d1a10;color:var(--amber)}
.gm-radio input:focus-visible + label{outline:3px solid var(--amber);outline-offset:2px}
.gm-radio input:disabled{cursor:default}
.gm-radio input:disabled + label{opacity:.5}
.gm-check{display:flex;align-items:center;gap:10px;min-height:32px;margin:0 0 10px!important}
.gm-check input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--amber)}
.gm-check label{color:var(--p-text);font:400 .9375rem/1.35 var(--p-ui)}
.gm-check input:disabled + label{opacity:.5}
.gm-go{margin:0 0 4px!important}
.gm-make{width:100%;min-height:52px;font-size:1.0625rem}

/* Working, messages and the result */
.gm-working{display:grid;gap:12px;justify-items:start;margin:16px 0 0}
.gm-progress{width:100%;height:14px;accent-color:var(--amber)}
.gm-status{min-height:1.5em;margin:12px 0 0!important;color:var(--fog)}
.gm-error{margin:12px 0 0!important;padding:12px 16px;border-left:4px solid var(--pink);border-radius:6px;background:var(--p-bg);color:#fff}
.gm-result{margin-top:20px;padding-top:16px;border-top:1px solid var(--p-line-2)}
.gm-result-view{display:inline-block;max-width:100%;overflow:hidden;border-radius:6px;background:#000;line-height:0}
.gm-result-img,.gm-result-still{display:block;max-width:100%;height:auto}
.gm-summary{margin:10px 0!important;line-height:1.5}
.gm-fits{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px;padding:0;list-style:none}
.gm-fits li{padding:4px 10px;border:1px solid var(--p-line-2);border-radius:999px;font:700 .8125rem/1.4 var(--p-ui)}
.gm-fit{color:var(--cyan)}
.gm-nofit{color:var(--muted)}

@media (prefers-reduced-motion:reduce){.gm-app *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* The guide under the tool (static text, read without JavaScript) */
.gm-privacy{max-width:64ch;margin-top:10px!important;padding-left:12px;border-left:3px solid var(--cyan);color:var(--fog);font-size:.9375rem;line-height:1.5}
.gm-noscript{margin:0 0 24px!important;padding:12px 16px;border-left:4px solid var(--pink);border-radius:6px;background:var(--p-surface);color:#fff}
.gm-doc{max-width:860px}
.gm-doc-section{margin:0 0 32px}
.gm-doc-h{margin:0 0 12px!important;font:900 1.75rem/1.05 var(--display);text-transform:uppercase}
.gm-doc p{max-width:68ch;margin:0 0 12px;color:var(--fog);line-height:1.6}
.gm-doc strong{color:#fff}
.gm-doc-steps,.gm-doc-tips,.gm-doc-credits{display:grid;gap:10px;max-width:68ch;margin:0 0 12px;padding-left:1.4em;color:var(--fog);line-height:1.6}
.gm-doc-effects,.gm-doc-faq{max-width:68ch;margin:0 0 12px;color:var(--fog);line-height:1.6}
.gm-doc-effects dt,.gm-doc-faq dt{margin:14px 0 4px;color:#fff;font:700 1.0625rem/1.35 var(--p-ui)}
.gm-doc-effects dd,.gm-doc-faq dd{margin:0}
.gm-doc-checked{white-space:nowrap}
/* position:relative keeps the table's screen-reader-only notes inside the scrolling box (they are absolutely placed). */
.gm-doc-table-wrap{position:relative;max-width:100%;margin:0 0 12px;overflow-x:auto;border:1px solid var(--p-line-2);border-radius:6px}
.gm-doc-table{width:100%;min-width:640px;border-collapse:collapse;font-size:.9375rem;line-height:1.45}
.gm-doc-table th,.gm-doc-table td{padding:10px 12px;border-bottom:1px solid var(--p-line-2);text-align:left;vertical-align:top;color:var(--fog)}
.gm-doc-table thead th{color:var(--amber);font:800 .8125rem/1.3 var(--p-ui);letter-spacing:.1em;text-transform:uppercase}
.gm-doc-table tbody th{color:#fff;font-weight:700;white-space:nowrap}
.gm-doc-table tbody tr:last-child :is(th,td){border-bottom:0}
.gm-doc-links{margin-top:8px!important;line-height:2}
