:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #1f1a17;
  --accent: #0f766e;
  --accent-2: #be123c;
  --line: #d6d0c4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #d8eee9 0, transparent 40%),
    radial-gradient(circle at 100% 100%, #ffd9e3 0, transparent 40%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.subtitle {
  margin: 10px 0 18px;
}

.card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, white);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.row {
  margin-bottom: 12px;
}

.inline {
  display: flex;
  gap: 8px;
}

input[type="text"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--accent);
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.ghost {
  background: transparent;
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.status {
  margin: 12px 0 0;
  font-weight: 600;
}

progress {
  width: 100%;
  height: 12px;
}

.download-area {
  min-height: 28px;
}

.download-item {
  margin-top: 8px;
}

.download-link {
  display: inline-block;
  text-decoration: none;
  color: white;
  background: var(--accent-2);
  border-radius: 999px;
  padding: 8px 14px;
}

@media (max-width: 640px) {
  .page {
    padding: 14px;
  }

  .inline {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }
}
