:root {
  color-scheme: dark;
  --forest-deep: #0c1711;
  --forest-card: #141f18;
  --forest-inset: #0a120e;
  --forest-raised: #1a2b1f;
  --forest-hover: #1e3224;
  --yellow: #ffcc00;
  --yellow-dim: #2c2a0e;
  --ink: #f0f0ec;
  --ink-secondary: #c1ccc5;
  --ink-muted: #a1afa6;
  --border: #2b3c30;
  --control-border: #536458;
  --error: #ffada6;
  --font: 'Avenir Next', 'Avenir', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--forest-deep);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--forest-card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: var(--forest-hover);
}
button:disabled {
  opacity: .55;
  cursor: default;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.button-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--forest-deep);
  font-weight: 650;
}
.button-primary:hover {
  background: #ffdb4d;
  border-color: #ffdb4d;
}
.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-secondary);
}
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--forest-inset);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}
textarea {
  display: block;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--yellow);
}
[aria-invalid="true"] {
  border-color: var(--error);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.6px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}
.page-shell {
  max-width: 512px;
  margin: 0 auto;
  padding: 0 24px max(24px, env(safe-area-inset-bottom));
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  border-bottom: 1px solid var(--border);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 650;
}
.logo img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}
.header-link,
.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-secondary);
  font-size: 13px;
  text-decoration: none;
}
.header-link:hover,
.header-nav a:hover,
.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.header-nav {
  display: flex;
  gap: 16px;
}
.page-heading {
  margin: 32px 0;
}
.section-title {
  font-size: 15px;
  line-height: 24px;
  font-weight: 600;
}
.qr-inputs > .section-title,
.section-heading {
  margin-bottom: 12px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.section-heading > span {
  color: var(--ink-muted);
  font-size: 12px;
}
.builder-layout {
  display: grid;
  gap: 32px;
  align-items: start;
}
.builder-layout > * {
  min-width: 0;
}
#methods-list {
  display: grid;
  gap: 12px;
}
.method-row {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--forest-card);
}
.method-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -4px -4px 12px 0;
}
.method-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
}
.method-row-title .bank-preview {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.method-bank-name {
  color: var(--ink-muted);
  font-size: 12px;
}
.remove-method {
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border-color: transparent;
  color: var(--ink-muted);
  font-size: 24px;
}
.method-row:only-child .remove-method {
  visibility: hidden;
}
.upload-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  border-style: dashed;
  background: var(--forest-inset);
}
.upload-qr svg {
  flex: 0 0 auto;
  color: var(--yellow);
}
.upload-qr-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.upload-qr-copy small {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 400;
}
.method-row.is-drop-target {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}
.method-row.is-drop-target .upload-qr {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field-hint,
.field-optional {
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.field-optional {
  margin-left: 8px;
}
.field > span {
  color: var(--ink-secondary);
  font-size: 14px;
}
.method-value-field {
  margin-top: 16px;
}
.method-value {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.method-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}
.method-status:empty {
  display: none;
}
.method-options {
  margin-top: 8px;
}
summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink-secondary);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: '+';
  width: 12px;
  color: var(--ink-muted);
}
details[open] > summary::before {
  content: '−';
}
details[open] > .field {
  margin-top: 4px;
}
#add-method {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border-style: dashed;
  color: var(--ink-secondary);
}
.metadata-details > summary {
  flex-wrap: wrap;
  font-weight: 500;
}
.metadata-details > summary small {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 400;
}
.metadata-fields {
  display: grid;
  gap: 20px;
  margin-top: 12px;
}
.comment-toggle {
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.comment-toggle[open] {
  padding-bottom: 12px;
}
.form-actions {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}
.disclosure {
  margin-top: 16px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
}
.is-error,
#methods-error,
#receiver-error {
  color: var(--error);
}
#form-status,
#methods-error,
#receiver-error,
#payment-notice {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#success-panel {
  max-width: 464px;
  margin: 40px auto 0;
}
.link-summary {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--forest-card);
}
.link-summary h2 {
  overflow-wrap: anywhere;
}
#success-summary {
  margin-top: 8px;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}
#published-url {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font: 12px/1.5 ui-monospace, monospace;
}
.success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#copy-link,
#create-again {
  grid-column: 1 / -1;
}
.builder-page:has(#success-panel:not([hidden])) .page-heading {
  display: none;
}
.site-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  color: var(--ink-muted);
  text-decoration: none;
}
#payment-page {
  padding-top: 24px;
}
.payment-heading {
  margin-bottom: 24px;
}
.payment-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}
.payment-layout > * {
  min-width: 0;
}
#receiver-note {
  color: var(--ink-secondary);
  margin-top: 8px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
#amount-band {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
#amount-label,
.currency {
  color: var(--ink-muted);
  font-size: 13px;
}
#receiver-amount {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#receiver-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.receiver-method {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  text-align: left;
}
.receiver-method:only-child {
  grid-column: 1 / -1;
}
.receiver-method:only-child .method-radio {
  display: none;
}
.receiver-method[aria-pressed="true"] {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}
.receiver-method-bank {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
}
.receiver-method-bank img {
  object-fit: contain;
}
.receiver-method-info {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.receiver-method-info strong {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.receiver-method-info small {
  font-size: 12px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}
.method-radio {
  flex: 0 0 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--control-border);
}
[aria-pressed="true"] .method-radio {
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: inset 0 0 0 3px var(--yellow-dim);
}
#method-count {
  color: var(--ink-muted);
  font-size: 12px;
}
.qr-details > summary {
  font-size: 15px;
  font-weight: 500;
}
.qr-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 16px;
  margin-top: 12px;
  border-radius: 10px;
  background: #fff;
  color: #333;
}
#payment-qr {
  display: block;
  width: 100%;
  height: auto;
  max-width: 320px;
  image-rendering: pixelated;
}
#selected-bank-name {
  margin: 8px 0 0;
  font-size: 13px;
}
#download-qr {
  width: 100%;
  margin-top: 16px;
}
.bank-picker {
  margin-top: 24px;
}
.bank-choice > h2 {
  margin-bottom: 12px;
}
#source-bank-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
}
.source-bank-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 74px;
  padding: 8px 4px;
}
.source-bank-logo img {
  object-fit: contain;
}
.source-bank-logo span {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.source-bank-logo[aria-pressed="true"] {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}
#open-bank {
  width: 100%;
  margin-top: 16px;
}
#open-bank[aria-disabled="true"] {
  background: var(--forest-card);
  border-color: var(--control-border);
  color: var(--ink-muted);
}
.bank-picker.direct .bank-choice {
  display: none;
}
#invalid-state {
  margin: 40px 0;
}
#invalid-message {
  margin: 20px 0;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  display: block;
  padding: 12px 24px;
  background: var(--yellow);
  color: var(--forest-deep);
}
@media (min-width: 960px) {
  .builder-page .page-shell {
    max-width: 1008px;
  }
  .builder-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 48px;
  }
  .link-details {
    position: sticky;
    top: 24px;
  }
  .receiver-page .page-shell {
    max-width: 944px;
  }
  .payment-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
  }
  .payment-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 32px;
  }
  .payment-heading > div {
    min-width: 0;
  }
  #source-bank-logos {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #amount-band {
    flex-shrink: 0;
    margin-top: 0;
  }
}
@media (max-width: 420px) {
  .page-shell {
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px,
      env(safe-area-inset-right));
  }
  .site-header {
    min-height: 76px;
  }
  .page-heading {
    margin: 24px 0;
  }
  h1 {
    font-size: 28px;
  }
  .method-row {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
