:root {
  --bg: #f4efe7;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #8c6f4a;
  --accent-ink: #ffffff;
  --line: #e6dfd2;
  --ok: #2f6b3a;
  --err: #8a2a2a;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* A/B background variants — opt in with ?bg=arch or ?bg=lights. */
body.bg-arch, body.bg-lights {
  background: var(--ink);
}
body.bg-arch::before, body.bg-lights::before {
  content: "";
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) blur(2px);
  z-index: -1;
}
body.bg-arch::before {
  background-image: url("./ai-generated-wedding-arch-with-flowers-photo.jpeg");
}
body.bg-lights::before {
  background-image: url("./pngtree-modern-wedding-decoration-with-lights-blurred-background-image_16247879.jpg");
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px env(safe-area-inset-bottom, 24px);
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

header { text-align: center; margin-bottom: 22px; }

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  margin: 6px 0 10px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fbfaf6;
  color: var(--ink);
}

.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 18px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfaf6;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover, .dropzone:focus-within {
  border-color: var(--accent);
  background: #fff;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dz-icon {
  font-size: 32px;
  line-height: 1;
  color: var(--accent);
  font-weight: 300;
}

.dz-label {
  font-size: 16px;
  font-weight: 500;
}

.dz-hint {
  font-size: 13px;
  color: var(--muted);
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf6;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

.file-list li:last-child { border-bottom: none; }
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .meta { color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }

button[type="submit"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}

button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }
button[type="submit"]:not(:disabled):active { transform: translateY(1px); }

.status {
  margin-top: 14px;
  min-height: 20px;
  font-size: 14px;
  text-align: center;
}

.status.ok { color: var(--ok); }
.status.err { color: var(--err); white-space: pre-wrap; text-align: left; }

.progress {
  margin-top: 10px;
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.15s;
}

footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
