:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #2a2730;
  --muted: #6f6a72;
  --line: #ece4da;
  --accent: #b9562f;
  --accent-soft: #f6e3d9;
  --sage: #557a62;
  --sage-soft: #e3eee6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161a;
    --card: #222026;
    --ink: #f3efea;
    --muted: #b1aab3;
    --line: #34313a;
    --accent: #f0a07f;
    --accent-soft: #3a2a24;
    --sage: #9cc7a8;
    --sage-soft: #24302a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3 { font-family: "New York", "Iowan Old Style", Georgia, "Times New Roman", serif; line-height: 1.2; }
h1 { font-size: 2.1rem; margin: 0.2em 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.8rem; }
h3 { font-size: 1.08rem; margin: 0 0 0.2rem; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
.narrow { max-width: 560px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--accent); margin: 0; font-weight: 600; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; margin: 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
nav.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
nav.top .links a { margin-left: 14px; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 24px 0; }
.features .card { margin: 0; }
.features h3 { color: var(--accent); }
.legal h2 { font-size: 1.15rem; }
.legal li { margin: 0.3em 0; }
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; font-size: 0.92rem; color: var(--muted); }

/* Gift list page */
.list-head { margin-bottom: 8px; }
ul.gifts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
li.gift {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}
li.gift.is-done { opacity: 0.62; }
.gift-main { min-width: 0; }
.gift-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; max-width: 46%; text-align: right; }
.note { margin: 0.1rem 0 0.3rem; color: var(--muted); font-size: 0.95rem; }
.shops { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.92rem; }
.shops a { overflow-wrap: anywhere; }
.pill { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.pill.done { background: var(--sage-soft); color: var(--sage); }
button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { button { color: #1b1416; } }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; }
button:disabled { opacity: 0.6; }
.mine { margin: 0; font-size: 0.9rem; color: var(--sage); font-weight: 600; }
dialog { border: 0; border-radius: 22px; padding: 0; width: min(440px, calc(100% - 32px)); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(20, 16, 18, 0.45); }
dialog form { padding: 22px; display: grid; gap: 12px; }
dialog h2 { margin: 0; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 0.95rem; }
input, select, textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.hint { margin: 0; color: var(--muted); font-size: 0.88rem; }
.error { margin: 0; color: #c0392b; font-weight: 600; font-size: 0.92rem; }
.actions { display: flex; justify-content: flex-end; gap: 10px; }
.list-foot { margin-top: 36px; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 520px) {
  li.gift { flex-direction: column; align-items: stretch; }
  .gift-side { align-items: flex-start; max-width: none; text-align: left; }
  .gift-side button.reserve { width: 100%; }
  h1 { font-size: 1.75rem; }
}

/* Landing */
.hero { display: grid; gap: 20px; align-items: center; margin-top: 28px; }
.hero img.icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.pill { display: inline-block; background: var(--sage-soft); color: var(--sage); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; font-weight: 600; }
.compare { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font-weight: 600; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.store-note { font-size: 0.95rem; }
