/* GOD SAVES — public collection browser.
   Light "scripture paper" is the default; the original candlelit palette lives
   under [data-theme="dark"] (theme.js toggles it, choice persists per browser).
   NOTE: --ivory is the primary TEXT color (ink in light mode) — the name is
   kept so every existing rule and inline style keeps working. */
:root {
  --bg: #faf7ee;
  --panel: #ffffff;
  --panel2: #f2ecdb;
  --line: #e3dbc4;
  --gold: #9c7a14;
  --gold-soft: #9c7a1440;
  --ivory: #2a2410;
  --dim: #6f6752;
  --well: #f5f0e1;
  --bg-trans: #faf7eeee;
  --panel-trans: #ffffffc4;
  --hero-glow: #f1e8cd;
  --ok: #2f7d32;
  --ok-soft: #2f7d3255;
  --warn: #a36a10;
  --warn-soft: #a36a1055;
  --err: #b3261e;
  --err-bg: #fbeae8;
  --err-border: #c0392b;
  --code-ink: #4a4433;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0d0b14;
  --panel: #16131f;
  --panel2: #1d1928;
  --line: #2c2740;
  --gold: #c9a227;
  --gold-soft: #c9a22733;
  --ivory: #f2ead6;
  --dim: #9a92a8;
  --well: #0a0812;
  --bg-trans: #0d0b14ee;
  --panel-trans: #16131fa8;
  --hero-glow: #241d3a;
  --ok: #7fd77f;
  --ok-soft: #7fd77f55;
  --warn: #e5a94e;
  --warn-soft: #e5a94e55;
  --err: #e08a9a;
  --err-bg: #2a1620;
  --err-border: #c56;
  --code-ink: #d8d2c2;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ivory); font-family: var(--sans); }

/* hero */
.hero { text-align: center; padding: 56px 16px 28px;
  background: radial-gradient(ellipse 80% 90% at 50% -10%, var(--hero-glow) 0%, var(--bg) 70%); }
.hero-mark { color: var(--gold); font-size: 22px; letter-spacing: 8px; }
.hero h1 { font-family: var(--serif); font-size: clamp(40px, 7vw, 72px);
  letter-spacing: .28em; margin: 10px 0 14px; color: var(--ivory); font-weight: 400; }
.tag { color: var(--dim); line-height: 1.6; font-size: 15px; }
.stats { display: flex; gap: 34px; justify-content: center; margin: 30px 0 8px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; color: var(--gold); font-weight: 400; }
.stat span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.site-nav { display: flex; gap: 26px; justify-content: center; margin-top: 24px; }
.site-nav a { color: var(--dim); text-decoration: none; font-size: 13px;
  letter-spacing: .22em; padding-bottom: 4px; border-bottom: 1px solid transparent; }
.site-nav a.active, .site-nav a:hover { color: var(--gold); border-color: var(--gold); }
.tithe-bar { display: flex; gap: 14px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin: 22px auto 0; padding: 10px 18px; max-width: 720px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel-trans); }
.tw-label { font-size: 11px; letter-spacing: .2em; color: var(--dim); }
.tw-bal { font-family: var(--serif); font-size: 20px; color: var(--gold); }
.tw-addr { font-size: 12px; color: var(--dim); cursor: pointer; background: none; }
.tw-addr:hover { color: var(--ivory); }
.tithe-modal { max-width: 460px; display: block; }
.tithe-body { padding: 34px 30px; text-align: center; }
.tithe-body h2 { font-family: var(--serif); font-weight: 400; letter-spacing: .2em;
  margin: 8px 0 10px; }
.tithe-qr { display: flex; justify-content: center; margin: 18px 0 4px; }
.tithe-qr img { width: 190px; height: 190px; background: #fff; padding: 10px;
  border-radius: 8px; }
.tithe-addr { display: block; background: var(--well); border: 1px solid var(--line);
  border-radius: 5px; padding: 12px; margin: 16px 0; font-size: 13px;
  word-break: break-all; color: var(--ivory); }
.tithe-creed { font-family: var(--serif); font-style: italic; color: var(--gold);
  font-size: 13.5px; line-height: 1.6; margin: 4px 0 16px; }
.tithe-creed b { font-style: normal; letter-spacing: .04em; }
.tw-creed { display: block; max-width: 720px; margin: 8px auto 0; text-align: center;
  font-family: var(--serif); font-style: italic; color: var(--gold);
  font-size: 12.5px; opacity: .9; }
.tithe-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.small { font-size: 12px; line-height: 1.6; }
.preview-note { display: inline-block; margin-top: 20px; padding: 7px 16px;
  border: 1px solid var(--gold-soft); color: var(--gold); font-size: 12px;
  letter-spacing: .06em; border-radius: 3px; }

