:root {
  --bg: #f9f5ef;
  --bg-soft: #fffdfa;
  --text: #2f2a26;
  --muted: #6f655d;
  --accent: #d08f7c;
  --accent-strong: #b7705e;
  --line: #ecdccf;
  --card: rgba(255, 253, 249, 0.9);
  --shadow: 0 20px 40px rgba(91, 69, 52, 0.08);
  --success: #295d35;
  --error: #9f2f2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, #ffe9dd 0%, rgba(255, 233, 221, 0) 42%),
    radial-gradient(circle at 88% 15%, #efe8cf 0%, rgba(239, 232, 207, 0) 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  padding: 1.25rem;
}

main {
  max-width: 960px;
  margin: 0 auto;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(20px);
  z-index: -1;
}

.bg-shape-a {
  width: 260px;
  height: 260px;
  background: rgba(207, 142, 123, 0.2);
  top: -70px;
  left: -50px;
}

.bg-shape-b {
  width: 320px;
  height: 320px;
  background: rgba(170, 183, 139, 0.17);
  bottom: -130px;
  right: -80px;
}

.site-header {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header nav {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.logo,
.site-header a {
  color: var(--text);
  text-decoration: none;
}

.logo {
  font-family: "Fraunces", serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
}

.site-header nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}

.site-header nav a[aria-current="page"],
.site-header nav a:hover {
  background: rgba(208, 143, 124, 0.17);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.page {
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.79rem;
  margin: 0 0 0.5rem;
}

h1,
h2 {
  font-family: "Fraunces", serif;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin-bottom: 0.8rem;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.lead {
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  max-width: 60ch;
  color: #403934;
  margin-bottom: 0;
}

.info-highlight {
  margin: 1rem 0 0;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 246, 239, 0.9);
  font-weight: 600;
}

form {
  margin-top: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 500;
}

input {
  font: inherit;
  color: inherit;
  border: 1px solid #d9c6b8;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: #fff;
}

input:focus,
.drop-zone:focus {
  outline: 2px solid rgba(208, 143, 124, 0.24);
  border-color: var(--accent);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.upload-panel,
.selected-panel,
.success-panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.92);
  padding: 1rem;
}

.section-copy {
  margin-top: 0;
  color: var(--muted);
}

.drop-zone {
  margin-top: 0.9rem;
  padding: 1.4rem;
  border: 2px dashed rgba(208, 143, 124, 0.55);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 248, 242, 0.95), rgba(255, 252, 248, 0.95));
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--accent-strong);
  background: linear-gradient(180deg, rgba(255, 243, 236, 0.98), rgba(255, 250, 245, 0.98));
  transform: translateY(-1px);
}

.drop-zone-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
}

.drop-zone-copy {
  color: var(--muted);
  margin: 0.35rem 0 1rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn,
.text-button {
  font: inherit;
  cursor: pointer;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  padding: 0.72rem 1.2rem;
  text-decoration: none;
  font-weight: 700;
}

.btn:hover {
  opacity: 0.93;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-light {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.form-message {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: var(--error);
  font-weight: 600;
}

.form-message.success {
  color: var(--success);
}

.selected-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.text-button {
  background: transparent;
  border: none;
  color: var(--accent-strong);
  padding: 0;
  font-weight: 700;
}

.file-list,
.summary-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.8rem;
}

.file-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.9rem;
}

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.file-name {
  margin: 0;
  font-weight: 700;
  word-break: break-word;
}

.file-meta,
.file-status {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.file-status.is-error {
  color: var(--error);
}

.file-status.is-success {
  color: var(--success);
}

.progress {
  width: 100%;
  height: 10px;
  appearance: none;
  margin-top: 0.7rem;
}

.progress::-webkit-progress-bar {
  background: #f3e7dc;
  border-radius: 999px;
}

.progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
}

.progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
}

.summary-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.9rem;
}

@media (max-width: 640px) {
  body {
    padding: 0.85rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1rem;
  }

  .site-header nav {
    width: 100%;
  }

  .site-header nav a {
    flex: 1;
    text-align: center;
    border: 1px solid var(--line);
  }

  .actions {
    justify-content: stretch;
  }

  .actions .btn {
    flex: 1;
    text-align: center;
  }

  .file-row {
    flex-direction: column;
  }
}
