/* ── Design tokens ── */
:root {
  --orange: #F7931A;
  --orange-dark: #C97B15;
  --green: #6dba6d;
  --bg: #0F0F0F;
  --surface: #1A1A1A;
  --surface-2: #252525;
  --text: #F0F0F0;
  --text-muted: #888;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.18s ease;
  --error: #E05252;
  --error-dark: #B83E3E;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header / Nav ── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-2);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.app-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.app-logo span { color: var(--text); font-weight: 400; }

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  font-size: 1.2rem;
}
.nav-btn:hover, .nav-btn.active { color: var(--orange); background: var(--surface); }

/* ── Main content ── */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: block; }

/* ── Onboarding ── */
.onboarding-hero {
  text-align: center;
  padding: 40px 0 32px;
}

.onboarding-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 16px;
}

.onboarding-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboarding-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--surface-2);
  color: var(--text);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Step indicator ── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-2);
  transition: background var(--transition);
}
.step-dot.active { background: var(--orange); }
.step-dot.done { background: var(--orange-dark); }

/* ── Form elements ── */
label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus { border-color: var(--orange); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.input-row .dial-dropdown { flex: 0 0 84px; }
.input-row input { flex: 1; }

.form-group { margin-bottom: 16px; }
.input-row { display: flex; gap: 8px; align-items: center; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--orange);
  cursor: pointer;
}

.checkbox-row label {
  margin: 0;
  cursor: pointer;
  color: var(--text);
}

.link-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  font-style: italic;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}
.link-btn:hover {
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 20px;
  transition: all var(--transition);
  text-align: center;
  width: 100%;
}

