:root {
  --brand: #1f7a4d;
  --brand-dark: #165c3a;
  --brand-soft: #e7f3ec;
  --accent: #f2b705;
  --ink: #1d2320;
  --ink-2: #4c5650;
  --ink-3: #7b847f;
  --line: #e3e7e4;
  --bg: #f6f7f5;
  --card: #ffffff;
  --danger: #c0392b;
  --paynow: #7c1a78;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Outfit', system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5; }
body.embed { background: transparent; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.loading { padding: 80px 16px; text-align: center; color: var(--ink-3); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { background: var(--card); border-bottom: 1px solid var(--line); }
.banner { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; max-height: 380px; }
.brandbar { display: flex; gap: 16px; align-items: center; padding: 20px 0; }
.brandbar img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.brandbar h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.desc { color: var(--ink-2); margin: 0 0 20px; white-space: pre-line; max-width: 820px; }

.layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding-top: 24px; padding-bottom: 64px; align-items: start; }
body.embed .layout { padding-top: 8px; padding-bottom: 16px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.section-title { font-size: 20px; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .thumb { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--brand-soft); }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--ink-2); }
.price-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { font-size: 20px; font-weight: 700; }
.btn { border: 0; background: var(--brand); color: #fff; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.block { width: 100%; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.linkbtn { background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 4px; font-size: 13px; text-decoration: underline; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: #fff; cursor: pointer; font-size: 18px; }
.stepper span { min-width: 32px; text-align: center; font-weight: 600; }

.cart { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cart h2 { margin: 0 0 12px; font-size: 18px; }
.cart .empty { color: var(--ink-3); font-size: 14px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.line .names { color: var(--ink-3); font-size: 13px; }
.totals { padding-top: 10px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; }
.totals .grand { font-size: 18px; font-weight: 700; padding-top: 8px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea { border: 1px solid #cfd6d2; border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.hint { font-size: 13px; color: var(--ink-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; display: flex; gap: 8px; align-items: center; min-height: 44px; }
.choice input { accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.error { background: #fdecea; color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.ok { background: var(--brand-soft); color: var(--brand-dark); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

.modal-bg { position: fixed; inset: 0; background: rgba(15, 22, 18, .45); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; z-index: 50; }
body.embed .modal-bg { position: absolute; min-height: 100%; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px; padding: 22px; }
.modal h2 { margin: 0 0 4px; font-size: 20px; }
.modal .sub { color: var(--ink-3); margin: 0 0 16px; font-size: 14px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.order-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff4cc; color: #7a5b00; }
.status-pill.confirmed, .status-pill.verified { background: #e1eefb; color: #1d5fa3; }
.status-pill.completed, .status-pill.fulfilled { background: var(--brand-soft); color: var(--brand-dark); }
.status-pill.cancelled, .status-pill.rejected { background: #fdecea; color: var(--danger); }
.pay { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; }
@media (max-width: 600px) { .pay { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.qr { width: 240px; border: 3px solid var(--paynow); border-radius: 14px; padding: 8px; background: #fff; }
.qr svg { width: 100%; height: auto; display: block; }
.paynow-label { background: var(--paynow); color: #fff; font-weight: 700; text-align: center; border-radius: 8px; padding: 4px; margin-top: 6px; font-size: 14px; letter-spacing: .5px; }
.amount { font-size: 32px; font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 15px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; }
.copy { cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 12px; padding: 1px 8px; margin-left: 6px; }
.drop { border: 2px dashed #cfd6d2; border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; display: block; }
.drop:hover { border-color: var(--brand); }
.foot { text-align: center; color: var(--ink-3); font-size: 13px; padding: 24px 16px; }
.closed { text-align: center; padding: 64px 16px; color: var(--ink-2); }

@media (max-width: 520px) { .card .thumb { aspect-ratio: 16 / 9; } .brandbar h1 { font-size: 22px; } }

/* donate for myself / someone else */
.choice.stack { flex-direction: column; }

/* check my donation */
.cart.lookup { position: static; margin-top: 16px; }
.lookup summary { font-weight: 600; cursor: pointer; min-height: 28px; }
.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }

/* donation progress */
.progress { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: s; }
.progress li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.progress li::before { content: ''; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress li.done::before { background: var(--brand); }
.progress .dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--card); border: 2px solid var(--line); color: var(--ink-3); }
.progress li.done { color: var(--ink); }
.progress li.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress li.current span:last-child { font-weight: 700; color: var(--brand-dark); }
.updates { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.updates li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.updates p { margin: 4px 0 0; white-space: pre-line; color: var(--ink-2); }
[hidden] { display: none !important; }
.field .choice input { width: auto; flex: none; min-height: 0; padding: 0; border: 0; }
.choice.stack label { justify-content: flex-start; }
