:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #2c2622;
  --muted: #7a6f66;
  --line: #e8dfd3;
  --accent: #b08d57;
  --accent-ink: #ffffff;
  --accent-soft: #f3ead9;
  --danger: #b4463c;
  --ok: #4f7a52;
  --radius: 16px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
h2 { font-size: 1.6rem; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.wrap { max-width: 560px; margin: 0 auto; padding: 32px 16px 64px; }
.wrap.wide { max-width: 1200px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.flourish { color: var(--accent); letter-spacing: .4em; font-size: .8rem; text-transform: uppercase; margin-bottom: 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(60, 40, 20, .04), 0 8px 24px rgba(60, 40, 20, .05);
}
.card + .card { margin-top: 16px; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
input[type=text], input[type=password], input[type=datetime-local], textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 18px; }
.hint { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem var(--sans);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--danger); border-color: #ecc9c4; }
.btn.sm { padding: 7px 14px; font-size: .85rem; }

.error { color: var(--danger); font-size: .9rem; margin-top: 10px; }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: .9rem; }

/* Photo picker */
.picker {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--line); border-radius: 14px; padding: 28px 16px; cursor: pointer;
  text-align: center; color: var(--muted); transition: border-color .15s, background .15s;
}
.picker:hover { border-color: var(--accent); background: #fffdf9; }
.picker svg { width: 36px; height: 36px; color: var(--accent); }
.picker strong { color: var(--ink); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--accent-soft); }
.thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .bar, .thumb button { z-index: 2; }
.thumb.done::after { z-index: 3; }
.thumb .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: .75rem; color: var(--muted); padding: 6px; text-align: center; word-break: break-all; }
.thumb button {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.thumb .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); width: 0; transition: width .2s; }
.thumb.done::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(79,122,82,.55); color: #fff; font-size: 28px; }

.progress { height: 6px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.heart { font-size: 44px; color: var(--accent); }
