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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f5f7;
  color: #111;
  min-height: 100vh;
  padding: 24px 16px 48px;
}

.app { max-width: 580px; margin: 0 auto; }

/* ---- Header ---- */
.header { text-align: center; margin-bottom: 28px; padding-top: 8px; }
.header h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #111; margin-bottom: 4px; }
.header h1 span { color: #6366f1; }
.header h1 a { text-decoration: none; color: inherit; cursor: pointer; }
.header h1 a:hover span { color: #4f46e5; }
.header p { color: #888; font-size: 13px; }

/* ---- Reset button ---- */
.reset-btn {
  display: none;
  background: none;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  margin-top: 10px;
  transition: border-color 0.15s, color 0.15s;
}
.reset-btn:hover { border-color: #6366f1; color: #6366f1; }
.reset-btn.visible { display: inline-block; }

/* ---- Progress bar ---- */
.progress-bar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  gap: 2px;
}
.prog-step {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #bbb;
  padding: 8px 4px;
  border-radius: 7px;
  transition: all 0.2s;
  user-select: none;
}
.prog-step.active { background: #6366f1; color: white; }
.prog-step.done   { color: #6366f1; cursor: pointer; }
.prog-step.done:hover { background: #eef2ff; }

/* ---- Step panels ---- */
.step-panel {
  background: white;
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.step-panel.hidden { display: none; }
.hidden { display: none !important; }

/* ---- Trust + how-it-works strip (step 0) ---- */
.trust-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.trust-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #4f52a0;
  background: #eef0ff;
  border: 1px solid #dde0ff;
  border-radius: 20px;
  padding: 4px 11px;
  white-space: nowrap;
}
.how-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f0;
}
.how-step {
  font-size: 11.5px;
  font-weight: 700;
  color: #555;
}
.how-arrow {
  font-size: 11px;
  color: #c0c0c0;
  font-weight: 400;
}

/* ---- Input step ---- */
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.sig-input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 9px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #111;
  transition: border-color 0.15s;
  outline: none;
  letter-spacing: 0.01em;
  resize: none;
}
.sig-input:focus { border-color: #6366f1; }
.sig-input.input-err { border-color: #ef4444; }

.error-msg {
  color: #ef4444;
  font-size: 12px;
  margin-top: 7px;
  display: none;
  line-height: 1.4;
}
.error-msg.visible { display: block; }

.primary-btn {
  width: 100%;
  padding: 13px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}
.primary-btn:hover { background: #4f46e5; }
.primary-btn:active { transform: scale(0.99); }
.primary-btn:disabled { background: #a5b4fc; cursor: not-allowed; }

.input-hint {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
  line-height: 1.5;
}

.input-hint-sep { color: #d1d5db; margin: 0 2px; }

.demo-btn {
  width: 100%;
  padding: 11px;
  background: none;
  border: 1.5px dashed #d1d5db;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  margin-top: 8px;
  transition: border-color 0.15s, color 0.15s;
}
.demo-btn:hover { border-color: #6366f1; color: #6366f1; }

/* ---- Fetching step ---- */
.fetching-center { text-align: center; padding: 24px 0 16px; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fetching-status { color: #777; font-size: 14px; }
.fetching-sub    { color: #bbb; font-size: 12px; margin-top: 6px; }

/* ---- Confirm step ---- */
.section-title {
  font-size: 11px;
  font-weight: 800;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.data-table {
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
}
.data-row:last-child { border-bottom: none; }
.data-label { font-size: 12px; color: #888; font-weight: 500; white-space: nowrap; }
.data-value { font-size: 13px; font-weight: 700; color: #111; text-align: right; word-break: break-all; }

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.badge-buy, .badge-receive { background: #dcfce7; color: #16a34a; }
.badge-sell, .badge-send   { background: #fee2e2; color: #dc2626; }
.badge-swap                { background: #dbeafe; color: #2563eb; }
.badge-stake               { background: #f3e8ff; color: #7c3aed; }
.badge-unknown             { background: #f3f4f6; color: #6b7280; }

/* USD manual input */
.usd-manual {
  width: 150px;
  padding: 5px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  font-size: 13px;
  text-align: right;
  outline: none;
}
.usd-manual:focus { border-color: #6366f1; }

/* Privacy toggles */
.privacy-block { margin-bottom: 20px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #f8f8f8;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; color: #555; }

.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #d1d5db; border-radius: 22px; cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: #6366f1; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ---- Card step ---- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.theme-opt {
  padding: 9px 5px 7px;
  border: 2px solid #ebebeb;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s;
}
.theme-opt:hover { border-color: #c7d2fe; }
.theme-opt.selected { border-color: #6366f1; }
.tp-thumb { height: 38px; border-radius: 5px; margin-bottom: 5px; }
.tp-dark    { background: #111; }
.tp-receipt { background: #f0f0f0; border: 1px solid #ddd; }
.tp-meme    { background: #1e1b4b; }
.tp-photo   { background: linear-gradient(to bottom, #555 70%, #0d0d0d 70%); }
.tp-neon {
  background: #060d08;
  position: relative; overflow: hidden;
}
.tp-neon::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(57,255,122,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,122,.1) 1px, transparent 1px);
  background-size: 7px 7px;
}
.tp-neon::before {
  content: 'NEON';
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 900; letter-spacing: 0.2em;
  color: #39ff7a; z-index: 1;
  text-shadow: 0 0 8px rgba(57,255,122,.9);
}
.tp-terminal {
  background: #0d0d0d;
  position: relative; overflow: hidden;
}
.tp-terminal::after {
  content: '> TX_CONFIRMED\A> AMOUNT...\A> CHAIN: OK';
  white-space: pre;
  position: absolute; top: 4px; left: 6px;
  font-size: 6.5px; font-family: 'Courier New', monospace;
  color: #00ff41; line-height: 1.6;
  text-shadow: 0 0 4px rgba(0,255,65,.6);
}
.tp-aurora {
  background: #05051a;
  position: relative; overflow: hidden;
}
.tp-aurora::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 25% 35%, rgba(100,50,240,.65) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 25%, rgba(20,200,200,.5) 0%, transparent 65%);
}
.tp-retro {
  background: #0f0318;
  position: relative; overflow: hidden;
}
.tp-retro::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, #0a0320 0%, #2d0a5e 45%, #8b0050 75%, #d43d4a 100%);
}
.tp-retro::after {
  content: 'RETRO';
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  font-size: 8px; font-weight: 900; letter-spacing: 0.25em;
  color: #ff00ff; z-index: 1;
  text-shadow: 0 0 8px rgba(255,0,255,.9);
}
.tp-gradient {
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 55%, #db2777 100%);
}
.tp-glass {
  background: #06061a;
  position: relative; overflow: hidden;
}
.tp-glass::before {
  content: '';
  position: absolute; top: -15%; left: -10%;
  width: 75%; height: 75%;
  background: radial-gradient(circle, rgba(99,102,241,.55) 0%, transparent 70%);
}
.tp-glass::after {
  content: '';
  position: absolute; bottom: -15%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(168,85,247,.45) 0%, transparent 70%);
}
.tp-bold {
  background: white;
  position: relative; overflow: hidden;
  border: 1px solid #e5e7eb;
}
.tp-bold::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #6366f1;
}
.tp-bold::after {
  content: 'B';
  position: absolute;
  bottom: -8px; right: 0px;
  font-size: 36px;
  font-weight: 900;
  color: #f3f4f6;
  letter-spacing: -0.04em;
}
.tp-stats {
  background: #0f1117;
  position: relative; overflow: hidden;
}
.tp-stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, #6366f1, #a855f7);
}
.tp-stats::after {
  content: '── ──\A── ──\A── ──';
  white-space: pre;
  position: absolute; top: 10px; left: 6px;
  font-size: 6px; font-family: 'Courier New', monospace;
  color: rgba(255,255,255,.28); line-height: 2.8;
  letter-spacing: 1px;
}
.theme-name { font-size: 11px; font-weight: 700; color: #666; }

.size-grid { display: flex; gap: 10px; margin-bottom: 20px; }
.size-opt {
  flex: 1; padding: 11px; border: 2px solid #ebebeb; border-radius: 9px;
  cursor: pointer; text-align: center; transition: border-color 0.15s;
}
.size-opt:hover { border-color: #c7d2fe; }
.size-opt.selected { border-color: #6366f1; }
.size-icon  { font-size: 18px; margin-bottom: 3px; }
.size-label { font-size: 12px; font-weight: 700; color: #555; }
.size-dim   { font-size: 11px; color: #aaa; }

.card-preview-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 10px;
  background: #f0f0f0;
  padding: 16px;
}
#card-preview { line-height: 1; }

.action-row { display: flex; gap: 10px; }
.sec-btn {
  flex: 0 0 auto;
  padding: 12px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: white;
  color: #555;
  transition: border-color 0.15s;
}
.sec-btn:hover { border-color: #6366f1; color: #6366f1; }
.dl-btn {
  flex: 1;
  padding: 12px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.dl-btn:hover { background: #4f46e5; }

/* ---- Copy button ---- */
.copy-btn {
  flex: 0 0 auto;
  padding: 12px 16px;
  background: none;
  border: 2px solid #6366f1;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: #6366f1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.copy-btn:hover { background: #6366f1; color: white; }
.copy-btn.copied { background: #22c55e; border-color: #22c55e; color: white; }

/* ---- USD value in cards ---- */
.card-usd { font-size: 0.72em; opacity: 0.55; font-weight: 500; margin-top: 4px; letter-spacing: 0.01em; }
.rcp-usd  { font-size: 11px; color: #999; text-align: right; margin-top: 4px; }

/* ---- Export overlay ---- */
.export-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  gap: 14px;
  font-size: 14px;
}
.export-overlay.visible { display: flex; }

/* ================================================================
   CARD THEMES — used for card-preview div, captured by html2canvas
================================================================ */

.card-root {
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* shared watermark */
.csp-wm {
  position: absolute;
  bottom: 13px; right: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.45;
}

/* ---- Theme: Dark Minimal ---- */
.t-dark {
  background: #111;
  color: #fff;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.t-dark .type-pill {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin-bottom: 18px;
}
.pill-buy, .pill-receive  { background: rgba(34,197,94,.18);  color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.pill-sell, .pill-send    { background: rgba(239,68,68,.18);  color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.pill-swap                { background: rgba(99,102,241,.22); color: #818cf8; border: 1px solid rgba(99,102,241,.35); }
.pill-stake               { background: rgba(168,85,247,.2);  color: #c084fc; border: 1px solid rgba(168,85,247,.3); }
.pill-unknown             { background: rgba(156,163,175,.2); color: #9ca3af; border: 1px solid rgba(156,163,175,.3); }

.t-dark .main-amt { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; margin-bottom: 5px; }
.t-dark .main-amt.c-green { color: #22c55e; }
.t-dark .main-amt.c-red   { color: #ef4444; }
.t-dark .main-amt.c-white { color: #fff; }
.t-dark .token-name { font-size: 18px; color: #6b7280; margin-bottom: 18px; font-weight: 500; }
.t-dark .usd-val    { font-size: 15px; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.t-dark .card-footer {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: rgba(255,255,255,0.65);
}
.t-dark .card-footer .wallet { font-family: 'Courier New', monospace; color: rgba(255,255,255,0.45); font-size: 11px; }
.t-dark .csp-wm { color: #fff; }

/* ---- Theme: Receipt ---- */
.t-receipt {
  background: #fafafa;
  color: #111;
  padding: 26px 24px 32px;
  display: flex;
  flex-direction: column;
  font-family: 'Courier New', monospace;
  border: 1px solid #e5e7eb;
}
.t-receipt .rcp-hdr {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 2px dashed #d1d5db;
}
.t-receipt .rcp-title { font-size: 12px; font-weight: bold; letter-spacing: 0.18em; color: #555; margin-bottom: 3px; }
.t-receipt .rcp-date  { font-size: 11px; color: #999; }
.t-receipt .rcp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px dotted #e5e7eb; font-size: 12px;
}
.t-receipt .rcp-row:last-of-type { border-bottom: none; }
.t-receipt .rcp-k { color: #888; }
.t-receipt .rcp-v { font-weight: bold; }
.t-receipt .rcp-total {
  border-top: 2px dashed #d1d5db;
  margin-top: auto;
  padding-top: 12px;
  display: flex; justify-content: space-between;
  font-size: 14px; font-weight: bold;
}
.t-receipt .csp-wm { color: #bbb; }

/* ---- Theme: Meme ---- */
.t-meme {
  background: #1e1b4b;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 28px;
}
.t-meme .meme-type  { font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: #818cf8; margin-bottom: 14px; }
.t-meme .meme-amt   { font-size: 62px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; color: #fff; margin-bottom: 6px; }
.t-meme .meme-token { font-size: 22px; font-weight: 700; color: #a5b4fc; margin-bottom: 16px; }
.t-meme .meme-usd   { font-size: 15px; font-weight: 600; color: #6366f1; margin-bottom: 20px; }
.t-meme .meme-meta  { font-size: 11px; color: rgba(255,255,255,0.65); }
.t-meme .csp-wm     { color: rgba(255,255,255,0.28); }

/* ---- Decimal selector ---- */
.dec-btns { display: flex; gap: 4px; }
.dec-btn {
  padding: 3px 9px;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  background: white;
  transition: border-color 0.15s, color 0.15s;
}
.dec-btn:hover { border-color: #c7d2fe; color: #6366f1; }
.dec-btn.selected { border-color: #6366f1; color: #6366f1; background: #eef2ff; }

/* ---- Theme: Photo ---- */
.t-photo { background: #0d0d0d; }
.t-photo .photo-img {
  display: block;
  transform-origin: center center;
}
.t-photo .photo-placeholder {
  width: 100%;
  background: linear-gradient(135deg, #1e1b4b 0%, #111827 100%);
  display: flex; align-items: center; justify-content: center;
}
.t-photo .photo-placeholder::after {
  content: 'Upload a photo above';
  font-size: 12px; color: #4b5563; font-weight: 500;
}
.t-photo .photo-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #0d0d0d;
  padding: 14px 18px 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.t-photo .photo-row { display: flex; align-items: baseline; gap: 7px; }
.t-photo .photo-amt {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.1; color: #fff;
}
.t-photo .photo-amt.c-green { color: #22c55e; }
.t-photo .photo-amt.c-red   { color: #ef4444; }
.t-photo .photo-sym { font-size: 13px; font-weight: 600; color: #6b7280; }
.t-photo .photo-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
}
.t-photo .photo-type { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: rgba(255,255,255,0.75); text-transform: uppercase; }
.t-photo .photo-date { font-size: 10px; color: rgba(255,255,255,0.75); }
.t-photo .csp-wm { color: rgba(255,255,255,0.2); }

/* ---- Photo upload ---- */
.photo-upload-label { display: block; cursor: pointer; margin-bottom: 20px; }
.photo-drop-area {
  border: 2px dashed #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  background: #fafafa;
}
.photo-drop-area:hover { border-color: #6366f1; }
.photo-drop-icon { font-size: 22px; margin-bottom: 5px; }
.photo-drop-text { font-size: 12px; color: #9ca3af; font-weight: 500; }
.photo-drop-area.has-photo { border-color: #6366f1; background: #eef2ff; }
.photo-drop-area.has-photo .photo-drop-text { color: #6366f1; }
.photo-drop-area.drag-over { border-color: #6366f1; background: #eef2ff; border-style: solid; }

/* ---- Theme: Neon ---- */
.t-neon {
  background: #060d08;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 20px 18px;
  gap: 0;
  position: relative;
  overflow: hidden;
}
/* Grid lines */
.t-neon::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(57,255,122,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,122,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
/* Central glow bloom */
.t-neon::after {
  content: '';
  position: absolute; top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; height: 50%;
  background: radial-gradient(ellipse, rgba(57,255,122,.11) 0%, transparent 70%);
  pointer-events: none;
}
.neon-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
.neon-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.28em;
  color: rgba(57,255,122,.65); text-transform: uppercase;
  margin-bottom: 4px;
}
.neon-decos {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; margin-bottom: 6px;
}
.neon-deco { font-size: 2rem; line-height: 1; }
.neon-type {
  font-weight: 900; line-height: 1; letter-spacing: -0.01em;
  color: #39ff7a;
  text-shadow: 0 0 28px rgba(57,255,122,.7), 0 0 60px rgba(57,255,122,.3);
  margin: 0 8px;
}
.neon-box {
  width: 88%;
  background: rgba(0,0,0,.45);
  border: 1.5px solid rgba(57,255,122,.28);
  border-radius: 14px;
  padding: 16px 20px 14px;
  text-align: center;
  box-shadow: 0 0 24px rgba(57,255,122,.08), inset 0 0 16px rgba(57,255,122,.04);
  margin-bottom: 12px;
}
.neon-amt {
  font-weight: 900; line-height: 1.05; letter-spacing: -0.02em;
}
.neon-amt.c-green { color: #39ff7a; text-shadow: 0 0 16px rgba(57,255,122,.5); }
.neon-amt.c-red   { color: #ff4d6d; text-shadow: 0 0 16px rgba(255,77,109,.4); }
.neon-amt.c-white { color: #ffffff; }
.neon-sym {
  font-size: 1rem; font-weight: 700; letter-spacing: 0.08em;
  color: rgba(255,255,255,.6); margin-top: 2px;
}
.neon-divider {
  color: rgba(57,255,122,.4); font-size: 1.3rem; margin: 5px 0;
}
.neon-usd {
  font-size: 0.75rem; color: rgba(255,255,255,.35);
  margin-top: 7px; letter-spacing: 0.03em;
}
.neon-swap-row { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.neon-footer {
  font-size: 10.5px; color: rgba(255,255,255,.38);
  letter-spacing: 0.03em; text-align: center;
}
.t-neon .csp-wm { color: rgba(57,255,122,.4); }

/* ── Terminal theme ─────────────────────────────────────────────────────── */
.t-terminal {
  background: #0d0d0d;
  color: #00ff41;
  font-family: 'Courier New', Courier, monospace;
  padding: 20px 18px 16px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  gap: 0;
}
.t-terminal::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,.18) 3px, rgba(0,0,0,.18) 4px
  );
}
.term-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 0; width: 100%;
}
.term-prompt {
  color: rgba(0,255,65,.5); font-size: 10.5px; margin-bottom: 10px;
  word-break: break-all; line-height: 1.45;
}
.term-type-line {
  font-size: 30px; font-weight: 900; letter-spacing: -0.01em;
  color: #00ff41;
  text-shadow: 0 0 20px rgba(0,255,65,.5);
  margin-bottom: 10px; line-height: 1;
}
.term-rows {
  border-top: 1px solid rgba(0,255,65,.2);
  padding-top: 9px;
  display: flex; flex-direction: column; gap: 4px;
}
.term-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; line-height: 1.4;
}
.term-key { color: rgba(0,255,65,.45); font-size: 11px; min-width: 72px; }
.term-val { color: #00ff41; text-align: right; }
.term-val.c-green { color: #39ff7a; }
.term-val.c-red   { color: #ff5555; }
.term-hash {
  margin-top: 10px; font-size: 9px; color: rgba(0,255,65,.3);
  word-break: break-all; border-top: 1px solid rgba(0,255,65,.12);
  padding-top: 7px; line-height: 1.55;
}
.term-cursor {
  display: inline-block; width: 7px; height: 12px;
  background: #00ff41; vertical-align: middle; margin-left: 2px;
}
.t-terminal .csp-wm { color: rgba(0,255,65,.28); font-family: 'Courier New', monospace; }

/* ── Aurora theme ───────────────────────────────────────────────────────── */
.t-aurora {
  background: #05051a;
  color: white;
  padding: 28px 24px 22px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
}
.t-aurora::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 12% 28%, rgba(100,50,240,.6) 0%, transparent 65%),
    radial-gradient(ellipse 70% 55% at 88% 22%, rgba(20,200,200,.5) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 85%, rgba(80,30,180,.4) 0%, transparent 60%);
}
.t-aurora::after {
  content: '';
  position: absolute; top: -15%; left: 50%; transform: translateX(-50%);
  width: 75%; height: 55%;
  background: radial-gradient(ellipse, rgba(80,200,200,.08) 0%, transparent 70%);
  pointer-events: none;
}
.aurora-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; width: 100%;
}
.aurora-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.32em;
  text-transform: uppercase; color: rgba(180,140,255,.8);
  margin-bottom: 14px;
}
.aurora-type {
  font-size: 48px; font-weight: 900; line-height: 1;
  letter-spacing: -0.03em; color: white;
  margin-bottom: 14px;
}
.aurora-amt {
  font-size: 36px; font-weight: 800; line-height: 1;
  letter-spacing: -0.02em; color: white; margin-bottom: 2px;
}
.aurora-amt.c-green { color: #7dffd4; }
.aurora-amt.c-red   { color: #ff8fa3; }
.aurora-sym {
  font-size: 14px; font-weight: 600; letter-spacing: 0.14em;
  color: rgba(255,255,255,.45); margin-bottom: 10px; text-transform: uppercase;
}
.aurora-usd { font-size: 12px; color: rgba(255,255,255,.38); margin-bottom: 12px; }
.aurora-divider { width: 32px; height: 1.5px; background: rgba(255,255,255,.18); margin: 8px auto 12px; }
.aurora-swap-out {
  font-size: 22px; font-weight: 800; color: #ff8fa3; margin-bottom: 2px;
}
.aurora-swap-in {
  font-size: 22px; font-weight: 800; color: #7dffd4; margin-bottom: 2px;
}
.aurora-arrow { font-size: 16px; color: rgba(255,255,255,.28); margin: 4px 0; }
.aurora-meta {
  font-size: 10px; color: rgba(255,255,255,.33);
  letter-spacing: 0.06em; text-align: center; line-height: 1.65;
}
.t-aurora .csp-wm { color: rgba(255,255,255,.2); }

/* ── Retro / Synthwave theme ────────────────────────────────────────────── */
.t-retro {
  background: #0f0318;
  color: white;
  padding: 22px 20px 0;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
}
.t-retro::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 62%;
  background: linear-gradient(to bottom, #0a0320 0%, #2d0a5e 40%, #8b0050 72%, #c83b46 100%);
  pointer-events: none;
}
.t-retro::after {
  content: '';
  position: absolute; top: 62%; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, transparent 0%, #ff00cc 30%, #ff6600 50%, #ff00cc 70%, transparent 100%);
  pointer-events: none; z-index: 1;
}
.retro-floor-wrap {
  position: absolute; bottom: 0; left: -5%; right: -5%; height: 40%;
  overflow: hidden;
}
.retro-floor {
  position: absolute; bottom: 0; left: 0; right: 0; height: 100%;
  transform: perspective(220px) rotateX(55deg);
  transform-origin: bottom center;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0%, transparent calc(12.5% - 1px),
      rgba(255,0,204,.22) calc(12.5% - 1px), rgba(255,0,204,.22) 12.5%
    ),
    repeating-linear-gradient(
      to right,
      transparent 0%, transparent calc(12.5% - 1px),
      rgba(255,0,204,.22) calc(12.5% - 1px), rgba(255,0,204,.22) 12.5%
    );
  background-color: #0f0318;
}
.retro-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
.retro-logo-line {
  font-size: 9.5px; font-weight: 900; letter-spacing: 0.3em;
  text-transform: uppercase; color: #ff00cc;
  text-shadow: 0 0 12px rgba(255,0,204,.7), 0 0 24px rgba(255,0,204,.3);
  margin-bottom: 8px;
}
.retro-type {
  font-size: 40px; font-weight: 900; line-height: 1;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #00f7ff;
  text-shadow: 0 0 20px rgba(0,247,255,.65), 0 0 40px rgba(0,247,255,.3);
  margin-bottom: 8px;
}
.retro-amt {
  font-size: 28px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.01em; color: white;
  margin-bottom: 1px;
}
.retro-amt.c-green { color: #00f7ff; text-shadow: 0 0 14px rgba(0,247,255,.5); }
.retro-amt.c-red   { color: #ff4f8b; text-shadow: 0 0 14px rgba(255,79,139,.5); }
.retro-sym {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  color: rgba(255,255,255,.4); margin-bottom: 6px;
}
.retro-usd { font-size: 11px; color: rgba(255,0,204,.6); margin-bottom: 6px; }
.retro-meta {
  font-size: 9.5px; color: rgba(255,255,255,.32);
  letter-spacing: 0.05em; text-align: center; margin-bottom: 12px;
}
.t-retro .csp-wm { color: rgba(255,0,204,.32); }

/* ── Gradient theme ─────────────────────────────────────────────────────── */
.t-gradient {
  color: white;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.grad-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.4) 100%);
  pointer-events: none;
}
.grad-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
.grad-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
  margin-bottom: 14px;
}
.grad-type {
  font-size: 56px; font-weight: 900; line-height: 1;
  letter-spacing: -0.03em; color: white;
  margin-bottom: 18px;
}
.grad-amt {
  font-size: 38px; font-weight: 800; line-height: 1;
  letter-spacing: -0.02em; color: white; margin-bottom: 4px;
}
.grad-sym {
  font-size: 16px; font-weight: 600; letter-spacing: 0.1em;
  color: rgba(255,255,255,.55); margin-bottom: 10px;
  text-transform: uppercase;
}
.grad-usd { font-size: 13px; color: rgba(255,255,255,.42); margin-bottom: 20px; }
.grad-meta { font-size: 10px; color: rgba(255,255,255,.42); letter-spacing: 0.05em; }
.t-gradient .csp-wm { color: rgba(255,255,255,.25); }

/* ── Glass theme ────────────────────────────────────────────────────────── */
.t-glass {
  background: #06061a;
  color: white;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.glass-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.glass-inner {
  position: relative; z-index: 1;
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
}
.glass-panel {
  width: 90%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  padding: 22px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.glass-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.22em;
  padding: 4px 14px; border-radius: 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.glass-amt {
  font-size: 48px; font-weight: 900; line-height: 1;
  letter-spacing: -0.03em; color: white; margin-bottom: 4px;
}
.glass-amt.c-green { color: #86efac; }
.glass-amt.c-red   { color: #fca5a5; }
.glass-sym {
  font-size: 14px; font-weight: 600; letter-spacing: 0.12em;
  color: rgba(255,255,255,.42); margin-bottom: 6px;
  text-transform: uppercase;
}
.glass-usd { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 4px; }
.glass-divider { width: 40px; height: 1px; background: rgba(255,255,255,.12); margin: 14px auto; }
.glass-meta { font-size: 10px; color: rgba(255,255,255,.32); letter-spacing: 0.05em; text-align: center; }
.t-glass .csp-wm { color: rgba(255,255,255,.16); }

/* ── Bold theme ─────────────────────────────────────────────────────────── */
.t-bold {
  background: white;
  color: #111;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.bold-accent-bar { height: 8px; flex-shrink: 0; }
.bold-body {
  flex: 1;
  padding: 22px 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.bold-ghost {
  position: absolute;
  bottom: -14px; right: -6px;
  font-size: clamp(5rem, 28vw, 11rem);
  font-weight: 900; line-height: 1;
  letter-spacing: -0.04em;
  color: #f3f4f6;
  pointer-events: none;
  user-select: none;
  text-transform: uppercase;
}
.bold-top { position: relative; z-index: 1; }
.bold-type-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: #9ca3af;
  margin-bottom: 10px;
}
.bold-amt {
  font-size: 64px; font-weight: 900; line-height: 1;
  letter-spacing: -0.03em; color: #111; margin-bottom: 4px;
}
.bold-amt.c-green { color: #16a34a; }
.bold-amt.c-red   { color: #dc2626; }
.bold-sym { font-size: 18px; font-weight: 700; color: #9ca3af; margin-bottom: 6px; }
.bold-usd { font-size: 14px; color: #d1d5db; }
.bold-bottom { position: relative; z-index: 1; }
.bold-meta { font-size: 11px; color: #d1d5db; }
.t-bold .csp-wm { color: #e5e7eb; }

/* ── Stats theme ────────────────────────────────────────────────────────── */
.t-stats {
  background: #0f1117;
  color: white;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.stats-top-bar { height: 4px; flex-shrink: 0; }
.stats-inner {
  flex: 1;
  padding: 18px 22px 16px;
  display: flex; flex-direction: column;
}
.stats-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.stats-type { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; color: white; }
.stats-chain { font-size: 10px; font-weight: 800; letter-spacing: 0.2em; color: rgba(255,255,255,.32); text-transform: uppercase; }
.stats-amt-section { margin-bottom: 14px; }
.stats-amt {
  font-size: 52px; font-weight: 900; line-height: 1;
  letter-spacing: -0.03em;
}
.stats-amt.c-green { color: #4ade80; }
.stats-amt.c-red   { color: #f87171; }
.stats-amt.c-white { color: white; }
.stats-sym { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.38); margin-top: 2px; }
.stats-usd { font-size: 12px; color: rgba(255,255,255,.28); margin-top: 4px; }
.stats-rows { flex: 1; }
.stats-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.stats-row:last-child { border-bottom: none; }
.stats-key { font-size: 11px; color: rgba(255,255,255,.32); font-weight: 500; letter-spacing: 0.04em; }
.stats-val { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.7); text-align: right; }
.t-stats .csp-wm { color: rgba(255,255,255,.14); }

/* ---- Photo preview controls ---- */
.card-preview-wrap.photo-mode { cursor: grab; touch-action: none; }
.card-preview-wrap.photo-mode:active { cursor: grabbing; }
.photo-preview-ctrl {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 2px;
}
.photo-preview-hint { font-size: 11px; color: #9ca3af; }
.photo-preview-right { display: flex; align-items: center; gap: 6px; }
#photo-zoom-ind { font-size: 11px; color: #6b7280; width: 34px; text-align: center; font-weight: 600; }
.crop-zoom-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid #e5e7eb; background: white;
  font-size: 14px; line-height: 1; cursor: pointer;
  color: #444; font-weight: 700; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.crop-zoom-btn:hover { border-color: #6366f1; color: #6366f1; }
.crop-reset-btn {
  font-size: 11px; font-weight: 600; color: #9ca3af;
  background: none; border: none; cursor: pointer; padding: 2px 4px;
}
.crop-reset-btn:hover { color: #6366f1; }

/* ---- Footer ---- */
.site-footer {
  max-width: 580px;
  margin: 32px auto 0;
  padding: 20px 0 32px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #aaa;
}
.site-footer a { color: #9ca3af; text-decoration: none; }
.site-footer a:hover { color: #6366f1; }
.footer-sep { color: #d1d5db; }

/* ---- Bug Report Modal ---- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.visible { display: flex; }
.modal-box {
  background: white;
  border-radius: 16px;
  padding: 28px 28px 24px;
  width: 100%; max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  position: relative;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 800; color: #111; }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: #f3f4f6;
  color: #888; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.modal-close:hover { background: #e5e7eb; color: #111; }
.modal-field { margin-bottom: 16px; }
.modal-label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 6px; letter-spacing: 0.01em; }
.modal-select,
.modal-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #111;
  outline: none;
  transition: border-color 0.15s;
  background: white;
}
.modal-select:focus,
.modal-textarea:focus { border-color: #6366f1; }
.modal-textarea { resize: vertical; min-height: 80px; }
.modal-submit {
  width: 100%; padding: 12px;
  background: #6366f1; color: white;
  border: none; border-radius: 9px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.modal-submit:hover { background: #4f46e5; }
.modal-submit:disabled { background: #a5b4fc; cursor: not-allowed; }
.modal-success {
  text-align: center; padding: 16px 0;
  color: #16a34a;
  font-weight: 700; font-size: 15px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.modal-success-icon { font-size: 34px; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  body { padding: 12px 10px 32px; }
  .step-panel { padding: 20px 14px 18px; }
  .card-preview-wrap { padding: 8px; }
}
