.sc *, .sc *::before, .sc *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sc {
  --bg: #ffffff;
  --surface: #f5f7fb;
  --border: #e2e7ef;
  --border2: #c3d0ea;
  --text: #0f1b33;
  --muted: #596378;
  --muted2: #596378;
  --accent: #1d4ed8;
  --accent2: #173ea8;
  --danger: #dc2626;
  --success: #0e9f6e;
  --radius: 10px;
  --sidebar: 220px;

  --img: #2563eb;
  --aud: #059669;
  --vid: #7c3aed;
  --doc: #9333ea;
  --comp: #0891b2;
  --arc: #d97706;
  --ver: #e11d48;
  font-family: var(--font-body, 'Instrument Sans', system-ui, sans-serif);
  color: var(--text);
}
.sc :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sc h1, .sc h2, .sc h3 { letter-spacing: normal; }
.sc .container { margin-inline: auto; }

.sc-wrap { padding: var(--app-gutter, 24px) 0; }
.sc-app {
  display: flex; flex-direction: column;
  height: calc(100vh - 2 * var(--app-gutter, 24px));
  height: calc(100dvh - 2 * var(--app-gutter, 24px));
  min-height: 480px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
}

.sc .app-body {
  flex: 1; min-height: 0;
  display: flex; overflow: hidden; position: relative;
  border-top: 1px solid var(--border);
  --sidebar-w: var(--sidebar);
}
.sc .app-body.sidebar-collapsed { --sidebar-w: 0px; }

.sc .sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; padding: 16px 10px;
  transition: width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}
.sc .app-body.sidebar-collapsed .sidebar {
  padding-left: 0; padding-right: 0; opacity: 0; overflow: hidden;
  border-right-color: transparent; pointer-events: none;
}
.sc .sidebar-handle {
  position: absolute; top: 50%; left: var(--sidebar-w); transform: translate(-50%, -50%); z-index: 40;
  width: 18px; height: 40px; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: left 0.25s ease, border-color 0.15s;
}
.sc .sidebar-handle-dots { display: grid; grid-template-columns: repeat(2, 3px); grid-auto-rows: 3px; gap: 2.5px; }
.sc .sidebar-handle-dots span { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); transition: background 0.15s; }
.sc .sidebar-handle:hover { border-color: var(--accent); }
.sc .sidebar-handle:hover .sidebar-handle-dots span { background: var(--accent); }

.sc .sidebar-section {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); padding: 10px 10px 6px;
}
.sc .sidebar-btn {
  display: flex; align-items: center; gap: 10px; position: relative;
  width: 100%; padding: 9px 10px; border-radius: 8px; border: none; background: transparent;
  color: var(--muted2); font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  cursor: pointer; text-align: left; transition: background 0.12s, color 0.12s;
}
.sc .sidebar-btn:hover { background: var(--border); color: var(--text); }
.sc .sidebar-btn.active { background: var(--border); color: var(--text); font-weight: 600; }
.sc .sidebar-btn.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.sc .sidebar-count {
  margin-left: auto; font-family: monospace; font-size: 0.65rem;
  background: var(--border2); color: var(--muted2); padding: 1px 6px; border-radius: 20px;
}
.sc .sidebar-privacy { margin-top: auto; padding: 12px 10px 4px; font-size: 0.68rem; color: var(--muted); line-height: 1.5; }
.sc .sidebar-privacy strong { color: var(--muted2); }

.sc .main { flex: 1; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; }
.sc .noscript-msg {
  margin: 16px 24px; padding: 12px 16px; text-align: center;
  border: 1px solid var(--accent2); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: .85rem; line-height: 1.55;
}

