:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --muted: #5b6b7c;
  --line: #d7e0ea;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --ok: #059669;
  --err: #dc2626;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 27, 45, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e0e7ff 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(960px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 0; gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: grid; place-items: center; color: #fff; font-size: 0.75rem; font-weight: 800;
}
.nav { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.95rem; }
.hero { padding: 1.5rem 0 0.5rem; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15; margin: 0 0 0.75rem;
}
.hero p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 42rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.badge {
  background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe;
  border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.85rem;
}
.panel {
  margin: 1.5rem 0 2rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem;
}
.dropzone {
  border: 2px dashed #93c5fd; border-radius: calc(var(--radius) - 4px);
  background: #f8fbff; padding: 2.5rem 1.25rem; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone.dragover { border-color: var(--brand); background: #eff6ff; }
.dropzone h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.dropzone p { margin: 0.25rem 0; color: var(--muted); }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  justify-content: space-between; margin-top: 1rem;
}
.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 0.65rem 1rem; font-weight: 600; cursor: pointer;
}
.btn:hover { background: #f8fafc; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.9rem; }
.btn-ghost { background: transparent; }
.muted { color: var(--muted); }
#limit-note { font-size: 0.92rem; color: var(--muted); }
.queue { display: grid; gap: 0.75rem; margin-top: 1rem; }
.item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 0.9rem; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; background: #fff;
}
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #e8eef6; }
.item-title { font-weight: 600; word-break: break-all; }
.item-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }
.progress {
  height: 6px; background: #e5eef8; border-radius: 999px; overflow: hidden; margin-top: 0.45rem;
}
.progress-bar { height: 100%; background: linear-gradient(90deg, #3b82f6, #6366f1); width: 0; transition: width .2s; }
.error-text { color: var(--err); font-size: 0.85rem; margin: 0.35rem 0 0; }
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin: 0 0 2.5rem;
}
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem;
}
.feature h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.site-footer {
  border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: 0.9rem;
}
.footer-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
@media (max-width: 640px) {
  .item { grid-template-columns: 48px 1fr; }
  .item-actions { grid-column: 1 / -1; }
  .thumb { width: 48px; height: 48px; }
}
