:root {
  --bg: #f4f5f7; --card: #fff; --text: #16181d; --muted: #6b7280; --line: #e3e5ea;
  --accent: #e11d48; --accent-2: #be123c; --ok: #15803d; --err: #b91c1c; --warn: #a16207;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --card: #181b21; --text: #eceef2; --muted: #9aa1ad; --line: #2a2e37;
          --ok: #4ade80; --err: #f87171; --warn: #facc15; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.top h1 { font-size: 1.35rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 1.1rem; }
.link { color: var(--muted); text-decoration: none; font-size: .9rem; }
.link:hover { color: var(--text); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card.narrow { max-width: 380px; margin: 40px auto; }
h2 { font-size: 1.1rem; margin: 0 0 4px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 6px; }
input[type=text], input[type=password], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 200px; }
.row.two > div { flex: 1; min-width: 120px; }
.row.end { justify-content: flex-end; }
.btn { border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 11px 18px;
  border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.big { width: 100%; margin-top: 18px; padding: 14px; }
.row .btn.big { width: auto; flex: 1; margin-top: 8px; }
.btn:disabled { opacity: .6; cursor: progress; }
.video { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.thumb { position: relative; width: 240px; max-width: 100%; aspect-ratio: 16/9; border-radius: 10px;
  overflow: hidden; background: var(--line); flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff;
  font-size: .8rem; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.meta { flex: 1; min-width: 200px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .85rem; }
.error { color: var(--err); margin: 10px 0 0; }
.warn { color: var(--warn); margin: 8px 0 0; font-size: .9rem; }
.ok { color: var(--ok); margin: 0 0 6px; word-break: break-word; }
.ok strong { color: var(--text); }
fieldset.types { border: 0; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.types legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; padding: 0; }
.pill { margin: 0; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pill:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pill input { accent-color: var(--accent); margin: 0; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 4px; accent-color: var(--accent); }
details.opts { margin-top: 16px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
details summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.job-msg { font-weight: 600; margin: 18px 0 8px; }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.bar.indeterminate > div { width: 35%; animation: slide 1.2s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
#done { margin-top: 18px; }
.foot { text-align: center; margin-top: 24px; }
[hidden] { display: none !important; }
@media (max-width: 520px) { .thumb { width: 100%; } }
