:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5c6370;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --max: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }

header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 0;
  flex-wrap: wrap;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent); }
nav {
  display: flex;
  gap: .25rem .85rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: .92rem;
}
nav a { color: var(--muted); }
nav a:hover, nav a.active { color: var(--accent); text-decoration: none; }
nav .lang { font-weight: 600; color: var(--accent); }

main { flex: 1; padding: 2rem 0 3rem; }

.hero { text-align: center; padding: 1.5rem 0 2rem; }
.hero h1 {
  font-size: clamp(1.55rem, 4.5vw, 2.1rem);
  line-height: 1.25;
  margin: 0 0 .75rem;
  letter-spacing: -.02em;
}
.hero .tagline {
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .5rem;
  font-size: 1rem;
}
.hero .sub {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 36rem;
  font-size: 1.02rem;
}
.actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .7rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: #c5cad3; }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: none;
  padding: .35rem .5rem;
  font-size: .85rem;
  font-weight: 500;
}

.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 2rem 0;
}
@media (min-width: 560px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

.how { margin-top: 2rem; }
.how h2 { font-size: 1.2rem; margin: 0 0 1rem; text-align: center; }
.how ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: .75rem;
}
.how li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem .9rem 3rem;
  position: relative;
  counter-increment: step;
}
.how li::before {
  content: counter(step);
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-title { margin: 0 0 1.25rem; font-size: 1.5rem; }

.dropzone {
  border: 2px dashed #c5cad3;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 2rem 1rem;
  text-align: center;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.dropzone.dragover {
  border-color: var(--accent);
  background: #eff6ff;
}
.dropzone p { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; }
.dropzone input[type="file"] { display: none; }

.toolbar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 .75rem;
  align-items: center;
}
.list-title {
  font-size: .95rem;
  font-weight: 600;
  margin: 1.25rem 0 .5rem;
  color: var(--muted);
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.file-list .empty {
  color: var(--muted);
  padding: 1rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.file-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem .85rem;
  cursor: grab;
  user-select: none;
  box-shadow: var(--shadow);
}
.file-item.dragging { opacity: .5; }
.file-item .handle {
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.file-item .meta { flex: 1; min-width: 0; }
.file-item .name {
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item .info { font-size: .8rem; color: var(--muted); }
.status {
  margin-top: 1rem;
  font-size: .92rem;
  min-height: 1.4em;
  color: var(--muted);
}
.status.ok { color: #059669; }
.status.err { color: var(--danger); }

.privacy-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.privacy-body p {
  margin: 0 0 1rem;
  color: var(--muted);
}
.privacy-body p:last-child { margin-bottom: 0; }

footer.site {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}