.sc .panel-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; row-gap: 8px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; position: sticky; top: 0; z-index: 3; background: var(--bg);
}
.sc .panel-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sc .panel-header[data-cat="images"]      .panel-cat-dot { background: var(--img); }
.sc .panel-header[data-cat="audio"]       .panel-cat-dot { background: var(--aud); }
.sc .panel-header[data-cat="video"]       .panel-cat-dot { background: var(--vid); }
.sc .panel-header[data-cat="documents"]   .panel-cat-dot { background: var(--doc); }
.sc .panel-header[data-cat="compression"] .panel-cat-dot { background: var(--comp); }
.sc .panel-header[data-cat="archives"]    .panel-cat-dot { background: var(--arc); }
.sc .panel-header[data-cat="verifier"]    .panel-cat-dot { background: var(--ver); }
.sc .panel-cat-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.sc .panel-formats {
  font-family: monospace; font-size: 0.63rem; color: var(--muted);
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc .panel-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.sc .ctrl-group {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px;
}
.sc .ctrl-label { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.sc .ctrl-select { background: transparent; border: none; color: var(--text); font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; cursor: pointer; outline: none; }
.sc .ctrl-select option { background: var(--surface); color: var(--text); }

.sc .img-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 24px; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0;
}
.sc .img-tool-num { width: 72px; border-bottom: 1px solid var(--border2); }
.sc .img-tool-num:disabled { opacity: 0.4; cursor: not-allowed; }
.sc .img-tools-note { font-size: 0.66rem; color: var(--muted); }

.sc .comp-gauge-group { flex: 1; min-width: 260px; gap: 10px; }
.sc .comp-gauge { flex: 1; min-width: 80px; height: 6px; cursor: pointer; accent-color: #06B6D4; }
.sc .comp-gauge-end { font-size: 0.6rem; color: var(--muted); white-space: nowrap; }
.sc .comp-gauge-val { font-family: monospace; font-size: 0.7rem; font-weight: 700; min-width: 32px; text-align: right; color: #06B6D4; }
.sc .comp-gauge-lbl { font-size: 0.68rem; min-width: 68px; white-space: nowrap; color: #06B6D4; }

.sc .btn-convert, .sc .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; align-self: stretch; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  font-family: var(--font-body, 'Instrument Sans', system-ui, sans-serif);
  font-size: .88rem; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; white-space: nowrap;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  transition: border-color .15s, background .15s, color .15s;
}
.sc .btn-ghost:hover { color: var(--brand); border-color: #b9c9f5; background: var(--brand-tint); }
.sc .btn-convert { color: #fff; background: var(--accent); border-color: var(--accent); }
.sc .btn-convert:hover:not(:disabled) { color: #fff; background: var(--accent2); border-color: var(--accent2); }
.sc .btn-convert:disabled { opacity: .45; cursor: not-allowed; }

.sc .content-area { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.sc .tab-panel { display: none; flex-direction: column; gap: 16px; }
.sc .tab-panel.active { display: flex; }

.sc .dropzone {
  position: relative; text-align: center; cursor: pointer;
  border: 2px dashed var(--border2); border-radius: var(--radius); background: var(--surface);
  padding: 36px 24px; transition: border-color 0.2s, background 0.2s;
}
.sc .dropzone:hover, .sc .dropzone.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.sc .dz-title { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.sc .dz-sub { font-size: 0.75rem; color: var(--muted); margin-bottom: 3px; line-height: 1.5; }
.sc .dz-sub span { font-family: monospace; font-size: 0.68rem; color: var(--muted2); }
.sc .dz-note-inner { margin-top: 10px; font-size: 0.68rem; color: var(--muted); line-height: 1.5; }

.sc .panel-note {
  display: flex; gap: 8px; align-items: flex-start;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 8px; padding: 10px 14px; font-size: 0.73rem; color: var(--muted2); line-height: 1.5;
}

.sc .queue-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sc .empty-hint { padding: 24px; text-align: center; color: var(--muted); font-size: 0.78rem; }
.sc .file-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: auto; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px;
  transition: border-color 0.15s;
}
.sc .file-row:hover { border-color: var(--border2); }
.sc .ext-badge {
  width: 44px; padding: 4px 0; border-radius: 5px; text-align: center;
  font-family: monospace; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em;
  background: var(--border); color: var(--muted2);
}
.sc .file-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc .file-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc .file-size { font-family: monospace; font-size: 0.63rem; color: var(--muted); }
.sc .row-target {
  padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; cursor: pointer; outline: none;
}
.sc .row-target:focus { border-color: var(--border2); }
.sc .row-target option { background: var(--surface); }
.sc .row-right { display: flex; align-items: center; justify-content: flex-end; min-width: 120px; }
.sc .row-tag { font-family: monospace; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 20px; }
.sc .tag-queued { background: color-mix(in srgb, var(--muted) 12%, transparent); color: var(--muted); }
.sc .tag-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); cursor: help; }
.sc .progress-bar { width: 100px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.sc .progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }
.sc .file-dl {
  display: flex; align-items: center; gap: 5px; white-space: nowrap; text-decoration: none;
  font-size: 0.72rem; font-weight: 700; color: var(--success);
  padding: 4px 10px; border-radius: 5px;
  background: color-mix(in srgb, var(--success) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
  transition: background 0.12s;
}
.sc .file-dl:hover { background: color-mix(in srgb, var(--success) 18%, transparent); }
.sc .row-remove {
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--border2); font-size: 0.9rem; line-height: 1;
  cursor: pointer; padding: 4px; border-radius: 4px; transition: color 0.12s, background 0.12s;
}
.sc .row-remove:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.sc .comp-saving {
  font-family: monospace; font-size: 0.65rem; font-weight: 700; white-space: nowrap;
  background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  padding: 2px 7px; border-radius: 20px;
}
.sc .comp-saving.warn {
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.sc .row-move { display: flex; flex-direction: column; gap: 1px; }
.sc .row-move button {
  background: transparent; border: none; color: var(--muted); font-size: 0.55rem; line-height: 1;
  cursor: pointer; padding: 2px 5px; border-radius: 3px; transition: color 0.12s, background 0.12s;
}
.sc .row-move button:hover:not(:disabled) { color: var(--accent); background: var(--border); }
.sc .row-move button:disabled { opacity: 0.25; cursor: default; }
.sc .cancel-btn:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--bg)); }
.sc .dz-extra { margin-top: 12px; font-size: 0.72rem; color: var(--muted); }
.sc .dz-folder-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--accent); text-decoration: underline;
}
.sc .dz-folder-btn:hover { color: var(--accent2); }

.sc .conv-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0; height: 40px; padding: 0 20px; background: var(--surface); border-top: 1px solid var(--border);
}
.sc .conv-ft-status { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc .conv-live-ind { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sc .conv-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border2); transition: background 0.3s; }
.sc .conv-live-dot.active { background: var(--accent); animation: sc-pulse 1.5s infinite; }
.sc .conv-live-dot.done { background: var(--success); animation: none; }
.sc .conv-live-dot.error { background: var(--danger); animation: none; }
.sc .conv-live-txt { font-size: .68rem; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; }
@keyframes sc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.sc ::-webkit-scrollbar { width: 6px; height: 6px; }
.sc ::-webkit-scrollbar-track { background: transparent; }
.sc ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.sc ::-webkit-scrollbar-thumb:hover { background: var(--muted); }