/* Daily Verse Drop */
.lottery { padding: 0 18px; }
.lot-inner { max-width: 720px; margin: 18px auto 22px; padding: 18px 22px 14px;
  border: 1px solid var(--gold-soft); border-radius: 6px; background: var(--panel);
  text-align: center; }
.lot-head { display: flex; gap: 12px; align-items: baseline; justify-content: center;
  flex-wrap: wrap; margin-bottom: 8px; }
.lot-badge { font-size: 10px; letter-spacing: .2em; color: var(--gold);
  border: 1px solid var(--gold-soft); border-radius: 3px; padding: 3px 8px; }
.lot-head h2 { font-family: var(--serif); font-weight: 400; font-size: 22px;
  letter-spacing: .08em; }
.lot-copy { color: var(--dim); font-size: 13.5px; line-height: 1.6; margin: 0 0 12px; }
.lot-copy b { color: var(--ivory); font-weight: 500; }
.lot-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.lot-form input { flex: 1; min-width: 240px; max-width: 420px; background: var(--well);
  color: var(--ivory); border: 1px solid var(--line); border-radius: 4px;
  padding: 9px 12px; font-size: 13px; font-family: monospace; }
.lot-form input:focus { outline: 1px solid var(--gold); }
.lot-status { font-size: 12.5px; margin-top: 10px; }
.lot-status .gold-t { color: var(--gold); }
.lot-last { font-size: 12px; margin-top: 2px; }

/* Free-verse promo banner (index.html + mint.html).
   Same recipe as .lot-inner/.lot-badge above. It is deliberately NOT sticky —
   .controls already owns position:sticky and the two would collide. The markup
   ships with [hidden]; promo.js only unhides it when the promo is armed. */
.promo { padding: 0 18px; }
.promo[hidden] { display: none; }
.promo-inner { max-width: 720px; margin: 18px auto 0; padding: 18px 22px 14px;
  border: 1px solid var(--gold-soft); border-radius: 6px; background: var(--panel);
  text-align: center; }
.promo-head { display: flex; gap: 12px; align-items: baseline; justify-content: center;
  flex-wrap: wrap; margin-bottom: 8px; }
.promo-badge { font-size: 10px; letter-spacing: .2em; color: var(--gold);
  border: 1px solid var(--gold-soft); border-radius: 3px; padding: 3px 8px; }
.promo-head h2 { font-family: var(--serif); font-weight: 400; font-size: 22px;
  letter-spacing: .08em; }
.promo-copy { color: var(--dim); font-size: 13.5px; line-height: 1.6; margin: 0 0 12px; }
.promo-copy b { color: var(--ivory); font-weight: 500; }
.promo-copy .rand { color: var(--gold); font-weight: 500; }
.promo-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.promo-form input { flex: 1; min-width: 240px; max-width: 420px; background: var(--well);
  color: var(--ivory); border: 1px solid var(--line); border-radius: 4px;
  padding: 9px 12px; font-size: 13px; font-family: monospace; }
.promo-form input:focus { outline: 1px solid var(--gold); }
.promo-form input:disabled { opacity: .5; }
.promo-count { font-size: 12.5px; color: var(--dim); margin-top: 10px; }
.promo-count b { font-family: var(--serif); font-size: 15px; color: var(--gold); font-weight: 400; }
.promo-status { font-size: 12.5px; color: var(--dim); line-height: 1.6;
  margin-top: 4px; min-height: 18px; }
.promo-status.ok { color: var(--ok); }
.promo-status.err { color: var(--err); }

/* Subordinate variant — INSCRIBE page only. The paid checkout below is the main
   event, so this reads as a quiet aside: a well, not a gold-edged panel, and
   never a second checkout form. .promo-warn carries the copy that stops a buyer
   who picked specific verses from typing into the wrong box. */
.promo-sub .promo-inner { max-width: 620px; margin: 12px auto 0; padding: 12px 15px 11px;
  border-color: var(--line); background: var(--well); text-align: left; }
.promo-sub .promo-head { justify-content: flex-start; gap: 9px; margin-bottom: 5px; }
.promo-sub .promo-head h2 { font-size: 15px; letter-spacing: .06em; color: var(--dim); }
.promo-sub .promo-copy { font-size: 12.5px; margin-bottom: 9px; }
.promo-sub .promo-form { justify-content: flex-start; }
.promo-sub .promo-form input { min-width: 200px; max-width: 340px; padding: 7px 10px; font-size: 12.5px; }
.promo-sub .promo-form .btn { padding: 7px 12px; font-size: 12.5px; }
.promo-sub .promo-count, .promo-sub .promo-status { font-size: 12px; }
.promo-warn { margin: 0 0 10px; padding: 8px 11px; border-left: 2px solid var(--warn);
  border-radius: 0 4px 4px 0; background: var(--panel); color: var(--dim);
  font-size: 12.5px; line-height: 1.6; }
.promo-warn b { color: var(--warn); font-weight: 600; }

