
  :root {
    --bg:#f5f7fb;
    --card:#ffffff;
    --muted:#5c6475;
    --accent:#2979ff;
    --ok:#1e8e3e;
    --warn:#e6a700;
    --err:#d93025;
  }

  html, body {
    margin:0;
    height:100%;
    background:var(--bg);
    color:#000;
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial;
  }

  .wrap { max-width:980px; margin:0 auto; padding:24px; }

  .card {
    background:var(--card);
    border:1px solid rgba(0,0,0,.08);
    border-radius:16px;
    box-shadow:0 6px 16px rgba(0,0,0,.1);
    padding:24px;
  }

  h1 {
    font-size:24px;
    margin:0 0 16px;
    color:#000;
  }

  .row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

  .controls {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin:12px 0 4px;
  }

  label {
    font-size:13px;
    color:#333;
    display:block;
    margin:0 0 6px;
    font-weight:600;
  }

  select, button, input[type="file"] {
    width:100%;
    box-sizing:border-box;
    background:#fff;
    color:#000;
    border:1px solid rgba(0,0,0,.15);
    border-radius:10px;
    padding:10px 12px;
    transition:all .15s ease;
  }

  select:focus, input:focus, button:focus {
    outline:none;
    border-color:var(--accent);
    box-shadow:0 0 0 2px rgba(41,121,255,.2);
  }

  button { cursor:pointer; font-weight:500; }
  button.primary {
    background:linear-gradient(90deg,#2979ff,#5393ff);
    color:#fff;
    border:none;
  }
  button.secondary {
    background:#f0f3f9;
    color:#000;
    border:1px solid rgba(0,0,0,.1);
  }
  button:disabled { opacity:.6; cursor:not-allowed; }

  .drop {
    border:2px dashed rgba(0,0,0,.15);
    border-radius:16px;
    padding:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:120px;
    text-align:center;
    background:#fafbff;
    transition:border-color .15s ease, background .15s ease;
  }
  .drop.drag {
    border-color:var(--accent);
    background:#e8f1ff;
  }

  .status {
    margin-top:10px;
    font-size:13px;
    color:#333;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
  }

  .badge {
    padding:4px 8px;
    border-radius:999px;
    font-size:12px;
    background:#e9ecf3;
    border:1px solid rgba(0,0,0,.1);
    color:#000;
  }

  .ok { background:#e6f4ea; border-color:#c1e1c6; color:var(--ok); }
  .warn { background:#fff8e1; border-color:#f3e2a5; color:var(--warn); }
  .err { background:#fdecea; border-color:#f5c2b5; color:var(--err); }

  .progress {
    height:16px;
    background:#edf1f6;
    border:1px solid rgba(0,0,0,.1);
    border-radius:999px;
    margin-top:8px;
    position:relative;
    overflow:hidden;
  }
  .bar {
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#2979ff,#7da8ff);
    transition:width .15s ease;
  }
  #percent {
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    font-size:11px;
    color:#000;
    pointer-events:none;
    user-select:none;
  }

  .out {
    margin-top:16px;
    background:#fafbff;
    border:1px solid rgba(0,0,0,.1);
    border-radius:12px;
    padding:12px;
    max-height:420px;
    overflow:auto;
    white-space:pre-wrap;
    color:#000;
  }

  .seg {
    padding:8px 10px;
    border-bottom:1px dashed rgba(0,0,0,.08);
  }
  .seg:last-child { border-bottom:none; }

  .ts {
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Courier New";
    font-size:12px;
    color:#444;
    margin-right:8px;
  }

  .small { font-size:12px; color:var(--muted); }
  .footer { margin-top:14px; font-size:13px; color:#444; }

  .tools { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
  .tools .group { display:flex; gap:8px; flex-wrap:wrap; }

  @media (max-width:860px){
    .row{ grid-template-columns:1fr; }
    .controls{ grid-template-columns:1fr 1fr; }
  }