@media (max-width: 900px) {
  .sc { --sidebar: 180px; }
  .sc .panel-formats { display: none; }
}
@media (max-width: 700px) {
  .sc { --sidebar: 0px; }
  .sc-app { height: auto; min-height: calc(100vh - 2 * var(--app-gutter, 24px)); min-height: calc(100dvh - 2 * var(--app-gutter, 24px)); }
  .sc .app-body { flex-direction: column; }
  .sc .sidebar {
    width: 100%; flex-direction: row; flex-wrap: nowrap; overflow-x: auto;
    padding: 8px; gap: 6px; border-right: none; border-bottom: 1px solid var(--border);
  }
  .sc .sidebar-section, .sc .sidebar-privacy, .sc .sidebar-count, .sc .sidebar-handle { display: none; }
  .sc .sidebar-btn { padding: 7px 12px; border-radius: 8px; }
  .sc .sidebar-btn.active::before { display: none; }
  .sc .main { overflow: auto; }
  .sc .content-area { overflow: visible; }
  .sc .file-row { grid-template-columns: 40px minmax(0, 1fr); gap: 6px; }
  .sc .row-right { min-width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc *, .sc *::before, .sc *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.sc .vf-drop { display: block; }
.sc .vf-drop .dz-title, .sc .vf-drop .dz-sub { display: block; }
.sc .vf-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sc .vf-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc .vf-files { margin-top: 10px; font-size: .8rem; font-weight: 600; color: var(--text); word-break: break-all; }
.sc .vf-progress { display: block; width: 100%; height: 6px; margin-top: 10px; accent-color: var(--accent); }
.sc .vf-progress[hidden] { display: none; }
.sc .vf-status { margin-top: 6px; min-height: 1.2em; font-size: .75rem; color: var(--muted); }
.sc .vf-options { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.sc .vf-opt { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted2); cursor: pointer; }
.sc .vf-out { display: flex; flex-direction: column; gap: 16px; }
.sc .vf-error { padding: 10px 14px; border-radius: 8px; background: #fef3f2; border: 1px solid #fecdca; color: #b42318; font-size: .8rem; line-height: 1.5; }
.sc .vf-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.sc .vf-verdict { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; }
.sc .vf-verdict i { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; font-size: 1.2rem; }
.sc .vf-verdict h3 { font-size: 1rem; }
.sc .vf-verdict p { margin-top: 3px; font-size: .8rem; line-height: 1.5; color: var(--muted2); }
.sc .vf-verdict[data-v="ok"] { background: #ecfdf3; border-color: #abefc6; }
.sc .vf-verdict[data-v="ok"] i { background: var(--success); }
.sc .vf-verdict[data-v="limited"] { background: #f2f4f7; border-color: #d0d5dd; }
.sc .vf-verdict[data-v="limited"] i { background: #667085; }
.sc .vf-verdict[data-v="warn"] { background: #fffaeb; border-color: #fedf89; }
.sc .vf-verdict[data-v="warn"] i { background: #dc6803; }
.sc .vf-verdict[data-v="danger"] { background: #fef3f2; border-color: #fecdca; }
.sc .vf-verdict[data-v="danger"] i { background: #b42318; }
.sc .vf-meta { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin-top: 14px; font-size: .78rem; }
.sc .vf-meta dt { color: var(--muted); }
.sc .vf-meta dd { margin: 0; word-break: break-all; }
.sc .vf-list { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.sc .vf-list li { border-left: 4px solid var(--border2); padding: 2px 0 2px 12px; }
.sc .vf-list li[data-l="danger"] { border-color: #b42318; }
.sc .vf-list li[data-l="warn"] { border-color: #dc6803; }
.sc .vf-list li[data-l="info"] { border-color: var(--accent); }
.sc .vf-list strong { display: block; font-size: .82rem; }
.sc .vf-list span { color: var(--muted); font-size: .76rem; line-height: 1.5; }
.sc .vf-note { color: var(--muted); font-size: .72rem; line-height: 1.55; }
.sc .vf-card .vf-note { margin-top: 10px; }
.sc .vf-notes { display: flex; flex-direction: column; gap: 8px; }
.sc .vf-urls { margin-top: 14px; font-size: .78rem; }
.sc .vf-urls summary { cursor: pointer; font-weight: 600; }
.sc .vf-urls ul { list-style: none; margin-top: 8px; display: grid; gap: 4px; max-height: 14rem; overflow: auto; }
.sc .vf-urls code { word-break: break-all; }
.sc .vf-clean { margin-top: 14px; padding: 12px 14px; border-radius: 8px; border: 1px solid #fedf89; background: #fffaeb; font-size: .8rem; line-height: 1.5; }
.sc .vf-clean[data-ok="1"] { border-color: #abefc6; background: #ecfdf3; }

@media print {
  .sc .no-print, .sc .sidebar, .sc .sidebar-handle, .sc .panel-header, .sc .conv-footer, .sc .vf-card .vf-note a { display: none !important; }
  .sc-app { height: auto; border: 0; box-shadow: none; overflow: visible; }
  .sc .app-body, .sc .main, .sc .content-area { overflow: visible; }
  .sc .vf-card { border-color: #999; break-inside: avoid; }
}
