:root {
  --bg: #f5efe6;
  --bg-strong: #efe0cf;
  --panel: rgba(255, 250, 244, 0.82);
  --panel-border: rgba(96, 61, 42, 0.12);
  --text: #2f2118;
  --muted: #6e5a4d;
  --accent: #c95c2b;
  --accent-dark: #9d4018;
  --accent-soft: rgba(201, 92, 43, 0.14);
  --success: #255f45;
  --shadow: 0 20px 60px rgba(79, 43, 20, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 92, 43, 0.2), transparent 28%),
    radial-gradient(circle at right 20%, rgba(34, 95, 69, 0.16), transparent 22%),
    linear-gradient(180deg, #fbf6ef 0%, var(--bg) 48%, #efe4d7 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(20px);
}

body::before {
  width: 240px;
  height: 240px;
  left: -80px;
  bottom: 10%;
  background: rgba(201, 92, 43, 0.1);
}

body::after {
  width: 280px;
  height: 280px;
  right: -100px;
  top: 12%;
  background: rgba(37, 95, 69, 0.12);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-card,
.panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 32px;
  border-radius: var(--radius-xl);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  max-width: 10ch;
}

.hero-text {
  max-width: 58ch;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(96, 61, 42, 0.08);
  font-size: 0.95rem;
}

.hero-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(37, 95, 69, 0.08), rgba(255, 255, 255, 0.85)),
    var(--panel);
}

.hero-card-label {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--accent-dark);
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 14px;
  line-height: 1.65;
}

.workspace {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.uploader-panel,
.stats-panel {
  grid-column: span 6;
}

.preview-panel,
.guide-panel {
  grid-column: span 12;
}

.dropzone {
  position: relative;
  overflow: hidden;
  padding: 34px 20px;
  border-radius: 24px;
  border: 1.5px dashed rgba(201, 92, 43, 0.4);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(201, 92, 43, 0.08)),
    white;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(201, 92, 43, 0.14);
}

.dropzone-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.dropzone-subtitle,
.dropzone-hint,
.section-head p,
.section-tip,
.meta-label {
  margin: 0;
  color: var(--muted);
}

.dropzone-subtitle {
  margin-bottom: 18px;
}

.dropzone-hint {
  margin-top: 14px;
  font-size: 0.92rem;
}

.primary-button,
.secondary-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.primary-button {
  color: #fff8f2;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 14px 30px rgba(157, 64, 24, 0.26);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(96, 61, 42, 0.1);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.actions,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actions {
  margin-top: 18px;
}

.file-meta {
  display: grid;
  gap: 6px;
}

.status-card {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(96, 61, 42, 0.08);
}

.status-card.processing {
  background: rgba(201, 92, 43, 0.08);
  border-color: rgba(201, 92, 43, 0.18);
}

.status-card.success {
  background: rgba(37, 95, 69, 0.08);
  border-color: rgba(37, 95, 69, 0.18);
}

.status-card.error {
  background: rgba(168, 44, 44, 0.08);
  border-color: rgba(168, 44, 44, 0.18);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.stats-grid article {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(96, 61, 42, 0.08);
}

.stats-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats-grid strong {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-family: Georgia, "Times New Roman", serif;
}

.table-wrap {
  overflow: auto;
  margin-top: 16px;
  border-radius: 18px;
  border: 1px solid rgba(96, 61, 42, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
 td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid rgba(96, 61, 42, 0.08);
  text-align: left;
  white-space: pre-wrap;
  line-height: 1.55;
}

th {
  background: rgba(239, 224, 207, 0.65);
  font-size: 0.92rem;
}

.empty-row {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.guide-list {
  margin: 18px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

@media (max-width: 960px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  .uploader-panel,
  .stats-panel,
  .preview-panel,
  .guide-panel {
    grid-column: span 1;
  }

  .actions,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 20px;
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 20px;
  }

  .hero h1 {
    max-width: none;
    font-size: 2.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dropzone {
    padding: 26px 16px;
  }
}
