:root {
  --bg: #f6f7fb; --card: #fff; --text: #14161f; --muted: #6b7080; --line: #e3e5ee;
  --brand: #4f46e5; --brand-ink: #fff; --ok: #12805c; --warn-bg: #fff4e5; --warn: #8a4b00; --err: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1117; --card: #181b25; --text: #eceef6; --muted: #9096ab; --line: #2a2e3d;
    --brand: #818cf8; --brand-ink: #10121a; --ok: #4ade80; --warn-bg: #3a2a10; --warn: #fbbf77; --err: #f87171; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 24px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 32px 16px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--brand); color: var(--text); }
button, .btn { font: inherit; font-weight: 600; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; }
button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); font-size: 14px; }
.price { font-size: 28px; font-weight: 700; }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.err { color: var(--err); }
.ok { color: var(--ok); }
select, input[type=text] { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.files { max-height: 160px; overflow: auto; font-size: 14px; margin: 12px 0 0; padding: 0; list-style: none; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.files li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; cursor: pointer; }
.radio input { margin-right: 8px; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.hidden { display: none !important; }
.link { word-break: break-all; font-family: ui-monospace, monospace; background: var(--bg); padding: 10px; border-radius: 8px; flex: 1; }