.btn-primary {
  background: var(--orange);
  color: #000;
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
}
.btn-secondary:hover { background: #2e2e2e; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm { padding: 8px 14px; font-size: 0.85rem; width: auto; }

.btn-warning {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
}
.btn-warning:hover { background: var(--error); color: #fff; border-color: var(--error); }

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-row .btn { flex: 1; }

/* ── QR code ── */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.qr-container {
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.qr-lnurl {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--orange);
  text-align: center;
  cursor: pointer;
  padding: 4px 12px;
  border: 1px solid var(--orange);
  border-radius: 20px;
  transition: opacity var(--transition);
}
.qr-lnurl:hover { opacity: 0.75; }

.wallet-change-link {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  text-align: center;
  margin-top: 2px;
}

/* ── Mini QR grid ── */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.qr-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.qr-mini-card span {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

.qr-mini-container {
  background: #fff;
  padding: 4px;
  border-radius: 4px;
}

/* ── Status / Notice ── */
.notice {
  background: var(--surface-2);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-single { background: var(--surface-2); color: var(--orange); }
.badge-batch { background: var(--surface-2); color: #7eb5f7; }
.badge-expired { background: var(--surface-2); color: var(--text-muted); }
.badge-processing { background: var(--surface-2); color: var(--text-muted); }
.badge-pending    { background: rgba(255,180,50,0.15); color: #f5a623; }
.badge-refunded   { background: rgba(109,186,109,0.15); color: #6dba6d; }

/* ── History ── */
.history-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

/* ── Diagonal sticker overlay ── */
.hc-sticker {
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--orange);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 5px 40px;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 1;
}
.hc-sticker-green { background: var(--green); }
.hc-sticker-gray  { background: #666; color: #fff; }


/* ── Card flip-in animation ── */
.hc-flip-in {
  animation: hc-card-flip-in 0.45s ease-out both;
  transform-origin: center;
  backface-visibility: hidden;
}
@keyframes hc-card-flip-in {
  0%   { transform: rotateY(80deg) scale(0.95); opacity: 0; }
  100% { transform: rotateY(0deg)  scale(1);    opacity: 1; }
}

/* ── Redeemed card ── */
.history-card-redeemed {
  background: linear-gradient(160deg, #1f2a1a 0%, #1A1A1A 55%);
  border: 1px solid rgba(109,186,109,0.25);
  animation: hc-card-glow-green 4s ease-in-out infinite;
}
@keyframes hc-card-glow-green {
  0%,100% { box-shadow: 0 -3px 10px rgba(109,186,109,0.5), 0 3px 8px rgba(109,186,109,0.05); }
  25%      { box-shadow: 3px 0 10px rgba(109,186,109,0.5), -3px 0 8px rgba(109,186,109,0.05); }
  50%      { box-shadow: 0 3px 10px rgba(109,186,109,0.5), 0 -3px 8px rgba(109,186,109,0.05); }
  75%      { box-shadow: -3px 0 10px rgba(109,186,109,0.5), 3px 0 8px rgba(109,186,109,0.05); }
}

/* ── Funded card ── */
.history-card-funded {
  background: linear-gradient(160deg, #2a1f0e 0%, #1A1A1A 55%);
  border: 1px solid rgba(247,147,26,0.25);
  animation: hc-card-glow-orange 4s ease-in-out infinite;
}
@keyframes hc-card-glow-orange {
  0%,100% { box-shadow: 0 -3px 10px rgba(247,147,26,0.45), 0 3px 8px rgba(247,147,26,0.05); }
  25%      { box-shadow: 3px 0 10px rgba(247,147,26,0.45), -3px 0 8px rgba(247,147,26,0.05); }
  50%      { box-shadow: 0 3px 10px rgba(247,147,26,0.45), 0 -3px 8px rgba(247,147,26,0.05); }
  75%      { box-shadow: -3px 0 10px rgba(247,147,26,0.45), 3px 0 8px rgba(247,147,26,0.05); }
}
.hc-favicon-funded {
  box-shadow: 0 0 18px rgba(247,147,26,0.35) !important;
  animation: hc-icon-pulse-funded 3s ease-in-out infinite !important;
}
@keyframes hc-icon-pulse-funded {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 18px rgba(247,147,26,0.35); }
  50%       { transform: scale(1.06); box-shadow: 0 0 28px rgba(247,147,26,0.55); }
}
.hc-funded-hero {
  text-align: center;
  padding: 6px 0 14px;
}

.hc-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hc-confetti-piece {
  position: absolute;
  top: -8px;
  border-radius: 2px;
  animation: hc-confetti-fall linear infinite;
}
@keyframes hc-confetti-fall {
  0%   { transform: translateY(0) rotate(0deg);       opacity: 0.9; }
  80%  { opacity: 0.7; }
  100% { transform: translateY(160px) rotate(var(--rot, 270deg)); opacity: 0; }
}

.hc-redeemed-hero {
  text-align: center;
  padding: 6px 0 14px;
}
.hc-favicon-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 10px;
  animation: hc-icon-pulse 3s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(109,186,109,0.35);
}
@keyframes hc-icon-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 18px rgba(109,186,109,0.35); }
  50%       { transform: scale(1.06); box-shadow: 0 0 28px rgba(109,186,109,0.55); }
}
.hc-celebration-msg {
  font-size: 0.82rem;
  color: var(--text);
  margin-top: 5px;
  font-weight: 500;
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.history-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ── History card layout helpers ── */
.hc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hc-date { font-size: 0.75rem; color: var(--text-muted); }
.hc-date-small { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }
.hc-recipient {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hc-recipient em { font-style: italic; }
.hc-amount {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 3px;
}
.hc-amount-redeemed { color: var(--text); }
.hc-amount-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
}
.hc-awaiting {
  font-size: 0.8rem;
  color: var(--orange);
  margin-bottom: 3px;
  text-align: center;
}
.hc-expiry-duration {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}
.hc-claimed {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
}
.hc-expiry-inline {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: right;
}
.hc-centered { text-align: center; margin-bottom: 12px; }
.hc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 6px;
}
.hc-footer-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.hc-share-btn {
  color: var(--text-muted);
  padding: 6px 8px;
  line-height: 1;
}
.hc-share-btn:hover { color: var(--text); }
.hc-delete-btn {
  color: var(--red, #e57373);
  padding: 6px 8px;
  line-height: 1;
}
.hc-delete-btn:hover { opacity: 0.7; }

.expiry-text { font-size: 0.8rem; }
.expiry-ok { color: #6dba6d; }
.expiry-warn { color: var(--orange); }
.expiry-expired { color: var(--text-muted); }

.voucher-info-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.voucher-info-bar .balance { font-weight: 700; color: var(--orange); }
.voucher-info-bar .expiry  { color: var(--text-muted); font-size: 0.82rem; }

.history-section { margin-bottom: 8px; }
.history-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 8px 0 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.history-section-title:hover { color: var(--text); }
.history-section-body { padding-top: 10px; }
.section-chevron {
  font-size: 0.9rem;
  transition: transform 0.2s;
  color: var(--text-muted);
}
.history-section.expanded .section-chevron { transform: rotate(90deg); }

/* ── Section count badge ── */
.section-count {
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

/* ── Leaderboard screen ── */
.lb-loading, .lb-error {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.lb-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}
.lb-hero {
  text-align: center;
  padding: 24px 0 20px;
}
.lb-trophy {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 10px;
  display: inline-block;
  filter: drop-shadow(0 0 16px rgba(247,147,26,0.5));
  animation: lb-pulse 2s ease-in-out infinite;
}
@keyframes lb-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}
.lb-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 6px;
}
.lb-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.lb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.lb-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.lb-card-medal { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.lb-card-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.lb-card-rank  { font-size: 1.8rem; font-weight: 900; color: var(--orange); line-height: 1.1; margin-top: 6px; }
.lb-card-of    { font-size: 0.72rem; color: var(--text-muted); }
.lb-card-desc  {
  font-size: 0.67rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--surface-2);
  text-align: center;
  font-style: italic;
}
.lb-card-teaser {
  border-style: dashed;
  opacity: 0.75;
}
.lb-motivate {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 0 16px;
  font-style: italic;
}
.lb-grid { margin: 10px 0 0; }
.lb-category { margin-bottom: 20px; }
.lb-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-2);
}
.lb-category-cup { font-size: 1.1rem; }
.lb-category-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

/* ── High Scores table ── */
.hs-section { margin-top: 28px; padding-bottom: 16px; }
.hs-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin-bottom: 14px;
}
.hs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hs-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.hs-rank-head { width: 100px; }
.hs-col-head {
  text-align: center;
  font-size: 0.72rem;
  color: #aaa;
  padding: 4px 6px;
  line-height: 1.4;
  font-weight: 600;
}
.hs-scope { font-size: 0.62rem; color: #555; font-weight: 400; }
.hs-row { border-bottom: 1px solid #1e1e1e; }
.hs-row:last-child { border-bottom: none; }
.hs-medal-cell {
  padding: 10px 8px;
  white-space: nowrap;
}
.hs-medal-badge { font-size: 1.3rem; vertical-align: middle; margin-right: 6px; }
.hs-status {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  vertical-align: middle;
}
.hs-status.hs-gold   { color: #FFD700; }
.hs-status.hs-silver { color: #C0C0C0; }
.hs-status.hs-bronze { color: #CD7F32; }
.hs-score-cell {
  text-align: center;
  padding: 10px 6px;
  font-weight: 700;
  font-size: 1rem;
}
.hs-score-cell.hs-gold   { color: #FFD700; }
.hs-score-cell.hs-silver { color: #C0C0C0; }
.hs-score-cell.hs-bronze { color: #CD7F32; }
.hs-empty { color: #383838; font-weight: 400; }
.hs-you-badge {
  display: inline-block;
  background: var(--orange);
  color: #000;
  font-size: 0.52rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 3px;
  vertical-align: middle;
  letter-spacing: 0.06em;
}

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ── Loading spinner ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.error-msg {
  color: #e57373;
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}
.error-msg.visible { display: block; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 340px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  text-align: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-close {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
}
.modal-close:hover { color: var(--orange); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

/* ── redeem.html specific ── */
.redeem-hero {
  text-align: center;
  padding: 32px 0 24px;
}

.redeem-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.redeem-hero p {
  color: var(--text-muted);
  font-size: 0.925rem;
}

.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.wallet-card {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.wallet-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.wallet-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.wallet-card-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wallet-link {
  font-size: 0.75rem;
  color: var(--orange);
}

/* ── FAQ accordion ── */
.faq-item {
  border-bottom: 1px solid var(--surface-2);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-answer {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-bottom: 14px;
  line-height: 1.6;
}

/* ── Utility ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 4px; }

/* ── Dial-code dropdown ── */
.dial-dropdown { position: relative; }

.dial-code-trigger {
  width: 100%; height: 100%;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: border-color var(--transition);
}
.dial-code-trigger:focus,
.dial-code-trigger.open { border-color: var(--orange); outline: none; }

.dial-code-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius-sm);
  z-index: 150;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}

.dial-code-search {
  width: 100%;
  background: var(--surface-2);
  border: none;
  border-bottom: 1px solid #333;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text);
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
}
.dial-code-search:focus { border-bottom-color: var(--orange); }

.dial-code-list {
  list-style: none;
  max-height: 210px;
  overflow-y: auto;
  padding: 4px 0;
}
.dial-code-list li {
  padding: 9px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition);
}
.dial-code-list li:hover { background: var(--surface-2); }
.dial-code-list li.selected { color: var(--orange); background: var(--surface-2); }

/* ── Redeem amount display ── */
.redeem-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 16px 0 24px;
}
.redeem-sats {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -1px;
}
.redeem-fiat {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Claim divider ── */
.claim-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.claim-divider::before,
.claim-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-2);
}

/* ── Spend section items ── */
.spend-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-2);
  font-size: 0.875rem;
}
.spend-item:last-child { border-bottom: none; }
.spend-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.spend-title { font-weight: 600; margin-bottom: 2px; }
.spend-desc { color: var(--text-muted); font-size: 0.8rem; }

/* ── State pages (error/expired/etc) ── */
.state-card {
  text-align: center;
  padding: 48px 24px 32px;
}
.state-icon { font-size: 3rem; margin-bottom: 16px; }
.state-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.state-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }

/* ── Pill option buttons ── */
.pill-group {
  display: flex;
  gap: 6px;
}
.pill-btn {
  flex: 1;
  padding: 9px 4px;
  border: 1px solid var(--surface-2);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  white-space: nowrap;
}
.pill-btn:hover { border-color: var(--orange); color: var(--text); }
.pill-btn.active { background: var(--orange); color: #000; border-color: var(--orange); font-weight: 600; }
.pill-btn-recent { border-color: var(--orange); color: var(--text); }
.pill-btn-recent:hover { background: var(--orange); color: #000; }

/* ── Steps list (onboarding / wallet guides) ── */
.steps-list {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  padding-left: 0;
}
.steps-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 32px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--orange);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}
.steps-list li strong {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

/* ── Wallet dot list (same layout as steps-list but with filled dot marker) ── */
.dots-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
  padding-left: 0;
}
.dots-list > li {
  position: relative;
  padding-left: 32px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.dots-list > li::before {
  content: '●';
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--orange);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
}
.dots-list > li strong {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

/* ── FAQ section labels ── */
.faq-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--orange);
  margin-top: 20px;
  margin-bottom: 6px;
}
.faq-section-label:first-of-type { margin-top: 4px; }

/* ── Template picker ── */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.template-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.template-tile {
  border: 2px solid var(--surface-2);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  background: var(--surface);
}
.template-tile:hover { border-color: var(--orange); }
.template-tile.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(247,147,26,0.3);
}
.template-tile canvas { width: 100%; height: auto; border-radius: 4px; display: block; }
.template-tile-name { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-top: 6px; text-align: center; }
.template-tile-desc { font-size: 0.72rem; color: var(--text-muted); text-align: center; margin-top: 2px; }

/* Preview modal */
.modal-box-wide { max-width: min(90vw, 900px); }

/* Print area */
@media print {
  body > * { display: none !important; }
  #print-area { display: block !important; }
}

/* ── Footer ── */
.app-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--surface-2);
}
.footer-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.footer-btn:hover { color: var(--text); background: var(--surface-2); }
.footer-btn-donate { color: var(--orange); }
.footer-btn-donate:hover { background: var(--surface-2); }

/* ── Wallet picker bottom sheet ── */
.wallet-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.wallet-sheet-overlay.hidden { display: none; }
.wallet-sheet {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 20px 32px;
}
.wallet-sheet-title {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text);
}
.wallet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--surface-2);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}
.wallet-option:hover { background: #2e2e2e; }
.wallet-sheet-cancel {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
}

/* ── Install banner ── */
.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.install-banner.hidden { display: none; }
.install-banner-text {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.install-banner-btn {
  flex-shrink: 0;
}
.install-banner-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.install-banner-dismiss:hover { color: var(--text); }

/* ── Message template sheet ── */
.msg-sheet-textarea {
  width: 100%;
  min-height: 160px;
  background: var(--surface-2);
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.msg-sheet-textarea:focus { outline: none; border-color: var(--orange); }

/* ── Burger menu dropdown ──────────────────────────────────────────────────── */
.nav-menu-dropdown {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  z-index: 150;
  min-width: 180px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.menu-item:last-child  { border-radius: 0 0 var(--radius) var(--radius); }

/* ── Balance pill ──────────────────────────────────────────────────────────── */
.balance-pill {
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-2);
  border-radius: 99px;
  padding: 4px 10px;
  color: var(--orange);
  white-space: nowrap;
}

/* ── Wallet transfer card ──────────────────────────────────────────────────── */
.wallet-transfer-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--surface-2);
}
