:root {
  --bg: #f7f4ee;
  --surface: #fbf9f4;
  --ink: #1f1d1a;
  --muted: #6f6a62;
  --line: #e3ddd1;
  --accent: #8a6a3b;
  --danger: #b03a2e;
  --ok: #2e7d52;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.55;
}
body.centered {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 2.2rem; line-height: 1.15; margin: 0 0 0.6rem; }
h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.6rem; margin: 0 0 0.4rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.fineprint { font-size: 0.85rem; color: var(--muted); margin-top: 1.2rem; }

a { color: var(--ink); border-bottom: 1px solid transparent; text-decoration: none; }
a:hover { color: var(--accent); border-color: var(--accent); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.4rem; letter-spacing: 0.05em; }

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2rem;
}
.card.narrow { max-width: 440px; width: 100%; }

.banner {
  background: #fdf6e3;
  border: 1px solid #e6d8b0;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.2rem;
  border-radius: 4px;
  margin-bottom: 1.2rem;
}
.banner strong { font-size: 1.05rem; }
.banner .fineprint { margin-top: 0.4rem; }

.actions { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }

.btn {
  display: inline-block; padding: 0.6rem 1.2rem;
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; border-radius: 3px; text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: transparent; color: var(--ink); }

.error {
  background: #fdecea; border: 1px solid #f3c0bc; border-left: 4px solid var(--danger);
  padding: 0.8rem 1rem; border-radius: 3px; margin: 0 0 1.2rem; color: #6e1f17;
}

form.stacked, .stacked { display: flex; flex-direction: column; gap: 1rem; }
form.stacked label, .stacked label { display: flex; flex-direction: column; gap: 0.3rem; }
form.stacked label span, .stacked label span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
form.stacked input, form.stacked textarea, .stacked input, .stacked textarea {
  font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 3px;
}
form.stacked input:focus, form.stacked textarea:focus,
.stacked input:focus, .stacked textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.customer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
}
.photo { position: relative; margin: 0; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: #ddd; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.photo:hover img { transform: scale(1.03); }
.photo .dl {
  position: absolute; bottom: 6px; right: 6px;
  width: 32px; height: 32px; line-height: 32px; text-align: center;
  background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%;
  border: none; font-size: 18px; font-weight: 700;
  opacity: 0; transition: opacity 0.18s ease;
}
.photo:hover .dl, .photo:focus-within .dl { opacity: 1; }
.photo .dl:hover { background: var(--accent); border-color: var(--accent); }

.close-link-row {
  margin: 2.5rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.link-btn {
  background: none; border: none; padding: 0.4rem 0.6rem;
  color: var(--muted); font: inherit; font-size: 0.9rem;
  cursor: pointer; border-radius: 3px;
}
.link-btn:hover { color: var(--ink); background: rgba(0,0,0,0.04); }

.close-dialog {
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink);
  padding: 1.6rem 1.8rem 1.4rem;
  max-width: 440px; width: calc(100% - 2rem);
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.close-dialog::backdrop { background: rgba(20,18,15,0.45); }
.close-dialog h2 { margin: 0 0 0.6rem; }
.close-dialog p { margin: 0.4rem 0; }
.close-dialog .dlg-actions {
  display: flex; justify-content: flex-end; gap: 0.6rem;
  margin-top: 1.2rem;
}
.btn-danger {
  background: var(--danger); color: #fff; border-color: var(--danger);
}
.btn-danger:hover { background: #8a2c22; border-color: #8a2c22; color: #fff; }
.btn-danger:disabled { opacity: 0.65; cursor: progress; }
