:root {
  --bg: #ede3d3;
  --bg-soft: #f5ecdc;
  --surface: #faf4e8;
  --surface-alt: #f0e6d2;
  --text: #3a2e1f;
  --text-soft: #5e4e3a;
  --muted: #9a8268;
  --accent: #b89263;
  --accent-hover: #9b7847;
  --accent-soft: #d7b687;
  --border: #d9c8aa;
  --success: #6b8e5a;
  --success-bg: #c9d7be;
  --info: #6c8ea8;
  --error: #c26b4b;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 6px 24px rgba(91, 67, 35, 0.10);
  --shadow-soft: 0 2px 10px rgba(91, 67, 35, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  background-color: var(--bg);
}

.page {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 100vh;
  min-height: 100dvh;
}

.container {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 20px calc(32px + env(safe-area-inset-bottom)) 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 720px) {
  .container {
    margin-top: 32px;
    margin-bottom: 32px;
    min-height: auto;
    padding: 36px 32px;
    background: rgba(250, 244, 232, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(58, 46, 31, 0.22);
    border: 1px solid rgba(217, 200, 170, 0.5);
  }
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero-photo {
  width: 180px;
  height: 180px;
  margin: 0 auto 22px auto;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--surface-alt);
  box-shadow:
    0 0 0 4px var(--bg),
    0 0 0 5px var(--accent-soft),
    0 12px 28px rgba(91, 67, 35, 0.18);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.couple-name {
  margin: 0 0 10px 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 14px 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--text-soft);
  margin: 0;
  font-size: 17px;
  font-style: italic;
}

#form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding-left: 4px;
  font-weight: 600;
}

.field-label small {
  opacity: 0.7;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-weight: 400;
}

input[type="text"] {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-soft);
}

input[type="text"]::placeholder {
  color: var(--muted);
  font-style: italic;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 146, 99, 0.18);
}

.picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 20px;
  border: 2px dashed var(--accent-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}

.picker:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.picker:active {
  transform: scale(0.99);
}

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

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

.picker-label {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.picker-hint {
  font-size: 14px;
  color: var(--text-soft);
  font-style: italic;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list:empty { display: none; }

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--shadow-soft);
}

.item-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--surface-alt);
  object-fit: cover;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--text);
}

.item-status {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.item-status.done { color: var(--success); font-style: normal; }
.item-status.dup  { color: var(--info); font-style: normal; }
.item-status.err  { color: var(--error); font-style: normal; }

.progress {
  height: 4px;
  background: var(--surface-alt);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s linear;
}

.primary {
  height: 62px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 14px rgba(184, 146, 99, 0.35);
}

.primary:active:not(:disabled) {
  transform: scale(0.98);
}

.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 6px 18px rgba(184, 146, 99, 0.45);
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

[hidden] { display: none !important; }

.success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
}

.success-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  font-size: 48px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(107, 142, 90, 0.12);
}

.success h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.success p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
  font-size: 17px;
}

.success .primary { margin-top: 12px; width: 100%; }

.footer {
  margin-top: auto;
  padding-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}
