:root {
  color-scheme: dark;
  --background: #100f17;
  --panel: #191722;
  --well: #15131d;
  --line: #343041;
  --text: #f6f3ff;
  --muted: #bab4cb;
  --mint: #a2f9cc;
  --lavender: #cbb5ff;
  --danger: #ffadb8;
  font: 16px/1.55 system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .23em; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
[id] { scroll-margin-top: 92px; }
.wrap { width: min(1170px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 5; padding: 12px; background: var(--panel); }
.skip:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); background: #100f17f5; }
.header-inner, .site-footer { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; letter-spacing: -.045em; white-space: nowrap; }
.brand img { border-radius: 10px; }
.brand-accent, h1 em { color: var(--mint); }
.site-nav, .intro-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.site-nav a, .site-footer a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.site-nav a:hover, .site-footer a:hover { color: var(--mint); }
.intro { padding-block: clamp(38px, 7vw, 85px) 32px; }
h1, h2, h3 { line-height: 1.13; }
h1 { font-size: clamp(2.65rem, 6vw, 5rem); letter-spacing: -.065em; }
h1 em { font-style: normal; }
.intro p { max-width: 54ch; color: var(--muted); margin-block: 16px 22px; }
.intro-links a { color: var(--lavender); font-weight: 650; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 4vw, 34px); }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); letter-spacing: -.035em; margin-bottom: 16px; }
.panel h3 { font-size: 1.05rem; margin-bottom: 12px; }
.columns, .download-fields { display: grid; gap: clamp(16px, 4vw, 44px); }
.columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.download-fields { grid-template-columns: minmax(0, 1fr) minmax(140px, .28fr); }
.options { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; }
legend { font-size: 14px; font-weight: 700; margin-bottom: 6px; padding: 0; }
.options label { position: relative; flex: 1; text-align: center; }
.options input, .sr, .upload input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.options span { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px; cursor: pointer; font-size: 14px; font-weight: 700; }
.options input:checked + span { color: var(--lavender); background: #292239; border-color: #685480; }
.options input:focus-visible + span, .upload:focus-within { outline: 2px solid var(--mint); outline-offset: 3px; }
.upload { display: grid; place-content: center; gap: 4px; text-align: center; min-height: 160px; margin-top: 12px; padding: 16px; border: 1px dashed #685480; border-radius: 14px; background: var(--well); color: var(--lavender); cursor: pointer; overflow-wrap: anywhere; }
.upload span, .link span, .detail, .mirror small, .download-note, #status, #video-status { color: var(--muted); font-size: .875rem; }
.link { margin-top: 16px; display: grid; gap: 8px; font-weight: 600; }
.download-fields .link { margin-top: 0; }
.link input, .link select { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); color: var(--text); font: inherit; }
.detail { margin: 7px 0 14px; min-height: 36px; }
.download-note { margin-top: 12px; }
.mirror { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; cursor: pointer; }
.mirror input { accent-color: var(--mint); width: 18px; height: 18px; margin: 0; }
.mirror small { display: block; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line); }
.form-actions button { border: 1px solid transparent; border-radius: 12px; background: var(--mint); color: #10281d; padding: 11px 18px; font: inherit; font-weight: 750; cursor: pointer; }
.form-actions button:hover { background: #c1ffdf; }
.form-actions button:disabled { opacity: .65; cursor: wait; }
#status[data-error], #video-status[data-error] { color: var(--danger); }
.results ul { margin: 0; padding: 0; list-style: none; }
.results li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.results li:last-child { border: 0; }
.results a, #video-save { color: var(--mint); font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner, .site-footer { min-height: 64px; gap: 12px; }
  .site-nav { gap: 12px; }
  .columns, .download-fields { grid-template-columns: 1fr; }
}

.video-transfer { display: flex; align-items: center; gap: 10px; width: 100%; }
.video-transfer progress { flex: 1; min-width: 0; height: 12px; accent-color: var(--mint); }
#video-percent { color: var(--mint); font-size: .875rem; font-variant-numeric: tabular-nums; }
