:root {
  --ink: #17221c;
  --muted: #67736c;
  --paper: #f5f7f3;
  --surface: #ffffff;
  --line: #dbe2dc;
  --green: #177a4b;
  --green-dark: #0e5835;
  --yellow: #f2c94c;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
}

.topbar {
  min-height: 64px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--green); color: white; font-family: Georgia, serif; font-size: 20px; }
.summary { color: var(--muted); font-size: 14px; }

main { width: min(1040px, 90vw); margin: 0 auto; padding: 64px 0 80px; }
.upload-section { display: grid; grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr); gap: 64px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
h1 { max-width: 500px; margin: 0 0 18px; font-family: Georgia, "STSong", serif; font-size: clamp(44px, 7vw, 76px); line-height: 1.02; font-weight: 500; letter-spacing: 0; }
.intro > p:last-child { max-width: 460px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }

.drop-zone { padding: 36px; border: 1px solid var(--line); background: var(--surface); box-shadow: 12px 12px 0 #dfe8df; }
.drop-zone.dragging { border-color: var(--green); background: #eef8f1; }
#file-input { position: absolute; opacity: 0; pointer-events: none; }
.drop-zone label { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #a9b7ad; cursor: pointer; text-align: center; }
.drop-zone label:hover { border-color: var(--green); background: #f7fbf8; }
.upload-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 50%; background: var(--green); color: white; font-size: 26px; }
.drop-zone label strong { font-size: 17px; }
.drop-zone label span:last-child { color: var(--muted); font-size: 13px; }
.selected-file { margin: 18px 0 0; padding: 12px 14px; overflow: hidden; color: var(--muted); background: #f3f6f3; text-overflow: ellipsis; white-space: nowrap; }
button, .download { min-height: 44px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
#upload-button { width: 100%; margin-top: 18px; color: white; background: var(--green); }
#upload-button:hover { background: var(--green-dark); }
#upload-button:disabled { cursor: not-allowed; background: #aeb8b1; }
.progress-wrap { margin-top: 18px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.progress-track { flex: 1; height: 8px; overflow: hidden; background: #e4e9e5; }
.progress-bar { width: 0; height: 100%; background: var(--yellow); transition: width .15s ease; }
.status { min-height: 22px; margin: 12px 0 0; color: var(--green); font-size: 14px; }
.status.error { color: var(--danger); }

.files-section { margin-top: 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
h2 { margin: 0; font-family: Georgia, "STSong", serif; font-size: 34px; font-weight: 500; letter-spacing: 0; }
.refresh { width: 44px; padding: 0; border: 1px solid var(--line); background: var(--surface); font-size: 24px; }
.file-list { border-top: 1px solid var(--ink); }
.file-row { min-height: 84px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 18px; align-items: center; border-bottom: 1px solid var(--line); }
.file-badge { width: 54px; height: 42px; display: grid; place-items: center; background: #e3ede5; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.file-info { min-width: 0; }
.file-info h3 { margin: 0 0 6px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.file-info p { margin: 0; color: var(--muted); font-size: 13px; }
.download { min-width: 82px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; }
.download:hover { color: white; background: var(--ink); }
.empty-state { padding: 64px 24px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); text-align: center; }
.empty-state span { font-size: 34px; color: var(--green); }
.empty-state h3 { margin: 12px 0 6px; }
.empty-state p { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .topbar { padding: 0 20px; }
  .summary { display: none; }
  main { width: min(100% - 40px, 620px); padding-top: 42px; }
  .upload-section { grid-template-columns: 1fr; gap: 30px; }
  h1 { font-size: 48px; }
  .drop-zone { padding: 22px; box-shadow: 7px 7px 0 #dfe8df; }
  .files-section { margin-top: 72px; }
  .file-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
  .file-badge { width: 44px; }
  .download { min-width: 64px; }
}
