:root {
  --bg: #fdf7f3;
  --bg-2: #f6e7dc;
  --ink: #2a1622;
  --ink-soft: #6b4a5b;
  --accent: #7a1d3a;
  --accent-2: #c9a14a;
  --accent-soft: #f3dada;
  --error: #b3261e;
  --ok: #1f7a3a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(122, 29, 58, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: #1a0710;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 60px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background image as a fixed layer so it doesn't scroll with the form (works around
   iOS Safari's broken background-attachment: fixed by using a position:fixed element). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/background.jpg') center top / cover no-repeat;
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 6, 14, 0.25) 0%, rgba(20, 6, 14, 0.55) 60%, rgba(20, 6, 14, 0.85) 100%);
  z-index: -1;
}

.card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  max-width: 460px;
  margin-top: 8vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 161, 74, 0.35);
  padding: 26px 22px 20px;
  border: 1px solid #f1e3e3;
}

@media (max-width: 480px) {
  .card { margin-top: 4vh; max-width: 100%; }
}

header { text-align: center; margin-bottom: 18px; }
.ornament {
  font-size: 28px;
  color: var(--accent-2);
  line-height: 1;
  margin-bottom: 6px;
}
h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 32px;
  margin: 4px 0;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.subtitle {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}
.field em { color: var(--accent); font-style: normal; }

input[type="text"], textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e6d3d3;
  border-radius: 12px;
  background: #fffaf7;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(122, 29, 58, 0.12);
}
textarea { resize: vertical; min-height: 72px; }

.dropzone {
  position: relative;
  border: 2px dashed #e3c6c6;
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone:hover, .dropzone.drag {
  background: #f7d8d8;
  border-color: var(--accent);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone-inner { display: flex; align-items: center; gap: 12px; justify-content: center; }
.dropzone .icon { font-size: 30px; }
.dz-text { text-align: left; }
.dz-text strong { display: block; color: var(--accent); font-size: 15px; }
.dz-text small { color: var(--ink-soft); font-size: 12px; }

.file-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}
.file-list li {
  font-size: 13px;
  color: var(--ink-soft);
  background: #faf2ee;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.file-list li .sz { color: #9b7d8a; font-variant-numeric: tabular-nums; }

button.primary {
  background: linear-gradient(135deg, var(--accent), #9a2a4b);
  color: white;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 18px rgba(122, 29, 58, 0.25);
  transition: transform 0.05s ease, opacity 0.15s;
}
button.primary:active { transform: translateY(1px); }
button.primary:disabled { opacity: 0.6; cursor: not-allowed; }

.progress-wrap { margin-top: 4px; }
.progress {
  width: 100%;
  height: 10px;
  background: #f1dede;
  border-radius: 999px;
  overflow: hidden;
}
.progress .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.2s ease;
}
.progress-text { font-size: 13px; color: var(--ink-soft); margin-top: 6px; text-align: center; }

.status { font-size: 14px; min-height: 20px; }
.status.error { color: var(--error); }
.status.ok    { color: var(--ok); }

footer {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.4px;
}

@media (max-width: 380px) {
  h1 { font-size: 28px; }
  .card { padding: 22px 16px 18px; }
}
