:root {
  --ink: #111111;
  --ink-soft: #555555;
  --line: #d9d9d9;
  --paper: #ffffff;
  --wash: #f6f6f6;
  --error: #9b1c1c;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
}

[hidden] { display: none !important; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
}

/* Heading */
.hero { text-align: center; padding: 16px 0 8px; }

.eyebrow, .date {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.names {
  margin: 14px 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 14vw, 64px);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.amp { font-style: italic; font-weight: 400; }

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 14px;
  width: 140px;
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--ink); }
.rule span { width: 6px; height: 6px; border: 1px solid var(--ink); transform: rotate(45deg); }

.intro {
  text-align: center;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  margin: 24px 4px 28px;
}
.intro p { margin: 0; }

/* Cards */
.card {
  border: 1px solid var(--ink);
  padding: 24px 20px;
  margin-bottom: 20px;
  background: var(--paper);
}

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

.label {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.optional { letter-spacing: 0.05em; text-transform: none; color: var(--ink-soft); }

input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}
input[type="text"]::placeholder { color: #9a9a9a; }
input[type="text"]:focus { border-bottom-width: 2px; padding-bottom: 11px; }

/* Buttons */
.actions { display: grid; gap: 12px; }

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}
.button:active { background: var(--wash); }
.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:active { background: #333333; }
.button:focus-within, .button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.button input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.small { font-size: 14px; color: var(--ink-soft); text-align: center; margin: 16px 0 0; }
.notice { margin: 4px 0 16px; }

/* Upload progress */
.summary {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 24px;
}

.queue { list-style: none; margin: 0; padding: 0; }

.item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.thumb {
  width: 48px;
  height: 48px;
  background: var(--wash);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.meta { min-width: 0; }
.name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 6px; }
.bar { height: 3px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.25s; }
.state { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }
.item.failed .state { color: var(--error); }
.item.done .bar span { width: 100%; }

.retry {
  margin-top: 6px;
  padding: 4px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

/* Thank you and closed */
.thanks { text-align: center; }
.thanks p { margin: 0 0 18px; }
.thanks-title { font-family: var(--serif); font-size: 32px; line-height: 1.2; }

.footer {
  margin-top: 36px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
}
