/* BichoCoins store. One stylesheet, system fonts, no external assets. */
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --ink: #101828;
  --muted: #475467;
  --line: #cfd4dc;
  --brand: #1d3fbf;
  --brand-dark: #152f91;
  --brand-soft: #e9edfb;
  --gold: #f5b301;
  --ok: #05603a;
  --ok-soft: #e3f6ec;
  --warn-ink: #6b4100;
  --warn-soft: #fff1cc;
  --err: #a8201a;
  --err-soft: #fde8e6;
  --radius: 12px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  overflow-wrap: anywhere;
}

h1,
h2,
p,
ol,
dl,
dd {
  margin: 0;
}

h1 {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.0625rem;
  line-height: 1.3;
}

a {
  color: var(--brand);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.is-checkout .wrap {
  max-width: 480px;
}

main {
  flex: 1;
}

main.wrap {
  padding-top: 20px;
  padding-bottom: 24px;
}

.muted {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Header */
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.coin {
  flex: none;
}

.secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 600;
}

.foot {
  padding: 16px 0 20px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* Storefront */
.hero {
  padding: 28px 0 24px;
  max-width: 640px;
}

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin-top: 6px;
  font-size: clamp(1.625rem, 5vw, 2.25rem);
}

.lead {
  margin-top: 12px;
  font-size: 1.0625rem;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel.center {
  text-align: center;
  margin-top: 24px;
}

.fees {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fees div {
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 12px;
}

.fees dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.fees dd {
  font-size: 1.5rem;
  font-weight: 700;
}

.steps {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

/* Checkout */
.loading {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

.view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view-head p {
  margin-top: 4px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.legend {
  font-weight: 600;
  font-size: 0.9375rem;
}

.hint {
  color: var(--muted);
  font-size: 0.8125rem;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #98a2b3;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.input.big {
  font-size: 1.375rem;
  font-weight: 700;
}

.input.mono {
  font-family: var(--mono);
  font-size: 0.9375rem;
}

.input:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 0;
  border-color: var(--brand);
}

.input[aria-invalid='true'] {
  border-color: var(--err);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  min-width: 64px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--brand);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

legend {
  padding: 0;
  margin-bottom: 8px;
}

.method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.method input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}

.method:has(input:checked) {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  background: var(--brand-soft);
}

.method:has(input:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.method-name {
  font-weight: 600;
  line-height: 1.25;
}

.method-net {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.summary {
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9375rem;
}

.summary strong {
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn[disabled] {
  background: #667085;
  cursor: not-allowed;
}

.btn.secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--brand);
}

.btn.secondary:hover {
  background: var(--brand-soft);
}

.btn.small {
  width: auto;
  min-height: 44px;
  padding: 6px 14px;
  flex: none;
}

.link {
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  align-self: center;
}

.link.danger {
  color: var(--err);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9375rem;
}

.notice-err {
  background: var(--err-soft);
  color: var(--err);
  font-weight: 600;
}

.notice-warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.notice-info {
  background: var(--brand-soft);
  color: var(--ink);
}

.test-banner {
  background: var(--warn-soft);
  color: var(--warn-ink);
  border: 2px dashed #b77a00;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.875rem;
  text-align: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-label {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.row-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.value {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  word-break: break-all;
  min-width: 0;
}

.value.big {
  font-size: 1.25rem;
}

.value.plain {
  font-family: var(--font);
  word-break: normal;
}

.qr {
  align-self: center;
  width: 176px;
  height: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }
}

.timer {
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.result {
  text-align: center;
  align-items: center;
  padding: 24px 16px;
}

.result-icon {
  width: 56px;
  height: 56px;
}

.result.ok h1 {
  color: var(--ok);
}

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.9375rem;
}

.details dt {
  color: var(--muted);
}

.details dd {
  text-align: right;
  font-weight: 600;
}

.details dd.addr {
  grid-column: 1 / -1;
  text-align: left;
  font-family: var(--mono);
  word-break: break-all;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px;
}

@media (max-width: 359px) {
  .wrap {
    padding: 0 12px;
  }

  .secure {
    font-size: 0.75rem;
  }
}
