* { box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang TC", "Noto Sans TC", sans-serif;
  margin: 0; padding: 16px; background: #f7f7f8; color: #1a1a1a;
  max-width: 720px; margin: 0 auto;
}
header { padding: 24px 8px; }
header.topbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
header.topbar .nav {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
header.topbar .nav a {
  color: #4b5563; text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
}
header.topbar .nav a:hover { background: #eef2ff; color: #4f46e5; }
header.topbar .nav a.active { background: #4f46e5; color: white; }
button.link {
  background: transparent; color: #6b7280; padding: 6px 10px; font-size: 14px;
  border: none; cursor: pointer;
}
button.link:hover { color: #4f46e5; }
h1 { margin: 0; font-size: 22px; }
.subtitle { color: #666; font-size: 13px; }
.card {
  background: #fff; border-radius: 12px; padding: 20px;
  margin: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.hidden { display: none !important; }
.row { margin-bottom: 14px; }
label {
  display: block; font-size: 13px; color: #444; margin-bottom: 6px; font-weight: 500;
}
input, select {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff;
}
input:focus, select:focus { outline: 2px solid #4f46e5; border-color: #4f46e5; }
.hint { color: #888; font-size: 12px; margin-top: 4px; }
button {
  font-family: inherit; font-size: 15px; padding: 12px 24px;
  border-radius: 8px; border: none; cursor: pointer; font-weight: 500;
}
button.primary {
  background: #4f46e5; color: white; width: 100%;
}
button.primary:hover { background: #4338ca; }
button.primary:disabled { background: #9ca3af; cursor: not-allowed; }
button.secondary {
  background: #f3f4f6; color: #374151; margin-top: 12px;
}
.bar {
  height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden;
  margin: 12px 0;
}
.fill {
  height: 100%; background: linear-gradient(90deg, #4f46e5, #7c3aed);
  width: 0%; transition: width 0.3s;
}
#progressLabel { font-size: 14px; color: #374151; }
.download-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #f9fafb; border-radius: 8px; margin: 6px 0;
}
.download-item a {
  color: #4f46e5; text-decoration: none; font-weight: 500;
}
.download-item a:hover { text-decoration: underline; }
h2 { margin: 0 0 12px 0; font-size: 18px; }
#resultSummary { color: #4b5563; font-size: 14px; margin-bottom: 16px; }
.history-item {
  padding: 10px 14px; background: #f9fafb; border-radius: 8px; margin: 6px 0;
  cursor: pointer; transition: background 0.15s;
}
.history-item:hover { background: #f3f4f6; }
.history-item .meta { color: #6b7280; font-size: 12px; margin-top: 4px; }
