/* Visual language borrowed from thememo.com.au: white page, blush product panels,
   deep navy type, electric-blue pill buttons, lime + lilac tags, coral accents. */

:root {
  --paper: #ffffff;
  --blush: #fbeeea;
  --blush-deep: #f6dcd6;
  --navy: #1e2a5a;
  --navy-soft: #4b557c;
  --muted: #7d84a3;
  --line: #e6e1e6;
  --blue: #1f5cff;
  --blue-soft: #d9e3ff;
  --lime: #dcf35a;
  --lilac: #cfc9f8;
  --coral: #ff5a45;
  --sans: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; line-height: 1.12; }
p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.error { background: #ffe1dc; color: #a12b1c; padding: 10px 14px; border-radius: var(--radius); font-size: 14px; }

/* ---- chrome ---- */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.wordmark .serif { font-size: 22px; font-weight: 400; }
.top-date { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; text-align: right; }
@media (max-width: 640px) { .top-date { font-size: 12px; } .top-date .sep { display: none; } .top-date .d, .top-date .t { display: block; } }
.page { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 80px; }
.foot { border-top: 1px solid var(--line); padding: 28px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- chips / pills / buttons ---- */
.chip {
  display: inline-block; padding: 6px 10px; border-radius: 2px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
}
.chip.lime { background: var(--lime); color: var(--navy); }
.chip.lilac { background: var(--lilac); color: var(--navy); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; padding: 14px 26px;
  font: 700 14px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #164ae0; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.btn.big { padding: 18px 32px; font-size: 15px; width: 100%; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }

/* ---- hero ---- */
.hero { padding: clamp(40px, 8vw, 88px) 0 clamp(28px, 5vw, 56px); max-width: 720px; display: grid; gap: 18px; }
.hero h1 { font-size: clamp(38px, 6.5vw, 72px); font-weight: 600; }
.hero h1 .serif { font-size: 1.12em; color: var(--blue); }
.hero .chip { justify-self: start; }
.intro { font-size: 18px; color: var(--navy-soft); max-width: 60ch; }
.how { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--navy-soft); margin-top: 6px; }
.how-step b {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px;
  border-radius: 50%; background: var(--coral); color: #fff; font-size: 12px;
}

/* ---- gift grid ---- */
.gifts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.gifts-head h2 { font-size: clamp(24px, 3vw, 34px); }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--blush); border-radius: 2px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -24px rgba(30, 42, 90, .45); }
.card-media { position: relative; aspect-ratio: 1; padding: 28px; display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card-media .chip, .product-media .chip { position: absolute; top: 14px; left: 14px; z-index: 1; }
.card-body { padding: 8px 22px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.brand { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-soft); }
.card h3 { font-size: 20px; }
.remaining { font-size: 13px; color: var(--navy-soft); }
.card .btn { margin-top: auto; }
.card .remaining { margin-bottom: 8px; }

/* progress (priced gifts only) */
.bar { width: 100%; max-width: 260px; height: 8px; border-radius: 999px; background: var(--blush-deep); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .4s ease; }
.product-info .bar { max-width: 420px; height: 10px; margin-top: 6px; }
.card.complete .card-media { background: var(--lilac); }

/* ---- gift page ---- */
.crumbs { padding: 22px 0 8px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; }
.crumbs a { color: var(--navy); }
.product { display: grid; gap: clamp(24px, 4vw, 64px); grid-template-columns: 1fr; padding-bottom: 20px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.product-media { position: relative; background: var(--blush); aspect-ratio: 1; display: grid; place-items: center; padding: clamp(24px, 4vw, 60px); }
@media (min-width: 900px) { .product-media { position: sticky; top: 20px; } }
.product-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-info { display: grid; gap: 14px; padding-top: 12px; }
.product-info h1 { font-size: clamp(30px, 3.6vw, 44px); }
.product-info .lede { font-size: 22px; color: var(--navy); }
.pledge-form { display: grid; gap: 22px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; font-size: 14px; }
.picker-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-width: 320px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick span {
  display: block; text-align: center; padding: 14px 6px; border-radius: var(--radius);
  border: 1.5px solid var(--line); background: #fff; font-size: 18px; font-weight: 800;
  transition: border-color .15s, background .15s;
}
.pick input:checked + span { border-color: var(--blue); background: var(--blue-soft); }
.pick input:focus-visible + span { outline: 3px solid var(--lime); }
.custom-row {
  display: flex; align-items: center; gap: 6px; max-width: 320px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color .15s, box-shadow .15s; cursor: text;
}
.custom-row[hidden] { display: none; }
.custom-row:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.custom-row .currency { font-size: 22px; font-weight: 800; color: var(--navy); }
.custom-row input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 14px 0;
  font: 800 24px/1.2 var(--sans); color: var(--navy); font-variant-numeric: tabular-nums;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.custom-row input::placeholder { color: var(--line); font-weight: 800; }
.custom-row input:focus { outline: 0; box-shadow: none; }
.custom-row .hint { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field input, .field textarea {
  font: 500 16px/1.4 var(--sans); color: var(--navy); padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; width: 100%;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

/* ---- done page ---- */
.done { display: grid; place-items: center; padding: clamp(24px, 6vw, 72px) 0; }
.done-card { background: var(--blush); padding: clamp(28px, 5vw, 56px); max-width: 640px; width: 100%; display: grid; gap: 16px; }
.done-card h1 { font-size: clamp(32px, 5vw, 52px); }
.done-card .lede { font-size: 24px; }
.done-card .chip { justify-self: start; }
.pay { margin: 8px 0 0; display: grid; gap: 10px; }
.pay div { display: grid; grid-template-columns: minmax(90px, max-content) 1fr; align-items: center; gap: 10px; background: #fff; padding: 12px 14px; border-radius: var(--radius); }
.pay dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
.pay dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay code { font: 700 clamp(15px, 4.2vw, 18px)/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.02em; white-space: nowrap; }
.copy { flex-shrink: 0; border: 1.5px solid var(--navy); background: transparent; color: var(--navy); border-radius: 999px; padding: 6px 12px; font: 700 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.copy:hover { background: var(--navy); color: #fff; }
.soon { background: var(--lilac); padding: 16px 18px; border-radius: var(--radius); }
.soon a { text-decoration: underline; }
.done-card .back { justify-self: start; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; margin-top: 4px; }
.done-card .back:hover { color: var(--navy); }

/* ---- admin ---- */
.admin { padding-top: 32px; display: grid; gap: 28px; }
.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 34px; margin: 6px 0; }
.admin-gift { background: var(--blush); padding: 18px; display: grid; gap: 14px; }
.admin-gift header { display: flex; gap: 14px; align-items: center; }
.admin-gift header img { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: multiply; }
.admin-gift h2 { font-size: 20px; }
.tablewrap { overflow-x: auto; background: #fff; border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.msg { max-width: 320px; color: var(--navy-soft); }
tr.st-cancelled td { opacity: .45; text-decoration: line-through; }
form.inline { display: inline; }
form.inline button { border: 1.5px solid var(--navy); background: transparent; color: var(--navy); border-radius: 999px; padding: 4px 10px; font: 700 11px/1 var(--sans); cursor: pointer; }
form.inline button:hover { background: var(--navy); color: #fff; }
form.inline button.danger { border-color: var(--coral); color: var(--coral); }
form.inline button.danger:hover { background: var(--coral); color: #fff; }
.empty { padding: 10px 4px; }

@media (max-width: 640px) { .picker-row, .custom-row { max-width: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
