.card-page { background: var(--paper); }
.card-page [hidden] { display: none !important; }
.card-loading { min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 16px; border-top: 2px solid var(--ink); }
.card-loading img { width: 140px; height: 140px; object-fit: contain; }
.card-loading h2 { font: 32px Anton, Impact, sans-serif; margin: 18px 0 8px; }
.card-loading p { font-size: 13px; line-height: 1.6; max-width: 440px; margin: 0; }
.loading-spinner { width: 24px; height: 24px; margin-top: 12px; border: 3px solid var(--mint); border-top-color: var(--ink); border-radius: 50%; animation: card-spin 0.9s linear infinite; }
.card-loading[data-state="error"] .loading-spinner { display: none; }
#retry-card { margin-top: 20px; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 6px; background: var(--orange); color: var(--ink); font: 800 14px Inter, sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
@keyframes card-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation: none; } }
.card-workspace { max-width: 1100px; margin: auto; padding: 120px 24px 64px; }
.heading { border-bottom: 2px solid var(--ink); padding-bottom: 24px; }
.heading h1 { font-size: 48px; line-height: 1.1; text-shadow: 3px 3px 0 var(--orange); margin: 12px 0 18px; }
.preview-label { font-size: 12px; color: var(--muted); font-weight: 800; }
#wallet-form { margin-top: 24px; }
#wallet-form label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; min-width: 0; background: white; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 14px; font: inherit; font-size: 14px; }
.input-row button, .actions button, .actions a { border-radius: 6px; border: 2px solid var(--ink); padding: 13px 18px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 900; background: var(--mint); color: var(--ink); box-shadow: 0 4px 0 var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.input-row button[type=submit], #download { background: var(--orange); }
.input-row button:hover, .actions button:hover, .actions a:hover { background: var(--ink); color: white; }
.card-page :focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
#status { color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.5; min-height: 40px; margin: 18px 0; }
.holder-card { position: relative; display: grid; grid-template-columns: 30% minmax(0, 1fr); background: white; border: 3px solid var(--ink); border-radius: 8px; box-shadow: 0 8px 0 var(--ink); overflow: hidden; gap: 30px; padding: 30px 30px 48px; }
.portrait { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 12px; background: var(--mint); border-right: 3px solid var(--ink); margin: -30px 0 -48px -30px; }
.portrait img { width: 100%; max-width: 260px; aspect-ratio: 1; object-fit: contain; }
.portrait strong { background: var(--ink); color: white; padding: 10px 24px; border-radius: 6px; font-size: 24px; font-family: Anton, Impact, sans-serif; font-weight: 400; }
.portrait > span { font-size: 10px; font-weight: 900; margin-top: 14px; }
.statistics { min-width: 0; }
.card-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 12px; }
.card-top span, #wallet-short { color: var(--muted); font-size: 10px; }
.metric-label { font-size: 11px; color: var(--muted); font-weight: 900; margin: 26px 0 8px; }
.earned { color: var(--ink); font-family: Anton, Impact, sans-serif; font-size: 62px; text-shadow: 3px 3px 0 var(--orange); }
.earned > span { font-family: Inter, sans-serif; font-weight: 900; font-size: 24px; text-shadow: none; }
.earned strong { font-weight: 400; overflow-wrap: anywhere; }
.metrics strong { overflow-wrap: anywhere; }
.actions [aria-disabled="true"], .actions button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.actions [aria-disabled="true"] { pointer-events: none; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin-top: 20px; }
.metrics > div { border-top: 2px solid var(--ink); padding: 12px 0; }
.metrics span { font-size: 10px; color: var(--muted); font-weight: 900; display: block; margin-bottom: 6px; }
.metrics strong { font-family: Anton, Impact, sans-serif; font-size: 32px; font-weight: 400; display: block; line-height: 1.2; }
.metrics small { font: 10px Inter, sans-serif; color: var(--muted); }
.apr strong { color: var(--orange-dark); }
.base-reward { border-top: 2px solid var(--ink); padding-top: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; font-weight: 800; }
.card-note { font-size: 10px; color: var(--muted); margin-bottom: 0; }
.card-foot { position: absolute; bottom: 14px; right: 30px; font-size: 10px; color: var(--muted); font-weight: 700; }
.actions { display: flex; gap: 12px; margin-top: 28px; }
@media (max-width: 700px) {
  .card-workspace { padding: 110px 16px 48px; }
  .heading h1 { font-size: 36px; }
  .input-row { flex-wrap: wrap; }
  .input-row input { flex-basis: 100%; }
  .holder-card { grid-template-columns: 1fr; padding: 20px 16px 46px; gap: 24px; }
  .portrait { margin: -20px -16px 0; border-right: 0; border-bottom: 3px solid var(--ink); padding: 16px; }
  .portrait img { max-width: 180px; }
  .portrait strong { font-size: 20px; }
  .card-top { flex-wrap: wrap; }
  .earned { font-size: 48px; }
  .actions { flex-wrap: wrap; }
  .card-foot { right: 16px; }
}