/* controls */
.controls { position: sticky; top: 0; z-index: 5; background: var(--bg-trans);
  backdrop-filter: blur(6px); border-block: 1px solid var(--line); padding: 12px 18px; }
.ctl-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; max-width: 1500px; margin: auto; }
.ctl-row label { display: flex; flex-direction: column; gap: 4px; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ctl-row .grow { flex: 1; min-width: 200px; }
select, input[type=search] { background: var(--panel); color: var(--ivory);
  border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; font-size: 14px; }
select:focus, input:focus { outline: 1px solid var(--gold); }

/* mint bar */
.mintbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  max-width: 1500px; margin: 14px auto 0; padding: 0 18px; }
#sel-count { color: var(--dim); font-size: 13px; min-width: 90px; }
.btn { background: var(--panel2); color: var(--ivory); border: 1px solid var(--line);
  border-radius: 4px; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.btn:hover { border-color: var(--gold); }
.btn.gold { background: var(--gold); color: #1a1508; border-color: var(--gold); font-weight: 600; }
.btn.gold:disabled { opacity: .35; cursor: default; }
.btn.ghost { background: transparent; }

/* grid */
main { max-width: 1500px; margin: 8px auto 40px; padding: 0 18px; }
.meta-row { display: flex; justify-content: space-between; align-items: center;
  color: var(--dim); font-size: 13px; margin: 14px 2px; }
.pager { display: flex; gap: 8px; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; cursor: pointer; position: relative; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 1; display: block; background: var(--well); }
.card .cap { padding: 9px 11px; display: flex; justify-content: space-between; align-items: center; }
.card .ref { font-family: var(--serif); font-size: 14px; }
.card .num { color: var(--dim); font-size: 11px; }
.card .badge { position: absolute; top: 8px; left: 8px; font-size: 10px; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 3px; background: #000a; border: 1px solid #ffffff2e; color: #cfc8b8; }
.card .badge.inscribed { color: #7fd77f; border-color: #7fd77f55; }
.card .badge.reserved { color: #e5a94e; border-color: #e5a94e55; }
.card .badge.sample { color: var(--gold); border-color: var(--gold-soft); }
.card .pick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px;
  accent-color: var(--gold); cursor: pointer; }
.card.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: #000c; z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-wrap[hidden], .toast[hidden] { display: none; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  max-width: 1000px; width: 100%; max-height: 92vh; overflow: auto;
  display: grid; grid-template-columns: minmax(280px, 460px) 1fr; position: relative; }
.modal-art img { width: 100%; display: block; }
.modal-info { padding: 26px; }
.modal-info h2 { font-family: var(--serif); font-weight: 400; letter-spacing: .04em; margin-bottom: 12px; }
.m-text { font-family: var(--serif); font-style: italic; line-height: 1.7; color: var(--ivory);
  border-left: 2px solid var(--gold); padding-left: 14px; margin-bottom: 18px; }
.m-status { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.m-status .ok { color: var(--ok); }
.m-prov { font-size: 13px; color: var(--dim); line-height: 1.8; margin-bottom: 18px; }
.m-prov b { color: var(--ivory); font-weight: 500; }
.m-actions { display: flex; gap: 12px; align-items: center; }
.modal-x { position: absolute; top: 8px; right: 12px; background: none; border: none;
  color: var(--dim); font-size: 30px; cursor: pointer; z-index: 2; }
@media (max-width: 720px) { .modal { grid-template-columns: 1fr; } }

/* toast + footer */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--gold); color: var(--ivory);
  padding: 12px 22px; border-radius: 6px; z-index: 30; font-size: 14px; }
footer { text-align: center; padding: 34px 16px 44px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 13px; line-height: 2; }
footer p:first-child { color: var(--gold); letter-spacing: .12em; }
.dim { color: var(--dim); }

/* footer marketing link — present, just out of the way */
.foot-links { margin-top: 10px; }
.foot-links a { color: var(--dim); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; text-decoration: none; opacity: .7; }
.foot-links a:hover { color: var(--gold); opacity: 1; }


/* theme toggle (sits in .site-nav on every page) */
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--dim);
  border-radius: 3px; padding: 3px 10px; font-size: 13px; cursor: pointer;
  letter-spacing: .1em; }
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); }

/* inscribed verse tile — scripture on black, still readable, never the reproducible art */
.card .ins-face{width:100%;aspect-ratio:1;background:#070509;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:16px 15px;overflow:hidden;position:relative}
.card .ins-face .ins-mark{font-size:9.5px;letter-spacing:.16em;font-weight:700;color:var(--gold,#c9a227);
  text-transform:uppercase;margin-bottom:9px;opacity:.85}
.card .ins-face .ins-text{font-family:var(--serif,Georgia,serif);color:#e9e2cf;font-size:12.5px;
  line-height:1.5;text-align:center;margin:0;
  display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}
.card.inscribed-card{border-color:#7fd77f33}
