/* Customer pages use this light theme. The staff admin (html.admin) restores the dark theme below. */
:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --surface: #ffffff;
  --field: #ffffff;
  --panel: #faf7f0;
  --line: rgba(40, 32, 16, .11);
  --line-strong: rgba(40, 32, 16, .22);
  --text: #1d1a14;
  --muted: #6b655a;
  --placeholder: #a39c8e;
  --gold: #c39a45;
  --gold-light: #e2c078;
  --accent-text: #8a6414;
  --gold-ink: #1d1608;
  --danger: #b3362b;
  --danger-bg: rgba(179, 54, 43, .07);
  --danger-line: rgba(179, 54, 43, .3);
  --ok: #2c8748;
  --tint: rgba(40, 32, 16, .025);
  --card-a: #ffffff;
  --card-b: #fdfbf7;
  --card-shadow: 0 24px 60px rgba(70, 52, 20, .13), 0 2px 6px rgba(70, 52, 20, .06);
  --card-edge: inset 0 1px 0 rgba(255, 255, 255, .9);
  --disabled-bg: rgba(40, 32, 16, .07);
  --glow: radial-gradient(60rem 32rem at 50% -8%, rgba(216, 180, 106, .26), transparent 62%),
    radial-gradient(40rem 30rem at 100% 100%, rgba(216, 180, 106, .10), transparent 60%),
    radial-gradient(40rem 30rem at 0% 90%, rgba(216, 180, 106, .10), transparent 60%);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html.admin {
  color-scheme: dark;
  --bg: #09090c;
  --surface: #131318;
  --field: #0d0d11;
  --panel: #0d0d11;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --text: #f4f1ea;
  --muted: #a19d92;
  --placeholder: #6f6b62;
  --gold: #d8b46a;
  --gold-light: #f0d59a;
  --accent-text: #f0d59a;
  --gold-ink: #1a1408;
  --danger: #ff9a8f;
  --danger-bg: rgba(255, 138, 128, .1);
  --danger-line: rgba(255, 138, 128, .35);
  --ok: #86dc98;
  --tint: rgba(255, 255, 255, .025);
  --card-a: rgba(255, 255, 255, .055);
  --card-b: rgba(255, 255, 255, .02);
  --card-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  --card-edge: inset 0 1px 0 rgba(255, 255, 255, .06);
  --disabled-bg: rgba(255, 255, 255, .06);
  --glow: radial-gradient(60rem 32rem at 50% -8%, rgba(216, 180, 106, .16), transparent 62%),
    radial-gradient(40rem 30rem at 100% 100%, rgba(120, 90, 200, .08), transparent 60%),
    radial-gradient(40rem 30rem at 0% 90%, rgba(216, 180, 106, .05), transparent 60%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}

/* ambient glow */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--glow);
}

.shell { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 36px 16px 56px; }

/* brand */
.brand { display: flex; align-items: center; gap: 14px; justify-content: center; margin-bottom: 26px; }
.brand h1 { margin: 0; font: 600 1.35rem/1.2 var(--serif); letter-spacing: .04em; }
.brand p { margin: 2px 0 0; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.monogram {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 1.25rem/1 var(--serif); color: var(--accent-text);
  border: 1px solid rgba(216, 180, 106, .55);
  background: radial-gradient(circle at 30% 25%, rgba(216, 180, 106, .28), rgba(216, 180, 106, .04));
  box-shadow: 0 0 24px rgba(216, 180, 106, .18);
}

/* card */
.card {
  position: relative; border-radius: 26px; padding: 30px 22px 26px;
  background: linear-gradient(180deg, var(--card-a), var(--card-b));
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow), var(--card-edge);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.card::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .8;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.intro { text-align: center; }
.intro h2 { margin: 0 0 6px; font: 500 1.75rem/1.2 var(--serif); letter-spacing: .01em; }
.intro p { margin: 0; color: var(--muted); font-size: .95rem; }

/* steps */
.steps { list-style: none; display: flex; margin: 26px 0 6px; padding: 0; }
.steps li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 14px; left: calc(50% + 20px); right: calc(-50% + 20px);
  height: 1px; background: var(--line-strong); transition: background .3s;
}
.steps li.done:not(:last-child)::after { background: var(--gold); }
.dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); font: 600 .8rem/1 var(--sans); background: var(--surface);
  transition: all .3s;
}
.steps li.active { color: var(--text); }
.steps li.active .dot { border-color: var(--gold); color: var(--accent-text); box-shadow: 0 0 0 4px rgba(216, 180, 106, .14); }
.steps li.done { color: var(--text); }
.steps li.done .dot { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }

/* sections */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.section { margin-top: 26px; }
legend {
  padding: 0; margin-bottom: 12px; width: 100%;
  font: 500 1.05rem/1.3 var(--serif); color: var(--text); letter-spacing: .01em;
  display: flex; align-items: center; gap: 12px;
}
legend::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* amount tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tile span {
  display: grid; place-items: center; min-height: 66px; border-radius: 16px;
  border: 1px solid var(--line-strong); background: var(--tint);
  font: 500 1.35rem/1 var(--serif); letter-spacing: .01em;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.tile:hover span { border-color: rgba(216, 180, 106, .6); transform: translateY(-1px); }
.tile input:checked + span {
  border-color: var(--gold); color: var(--accent-text);
  background: linear-gradient(180deg, rgba(216, 180, 106, .2), rgba(216, 180, 106, .06));
  box-shadow: 0 0 0 3px rgba(216, 180, 106, .13), 0 10px 26px rgba(216, 180, 106, .12);
}
.tile input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* fields */
.field { display: block; margin-top: 14px; }
.field .label { display: block; margin-bottom: 7px; font-size: .84rem; color: var(--muted); letter-spacing: .02em; }
input:not([type="checkbox"]):not([type="radio"]), select {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--field); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: var(--placeholder); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 180, 106, .18);
}
.money { position: relative; display: block; }
.money .prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gold); font-family: var(--serif); }
.money input#custom { padding-left: 36px; font-variant-numeric: tabular-nums; }
small { display: block; margin-top: 7px; font-size: .78rem; color: var(--muted); }
.inline-error, small.inline-error { color: var(--danger); margin: 8px 0 0; font-size: .84rem; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }


/* payment method chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: block; padding: 9px 16px; border-radius: 999px; font-size: .9rem;
  border: 1px solid var(--line-strong); background: var(--tint); transition: all .2s;
}
.chip:hover span { border-color: rgba(216, 180, 106, .6); }
.chip input:checked + span { border-color: var(--gold); color: var(--accent-text); background: rgba(216, 180, 106, .14); box-shadow: 0 0 0 3px rgba(216, 180, 106, .1); }
.chip input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* summary */
.summary { margin: 0; padding: 4px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.summary .total { border-bottom: 0; padding-top: 14px; align-items: baseline; }
.summary .total dt { color: var(--text); }
.summary .total dd { font: 600 1.6rem/1 var(--serif); color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* consent */
.check { position: relative; display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.check .box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--field); display: grid; place-items: center; transition: all .2s; margin-top: 1px; }
.check .box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .15s; }
.check input:checked + .box { background: var(--gold); border-color: var(--gold); }
.check input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .box { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.check .txt { font-size: .86rem; color: var(--muted); line-height: 1.5; }

.error { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger); font-size: .9rem; }

/* pay button */
.pay {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 20px; padding: 17px;
  border: 0; border-radius: 16px; cursor: pointer; font: 600 1.05rem/1 var(--sans); letter-spacing: .02em; color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 12px 30px rgba(216, 180, 106, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .15s, box-shadow .2s, filter .2s, opacity .2s;
}
.pay:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(216, 180, 106, .36), inset 0 1px 0 rgba(255, 255, 255, .45); }
.pay:active:not(:disabled) { transform: translateY(0); }
.pay:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.pay:disabled { cursor: not-allowed; background: var(--disabled-bg); color: var(--muted); box-shadow: none; }
.pay.busy .lock { display: none; }
.pay.busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(26, 20, 8, .3); border-top-color: var(--gold-ink); animation: spin .8s linear infinite; }
.hint { margin: 12px 0 0; text-align: center; font-size: .82rem; color: var(--muted); }

/* footer */
.foot { margin-top: 24px; text-align: center; font-size: .8rem; color: var(--muted); }
.foot p { margin: 6px 0; }
.foot .secure { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; font-size: .7rem; }
.foot a { color: var(--accent-text); text-underline-offset: 3px; }

/* status page */
.status { text-align: center; padding-top: 36px; }
.status h2 { margin: 18px 0 8px; font: 500 1.6rem/1.2 var(--serif); }
.status p { margin: 0 auto; max-width: 34ch; color: var(--muted); }
.status .amount { margin: 18px 0 4px; font: 600 2rem/1 var(--serif); color: var(--accent-text); }
.status .amount:empty { display: none; }
.icon { width: 76px; height: 76px; margin: 0 auto; display: none; }
.status[data-state="pending"] .i-pending, .status[data-state="paid"] .i-paid, .status[data-state="failed"] .i-failed { display: block; }
.i-pending circle { fill: none; stroke: var(--line-strong); stroke-width: 3; }
.i-pending .arc { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 60 200; transform-origin: 50% 50%; animation: spin 1.1s linear infinite; }
.i-paid circle, .i-failed circle { fill: none; stroke-width: 3; stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw .7s .05s ease forwards; }
.i-paid circle { stroke: var(--ok); } .i-failed circle { stroke: var(--danger); }
.i-paid path, .i-failed path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .5s .55s ease forwards; }
.i-paid path { stroke: var(--ok); } .i-failed path { stroke: var(--danger); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.refrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ref { font: .78rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); word-break: break-all; }
.ghost { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: .78rem; cursor: pointer; }
.ghost:hover { border-color: var(--gold); }
.linkbtn { text-decoration: none; }
.status .pay { margin-top: 26px; }
.status .support { margin-top: 18px; font-size: .84rem; }
.status .support a { color: var(--accent-text); }

@media (min-width: 520px) {
  .shell { padding-top: 64px; }
  .card { padding: 36px 34px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* mode switch (Make a payment / Request a payout) */
.mode { display: flex; gap: 4px; padding: 4px; margin: -8px auto 18px; max-width: 340px; border-radius: 999px; border: 1px solid var(--line); background: var(--tint); }
.mode a { flex: 1; padding: 9px 12px; border-radius: 999px; text-align: center; font-size: .85rem; color: var(--muted); text-decoration: none; transition: color .2s, background .2s; }
.mode a:hover { color: var(--text); }
.mode a.on { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-light), var(--gold)); font-weight: 600; }
.mode a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#poForm .check { margin-top: 22px; }
#poForm .pay { margin-top: 18px; }
.money input#poAmount { padding-left: 36px; }
