/* Hydrate — Citrus orange brand, warm dark theme */

:root {
  --bg: #1A1714;
  --bg-surface: #211E1A;
  --bg-elevated: #2A2520;
  --text: #F0EBE5;
  --text-muted: #8A8278;
  --orange: #FF6B2C;
  --orange-light: #FF8F5C;
  --orange-deep: #E85A1E;
  --orange-glow: rgba(255, 107, 44, 0.12);
  --amber: #FFB347;
  --amber-glow: rgba(255, 179, 71, 0.10);
  --sage: #E8B82A;
  --sage-glow: rgba(232, 184, 42, 0.12);
  --green: #E8B82A;
  --green-glow: rgba(232, 184, 42, 0.12);
  --border: #2E2820;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}
/* Desktop: nav at top */
@media (min-width: 601px) {
  body {
    padding-bottom: 0;
    padding-top: 48px;
  }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header */
header { margin-bottom: 2rem; }

/* Top row: logo left, wallet right */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-top .logo-mark { margin-bottom: 0; justify-content: flex-start; }

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-link { text-decoration: none; display: flex; align-items: center; }
.logo-icon { display: block; }
.logo-mark { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.25rem; }
.logo-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-accent {
  background: linear-gradient(135deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-text-sm {
  font-size: 1.25rem;
  margin-left: 0.5rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Nav row: centered links */
.page-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.btn-nav {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 0.5rem;
}

.hero-punch {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-punch em {
  font-style: normal;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 0.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Why section */
.why-section { max-width: 640px; margin-left: auto; margin-right: auto; }
.why-detail + .why-detail { margin-top: 1rem; }

/* Cost comparison grid */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
@media (max-width: 600px) {
  .compare-grid { grid-template-columns: repeat(2, 1fr); }
}
.compare-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color 0.2s;
}
.compare-card--hero {
  border-color: var(--orange);
  box-shadow: 0 0 20px var(--orange-glow);
}
.compare-name {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.compare-price {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--orange);
}
.compare-price small { font-size: 0.9rem; font-weight: 400; }
.compare-price--dim { color: var(--text-muted); }
.compare-note {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.compare-card--hero .compare-note { color: var(--orange-light); }

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Open protocol section */
.open-protocol .steps { margin-top: 1rem; }

/* Sections */
section { margin-bottom: 3.5rem; }

h2 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.why-detail {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.5rem;
}

.why-detail strong {
  font-weight: 600;
  color: var(--text);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  position: relative;
  text-align: center;
}

.step-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.freezedry-step .step-num { background: var(--orange-glow); color: var(--orange); }
.chain-step .step-num { background: var(--bg-elevated); color: var(--text-muted); }
.hydrate-step .step-num { background: var(--sage-glow); color: var(--sage); }

.step h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--text-muted); }

/* CTA */
.cta {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: var(--radius);
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-cancel {
  background: rgba(220, 53, 69, 0.12);
  color: #e05566;
  border: 1px solid rgba(220, 53, 69, 0.25);
}
.btn-cancel:hover { background: rgba(220, 53, 69, 0.22); opacity: 1; }

.btn-freezedry {
  background: var(--orange);
  color: #000;
}

.fee-notice {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.fee-notice p { margin: 0; color: var(--text-muted); }
.fee-notice strong { color: var(--text); }

.btn-hydrate {
  background: var(--sage);
  color: var(--bg);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Wallet button + dropdown */
.wallet-wrap { position: relative; }

.btn-wallet {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-wallet.connected {
  border-color: var(--sage);
  color: var(--sage);
}

.wallet-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}

.wallet-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.wallet-dropdown-item:hover {
  background: var(--orange-glow);
  color: var(--orange);
}


/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1.5rem;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--orange);
  background: var(--orange-glow);
}

.drop-zone label {
  display: block;
  cursor: pointer;
}

.drop-zone .small { font-size: 0.85rem; color: var(--text-muted); }

/* Tool Pages */
.tool-page { margin-top: 1rem; }

.page-explain {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.page-explain strong {
  color: var(--text);
  font-weight: 600;
}

/* Options */
.option-group {
  margin-bottom: 1rem;
}

.option-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

select, input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
}

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

/* Focus indicators for keyboard navigation */
.gallery-card:focus-visible,
.mg-filter:focus-visible,
.mg-job-card:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--orange);
  margin-top: 0.25rem;
}

input[type="checkbox"] {
  accent-color: var(--orange);
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* Info bubble tooltip */
.info-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  margin-left: 0.35rem;
  vertical-align: middle;
  position: relative;
}

.info-bubble:hover {
  background: var(--orange-glow);
  border-color: var(--orange);
  color: var(--orange);
}


/* Progress */
.progress { margin: 1.5rem 0; }

.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar.progress-bar-lg {
  height: 14px;
  border-radius: 7px;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--orange);
  transition: width 0.3s;
}

.progress-fill.hydrate-fill {
  background: linear-gradient(90deg, var(--sage), #d4a520);
  box-shadow: 0 0 8px var(--sage-glow);
}

.progress-fill.pulsing {
  width: 100% !important;
  animation: pulse-bar 1.8s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.progress-pct {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--bg);
  pointer-events: none;
  text-shadow: 0 0 2px rgba(255,255,255,0.3);
}

#progress-text, #hydrate-progress-text, #mint-progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Results */
.results {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.stats, .cost-estimate {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  /* Card treatment — matches .preserve-mode-card / .path-card container visual weight */
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.cost-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cost-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.cost-line span:first-child {
  flex: 1;
  color: var(--text);
}
.cost-line span:nth-child(2) {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
}
.cost-line span:last-child {
  min-width: 70px;
  text-align: right;
  font-weight: 500;
}
.cost-line.cost-total {
  border-bottom: none;
  border-top: 1.5px solid var(--text-muted);
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  font-weight: 600;
}
.cost-line.cost-total span {
  color: var(--orange);
}

/* Cost details toggle */
.cost-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.cost-details-toggle:hover { color: var(--orange); }
.cost-details-toggle .chevron {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.6rem;
}
.cost-details-toggle.open .chevron { transform: rotate(90deg); }
.cost-details-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}
.cost-details-panel.open {
  max-height: 200px;
  opacity: 1;
}
.cost-details-inner {
  padding: 0.5rem 0.75rem;
  margin-top: 0.25rem;
  background: var(--bg-elevated, rgba(0,0,0,0.15));
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.cost-details-inner .cost-detail-row {
  display: flex;
  justify-content: space-between;
}
.cost-details-inner .cost-detail-note {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.5;
}

.download-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Mint section */
.mint-section {
  margin-top: 1.5rem;
  /* Card treatment — same visual weight as preserve-mode-card / stats / cost-estimate */
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
}

.mint-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--amber);
}

.mint-section > p.small {
  margin-bottom: 0.5rem;
}

.mint-controls {
  margin-top: 0.75rem;
}

/* NFT mint form */
.nft-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nft-form textarea {
  width: 100%;
  resize: vertical;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.nft-form textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.nft-form-row {
  display: flex;
  gap: 0.75rem;
}

.nft-form-half {
  flex: 1;
  min-width: 0;
}

.nft-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.nft-choice-group .btn-sm {
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
}

.mint-result {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--green-glow);
  color: var(--green);
  font-size: 0.9rem;
}

.mint-result a {
  color: var(--orange-light);
  text-decoration: underline;
}

/* Tabs */
.source-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tab {
  flex: 1;
  padding: 0.65rem;
  background: var(--bg-surface);
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab.active {
  background: var(--bg-elevated);
  color: var(--text);
}

/* Verification */
.verification {
  font-size: 0.9rem;
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--sage-glow);
  color: var(--sage);
}

/* Preview area */
.preview {
  position: relative;
}

.clear-image-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.clear-image-btn:hover {
  background: rgba(255, 70, 70, 0.8);
}

/* Canvas */
canvas {
  max-width: 100%;
  border-radius: var(--radius);
  display: block;
  margin: 1rem auto;
}

/* Preview img — for GIF and other visual media in Direct Store mode */
#preview-img {
  max-width: 100%;
  border-radius: var(--radius);
  display: block;
  margin: 1rem auto;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer .version {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  opacity: 0.4;
}

/* ─── Bottom Navigation ─── */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 60px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 1000;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover { color: var(--text); }
.bottom-nav-item.active { color: var(--orange); }

.bottom-nav-icon {
  width: 22px;
  height: 22px;
}

.bottom-nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

/* Desktop: nav moves to top as horizontal bar */
@media (min-width: 601px) {
  .bottom-nav {
    position: fixed;
    bottom: auto;
    top: 0;
    height: 48px;
    background: var(--bg-surface);
    border-top: none;
    border-bottom: 1px solid var(--border);
    justify-content: center;
    gap: 0.25rem;
    padding-bottom: 0;
  }
  .bottom-nav-item {
    flex-direction: row;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }
  .bottom-nav-item:hover {
    background: var(--bg-elevated);
  }
  .bottom-nav-item.active {
    background: rgba(255, 107, 44, 0.1);
  }
  .bottom-nav-icon {
    width: 18px;
    height: 18px;
  }
  .bottom-nav-badge {
    top: 4px;
    right: 2px;
  }
}

/* Pricing table */
.pricing { margin-bottom: 2rem; }
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pricing-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.pricing-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.pricing-table td:last-child {
  color: var(--orange);
  font-weight: 600;
  text-align: right;
}
.pricing-table th:last-child { text-align: right; }
.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2) { text-align: right; color: var(--text-muted); }
.pricing-table tbody tr:hover { background: var(--bg-surface); }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--orange);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Footer links */
.footer-links {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--orange); }

.footer-sep {
  margin: 0 0.5rem;
  color: var(--border);
}

/* Gallery */
/* ── Gallery Grid — Social Media Style ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.gallery-card {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  display: block;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 1;
}

.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.gallery-card-thumb {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.gallery-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info overlay — hidden by default, shown on hover */
.gallery-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.75rem 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  opacity: 0;
  transition: opacity 0.2s;
  text-align: left;
  font-size: 0.8rem;
  color: #fff;
}
.gallery-card:hover .gallery-card-info { opacity: 1; }

/* Always show title + artist on mobile (no hover) */
@media (hover: none) {
  .gallery-card-info { opacity: 1; padding-top: 1.5rem; }
}

.gallery-card-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide dims, size, badges — image-first view */
.gallery-card-dims { display: none; }
.gallery-card-size { display: none; }

.gallery-card-artist {
  font-size: 0.72rem;
  color: var(--orange-light);
  font-weight: 600;
  text-decoration: none;
  display: block;
}
.gallery-card-artist:hover {
  text-decoration: underline;
}

.gallery-card-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.gallery-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.gallery-badge--open { background: rgba(46, 204, 113, 0.25); color: #2ecc71; }
.gallery-badge--coded { background: rgba(255, 107, 44, 0.25); color: var(--orange); }
.gallery-badge--proprietary { background: rgba(232, 184, 42, 0.25); color: var(--amber); }
.gallery-badge--filetype { background: rgba(232, 184, 42, 0.25); color: var(--amber); }
.gallery-badge--minted { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.gallery-badge--freezedried { background: rgba(232, 184, 42, 0.3); color: var(--sage); font-weight: 700; }
.gallery-badge--standard { background: rgba(255, 255, 255, 0.12); color: rgba(255,255,255,0.7); }

.gallery-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.gallery-empty p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* ── My Gallery (unified) ── */

.mg-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  margin-bottom: 0.25rem;
}
.mg-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.mg-stat-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.mg-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mg-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}
.mg-filter {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.mg-filter:hover { border-color: var(--text-muted); }
.mg-filter.active {
  background: var(--orange-glow);
  border-color: var(--orange);
  color: var(--orange);
  font-weight: 600;
}

.mg-card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.mg-card-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mg-card-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.mg-status-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mg-status--preserving { background: var(--orange-glow); color: var(--orange); }
.mg-status--on-chain { background: var(--sage-glow); color: var(--sage); }
.mg-status--minted { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.mg-status--cancelled { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.mg-status--expired { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.mg-status--failed { background: rgba(220,38,38,0.12); color: #f87171; }

.mg-job-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.mg-job-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.mg-job-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mg-job-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-elevated);
}
.mg-job-info {
  flex: 1;
  min-width: 0;
}
.mg-job-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}
.mg-job-progress { margin-top: 0.5rem; }
.mg-progress-text { margin-top: 0.25rem; }
.mg-job-actions { margin-top: 0.5rem; display: flex; gap: 0.5rem; }

@media (max-width: 600px) {
  .mg-stats { gap: 1rem; }
  .mg-job-thumb { width: 60px; height: 60px; }
}

/* Batch processing */
.batch-section {
  margin-top: 1.5rem;
  /* Card treatment — same visual weight as preserve-mode-card / stats / cost-estimate / mint-section */
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
}

.batch-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--orange);
}

.batch-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.batch-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.batch-item-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-item-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 80px;
  text-align: right;
}

.batch-item-status.done { color: var(--sage); }
.batch-item-status.processing { color: var(--orange); }

.batch-item .progress-bar {
  flex: 1;
  max-width: 120px;
}

.batch-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

/* Gallery page accent */
.gallery-page .page-title { color: var(--amber); }

/* Loading logo spinner */
.loading-logo {
  animation: spin-logo 1.5s ease-in-out infinite;
}

@keyframes spin-logo {
  0% { transform: rotate(0deg); opacity: 0.4; }
  50% { transform: rotate(180deg); opacity: 1; }
  100% { transform: rotate(360deg); opacity: 0.4; }
}

/* Utility */
.hidden { display: none !important; }
.small { font-size: 0.85rem; color: var(--text-muted); }

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  word-break: break-all;
}

/* Freeze Dry page — orange accent */
.freezedry-page .page-title {
  color: var(--orange);
}

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

.freezedry-page input[type="range"] {
  accent-color: var(--orange);
}

.freezedry-page input[type="checkbox"] {
  accent-color: var(--orange);
}

.freezedry-page .info-bubble:hover {
  background: var(--orange-glow);
  border-color: var(--orange);
  color: var(--orange);
}

/* Hydrate page — sage green accent shift */
.hydrate-page .drop-zone:hover,
.hydrate-page .drop-zone.dragover {
  border-color: var(--sage);
  background: var(--sage-glow);
}

.hydrate-page select:focus,
.hydrate-page input:focus {
  border-color: var(--sage);
}

.hydrate-page input[type="range"] {
  accent-color: var(--sage);
}

.hydrate-page input[type="checkbox"] {
  accent-color: var(--sage);
}

.hydrate-page .tab.active {
  border-bottom: 2px solid var(--sage);
  color: var(--sage);
}

.hydrate-page .page-title {
  color: var(--sage);
}

.hydrate-page .info-bubble:hover {
  background: var(--sage-glow);
  border-color: var(--sage);
  color: var(--sage);
}

/* Wallet NFT grid (hydrate "From Wallet" tab) */
.wallet-nft-connect,
.wallet-nft-empty,
.wallet-nft-loading {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
}
.wallet-nft-connect .option-group { margin-bottom: 1rem; }
.wallet-nft-connect .btn { margin-top: 0.75rem; display: block; width: 100%; }
.wallet-nft-connect .small { margin: 1rem 0 0.5rem; }
.wallet-nft-empty .small { font-size: 0.85rem; }
.wallet-nft-empty a { color: var(--sage); }

.wallet-nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding-bottom: 5rem;
}

.wallet-nft-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.wallet-nft-card:hover {
  border-color: var(--sage);
  transform: translateY(-2px);
}
.wallet-nft-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  min-height: 120px;
  background: var(--bg-elevated);
}
.wallet-nft-name {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet-nft-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(232, 184, 42, 0.7);
  color: #1a1a1a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Flow Diagram */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 2.5rem;
  padding: 2rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 88px;
  padding: 0.5rem 0.25rem;
}

.flow-icon {
  width: 48px;
  height: 48px;
}

.flow-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.flow-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 56px;
  padding: 0 0.35rem;
}

.flow-arrow svg {
  width: 56px;
  height: 24px;
}

.flow-arrow-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Flow color transitions: orange → amber → sage */
.flow-node--image { color: var(--text-muted); }
.flow-node--blob { color: var(--orange); }
.flow-node--chain { color: var(--amber); }
.flow-node--restored { color: var(--sage); }

.flow-arrow--freezedry { color: var(--orange); }
.flow-arrow--freezedry .flow-arrow-label { color: var(--orange); }

.flow-arrow--store { color: var(--amber); }
.flow-arrow--store .flow-arrow-label { color: var(--amber); }

.flow-arrow--hydrate { color: var(--sage); }
.flow-arrow--hydrate .flow-arrow-label { color: var(--sage); }

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 1.25rem 0.75rem; }
  .logo { font-size: 2rem; }
  .steps { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: center; }

  .btn-wallet { padding: 0.35rem 0.5rem; font-size: 0.7rem; }

  .btn-nav { padding: 0.3rem 0.6rem; font-size: 0.7rem; }

  /* Page nav — single row scroll on mobile, no wrapping */
  .page-nav { gap: 0.3rem; margin-top: 1.5rem; }
  .page-title { font-size: 1.1rem; }
  .page-nav-links {
    gap: 0.3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 2px;
  }
  .page-nav-links::-webkit-scrollbar { display: none; }
  .btn-nav { white-space: nowrap; flex-shrink: 0; }

  /* Drop zone — less padding on mobile */
  .drop-zone {
    padding: 2rem 1rem;
    margin-bottom: 1rem;
  }
  .drop-zone p { font-size: 0.9rem; }
  .drop-zone .small { font-size: 0.75rem; }

  /* Tool page content */
  .tool-page { margin-top: 1rem; }
  .page-explain {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  /* Options tighter */
  .option-group { margin-bottom: 0.75rem; }
  select, input[type="text"], input[type="password"] {
    font-size: 0.85rem;
    padding: 0.5rem 0.7rem;
  }

  /* Buttons — full width on mobile */
  .btn { padding: 0.65rem 1rem; font-size: 0.9rem; }
  .btn-freezedry, .btn-hydrate { width: 100%; text-align: center; }

  /* Download group — stack vertically */
  .download-group {
    flex-direction: column;
  }
  .download-group .btn { width: 100%; text-align: center; }

  /* Results section */
  .results { padding: 1rem; margin-top: 1rem; }
  .stats, .cost-estimate { font-size: 0.8rem; }

  /* Mint section */
  .mint-section { margin-top: 1rem; padding-top: 1rem; }
  .mint-section h3 { font-size: 1rem; }
  .nft-form .option-group { margin-bottom: 1rem; }
  .nft-form input[type="text"],
  .nft-form input[type="number"],
  .nft-form textarea,
  .nft-form select {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
  }
  .nft-form textarea { min-height: 70px; }
  .nft-form-row { flex-direction: column; gap: 0; }
  .nft-choice-group { flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
  .nft-choice-group .btn { width: 100%; text-align: center; padding: 0.75rem; }
  .nft-choice-group .btn-sm { width: 100%; padding: 0.65rem; font-size: 0.9rem; }

  /* Source tabs (hydrate view) */
  .source-tabs { margin-bottom: 1rem; }
  .tab { padding: 0.5rem; font-size: 0.8rem; }

  /* Batch processing */
  .batch-item { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .batch-item-name { font-size: 0.8rem; }
  .batch-actions { flex-direction: column; }
  .batch-actions .btn { width: 100%; text-align: center; }

  /* Gallery grid — tighter on mobile */
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.35rem;
  }

  /* Stats row on landing — force 2×2 on mobile so 4 cards don't leave a stray one on its own row */
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stat { padding: 1rem 0.5rem; }
  .stat-value { font-size: 1.3rem; }

  /* Canvas */
  canvas { margin: 0.75rem auto; }

  /* Footer */
  footer { margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.75rem; }
  .footer-links { font-size: 0.7rem; }

  /* Flow diagram — vertical stack on mobile */
  .flow-diagram {
    flex-direction: column;
    gap: 0;
    padding: 1.25rem 1rem;
  }
  .flow-node {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
    padding: 0.6rem 0;
  }
  .flow-icon { width: 36px; height: 36px; flex-shrink: 0; }
  .flow-label { font-size: 0.9rem; text-align: center; }
  .flow-meta { font-size: 0.75rem; text-align: center; }
  .flow-arrow {
    min-width: 0;
    padding: 0.15rem 0;
    align-items: center;
  }
  .flow-arrow svg {
    width: 24px;
    height: 24px;
    transform: rotate(90deg);
  }
  .flow-arrow-label { font-size: 0.65rem; }

  /* Preview canvas area */
  .preview { margin-bottom: 1rem; }
  .file-info { font-size: 0.8rem; }

  /* Logo mark on landing (direct child only — sub-pages nest inside .logo-link) */
  .logo-mark { gap: 0.5rem; }
  .logo-mark > .logo-text { font-size: 1.8rem; }
  .logo-mark img { width: 36px; height: 36px; }
}

/* ─── Storage Mode Cards ─── */

.storage-cards {
  display: flex;
  gap: 0.75rem;
}

.storage-card {
  flex: 1;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.storage-card:hover:not(.disabled) {
  border-color: var(--text-muted);
}

.storage-card.active {
  border-color: var(--orange);
  background: var(--orange-glow);
}

.storage-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.storage-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}

.storage-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin: 0.2rem 0 0.4rem;
}

.storage-card-cost {
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 600;
  display: block;
}

.storage-card.active .storage-card-cost {
  color: var(--orange-light);
}

/* ─── Path Chooser (NFT vs Inscribe Only) ─── */
.path-chooser {
  margin: 1.5rem 0 0.5rem;
}
.path-chooser-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-align: center;
}
.path-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.path-card {
  /* Reset browser button defaults */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  /* Layout */
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1rem;
  /* Theme */
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.path-card:active {
  transform: scale(0.985);
}
.path-card:hover {
  border-color: var(--orange);
  background: rgba(255, 107, 44, 0.06);
}
.path-card:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px var(--orange-glow);
}
.path-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-glow);
  border-radius: 8px;
}
.path-card-body {
  flex: 1;
  min-width: 0;
}
.path-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.3;
}
.path-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.2rem;
}
.path-card-arrow {
  color: var(--text-muted);
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.path-card:hover .path-card-arrow {
  color: var(--orange);
  transform: translateX(2px);
}

/* ── Preserve-mode chooser (upfront NFT decision on /app) ──────────────
   Mirrors .path-card styling so the choice feels like a continuation of
   the path chooser. Radio-based so the selected state persists.
   Hidden by default — JS reveals after "New File" is chosen. */
.preserve-mode-chooser {
  border: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.preserve-mode-legend {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-align: center;
  padding: 0;
  width: 100%;
}
.preserve-mode-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.preserve-mode-card:hover {
  border-color: var(--orange);
  background: rgba(255, 107, 44, 0.06);
}
.preserve-mode-card:active {
  transform: scale(0.985);
}
.preserve-mode-card input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--orange);
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}
.preserve-mode-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.preserve-mode-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.3;
}
.preserve-mode-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.25rem;
}
/* Selected state — highlight the card whose radio is checked. */
.preserve-mode-card:has(input[type="radio"]:checked) {
  border-color: var(--orange);
  background: rgba(255, 107, 44, 0.08);
}
.preserve-mode-card:has(input[type="radio"]:checked) .preserve-mode-title {
  color: var(--orange);
}

/* ── Contact CTA + inline form ────────────────────────── */
.contact-cta {
  margin-top: 0.6rem;
}
.announce-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
  opacity: 0.75;
}
.announce-link:hover {
  opacity: 1;
  color: var(--orange-light);
}
.announce-link svg {
  flex-shrink: 0;
}
/* Details/summary — hide default disclosure triangle */
.contact-details { width: 100%; }
.contact-details summary { list-style: none; cursor: pointer; }
.contact-details summary::-webkit-details-marker { display: none; }
.contact-details summary::marker { display: none; content: ''; }
.contact-card {
  border-style: dashed;
}
.contact-details[open] .contact-card {
  border-color: var(--orange);
  border-style: solid;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}
.contact-card .path-card-arrow {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s;
}
.contact-details[open] .path-card-arrow {
  transform: rotate(90deg);
}
.contact-form-panel {
  background: var(--bg-elevated);
  border: 1.5px solid var(--orange);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.contact-optional {
  font-weight: 400;
  opacity: 0.6;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
}
.contact-form textarea {
  resize: vertical;
  min-height: 60px;
}
.contact-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.contact-status {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.contact-success { color: var(--sage); }
.contact-error { color: var(--orange); }
.contact-success-msg {
  text-align: center;
  padding: 1.2rem 0.5rem;
}
.contact-success-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 0.5rem;
}
.contact-success-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.contact-tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.path-chosen-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
}
.path-chosen-banner.nft-banner {
  background: var(--orange-glow);
  color: var(--orange);
  border: 1px solid rgba(255, 107, 44, 0.25);
}
.path-chosen-banner.inscribe-banner {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.path-chosen-banner .btn-link {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  text-decoration: underline;
  font-family: inherit;
  padding: 0;
}

@media (max-width: 600px) {
  .storage-cards {
    flex-direction: column;
  }
}

/* ─── Voucher Banner ─── */
.voucher-banner {
  margin-bottom: 0.75rem;
}
.voucher-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: rgba(46, 204, 113, 0.08);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.25);
}
.voucher-inner strong { white-space: nowrap; }

/* ─── Before/After Slider ─── */

.slider-section {
  margin: 1.5rem 0;
}

.slider-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--amber);
}

.slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.slider-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.slider-canvas-original {
  display: block;
}

.slider-canvas-lossy {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 50% 0 0);
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
}

.slider-handle-line {
  flex: 1;
  width: 2px;
  background: #fff;
  opacity: 0.8;
}

.slider-handle-grip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.slider-handle-grip::after {
  content: '\2194';
  color: var(--text);
  font-size: 0.9rem;
}

.slider-label {
  position: absolute;
  bottom: 12px;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.slider-label-left {
  left: 12px;
  background: var(--orange-glow);
  color: var(--orange);
}

.slider-label-right {
  right: 12px;
  background: var(--sage-glow);
  color: var(--sage);
}

/* ─── Share Page ─── */

.share-page .page-title { color: var(--amber); }

.share-loading {
  padding: 2rem 0;
}

.share-error {
  text-align: center;
  padding: 3rem 1rem;
}

.share-error h2 {
  color: var(--orange);
  margin-bottom: 0.5rem;
}

.share-error p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.share-image-area {
  position: relative;
  margin-bottom: 1rem;
  /* Reserve space while image loads — prevents 0-height collapse
     that causes the browser to skip rendering (appears as black gap) */
  min-height: 200px;
  background: var(--bg-darker, #1a1714);
  border-radius: var(--radius);
}

#share-preview, #share-canvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  /* Ensure image displays above the background placeholder */
  display: block;
  position: relative;
}

#share-html-frame {
  width: 100%;
  min-height: 400px;
  height: 60vh;
  border: 1px solid var(--border, #333);
  border-radius: var(--radius);
  background: #fff;
}
#share-html-frame.html-expanded {
  height: 90vh;
  min-height: 90vh;
}
#share-html-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem;
}
.share-html-badge {
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.share-chain-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(26, 23, 20, 0.85);
  border-radius: var(--radius);
  z-index: 5;
}

/* Video/audio playback on share page */
#share-video { max-width: 100%; border-radius: var(--radius); display: block; margin: 0 auto; background: #000; }
#share-audio { width: 100%; margin: 1rem auto; display: block; }

/* Proof grid — chain reconstruction visualization */
#share-proof-grid { max-width: 100%; height: auto; border-radius: var(--radius); display: block; margin: 0 auto; }
.share-proof-status { text-align: center; margin-top: 0.75rem; }
.proof-progress-bar { width: 100%; height: 4px; background: #222; border-radius: 2px; overflow: hidden; }
.proof-progress-bar > div { height: 100%; background: linear-gradient(90deg, #ff7043, #ff5722); width: 0%; transition: width 0.15s; border-radius: 2px; }
#share-proof-text { font-size: 0.8rem; color: #999; margin-top: 0.5rem; }

.share-meta {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.share-meta-left {
  flex-shrink: 0;
}

.share-fingerprint {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
}

.share-meta-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.share-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.share-meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 80px;
}

.share-meta-value {
  font-size: 0.85rem;
  color: var(--text);
}

.share-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.mint-link {
  color: var(--orange-light);
  text-decoration: underline;
}

/* Artwork name below image (share page) */
.share-artwork-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.75rem 0;
  text-align: center;
}

/* Editable state — subtle cursor hint for owners */
.artwork-name-editable {
  cursor: pointer;
  transition: color 0.15s;
}
.artwork-name-editable:hover {
  color: var(--orange);
}

/* Inline edit row (appears inside the name element on click) */
.artwork-name-edit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.artwork-name-input {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.artwork-name-input:focus {
  outline: none;
  border-color: var(--orange);
}

.artwork-name-save {
  flex-shrink: 0;
}

/* Owner actions on share page */
.share-owner-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.share-owner-actions .share-actions { margin-top: 0.5rem; }

/* PDA meta links */
.share-meta-link {
  color: var(--orange);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.share-meta-link:hover { text-decoration: underline; }

/* PDA confirmation modal */
.pda-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.pda-modal.hidden { display: none !important; }
.pda-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.pda-modal-content {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--orange);
  border-radius: 12px;
  padding: 2rem;
  max-width: 540px;
  width: calc(100% - 2rem);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.pda-modal-content h3 { margin-top: 0; color: var(--orange); font-size: 1.25rem; }
.pda-modal-body {
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}
.pda-modal-body strong { color: var(--orange); }
.pda-modal-body code { background: var(--bg-raised, #222); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85rem; overflow-wrap: anywhere; }
.pda-modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-raised, rgba(255,153,0,0.08));
  border: 1px solid var(--orange);
  border-radius: 8px;
  margin: 1rem 0;
  cursor: pointer;
  user-select: none;
}
.pda-modal-checkbox input[type="checkbox"] { margin-top: 0.2rem; cursor: pointer; }
.pda-modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }
.pda-modal-actions .btn { min-width: 120px; }
.pda-modal-actions .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Source toggle pills (share page) */
.share-source-btns {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.btn-source {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-source:first-child { border-right: 1px solid var(--border); }
.btn-source.active { background: var(--bg-elevated); color: var(--text); }
.btn-source:hover:not(.active) { color: var(--text); }

/* ─── On-Chain Options Panel (share page) ─── */

.onchain-panel {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.onchain-title {
  font-size: 1.1rem;
  color: var(--sage);
  margin-bottom: 0.25rem;
}

.onchain-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.onchain-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.onchain-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.onchain-card-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.onchain-card-body {
  flex: 1;
  min-width: 0;
}

.onchain-card-body strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.onchain-card-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.onchain-card .btn {
  flex-shrink: 0;
  align-self: center;
}

@media (max-width: 600px) {
  .onchain-card {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .onchain-card .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.25rem;
  }
}

/* ─── Explorer Page ─── */

.explore-page .page-title { color: var(--amber); }

.explore-stats {
  display: flex;
  justify-content: space-evenly;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--orange);
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.explore-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.explore-filters select {
  width: auto;
  min-width: 120px;
}

.explore-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.explore-pagination .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.explore-page-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── Profile Page ─── */

.profile-page .page-title { color: var(--amber); }

.profile-header {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-display-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.profile-wallet {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.profile-wallet a {
  color: var(--orange-light);
  text-decoration: none;
}

.profile-wallet a:hover { text-decoration: underline; }

.profile-website {
  margin-bottom: 0.5rem;
}
.profile-website a {
  color: var(--orange-light);
  text-decoration: none;
  font-size: 0.9rem;
}
.profile-website a::before {
  content: '🔗 ';
  font-size: 0.8rem;
}
.profile-website a:hover { text-decoration: underline; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--orange);
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Profile Edit Panel ─── */

.profile-edit-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.75rem;
}

.profile-edit-field {
  margin-bottom: 0.75rem;
}

.profile-edit-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-edit-field input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
}

.profile-edit-field input:focus {
  outline: none;
  border-color: var(--orange);
}

.profile-edit-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.profile-edit-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ─── Collection UI ─── */

#collection-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

#collection-name {
  margin-top: 0.5rem;
}

/* ─── Mobile overrides for new features ─── */

@media (max-width: 600px) {
  .share-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .share-meta-row { justify-content: center; }
  .share-fingerprint { width: 72px; height: 72px; }
  .share-actions { flex-direction: column; }
  .share-actions .btn { width: 100%; text-align: center; }

  .explore-stats { padding: 0.75rem 0.5rem; }
  .stat-value { font-size: 1rem; }
  .stat-label { font-size: 0.65rem; }
  .explore-filters { gap: 0.5rem; }
  .explore-filters select { min-width: 100px; font-size: 0.8rem; }

  .profile-stats { gap: 0.5rem; }
  .profile-stat-value { font-size: 1.1rem; }
  .profile-header { padding: 1rem; }
  .profile-wallet { font-size: 0.75rem; }

  .slider-label { font-size: 0.55rem; padding: 0.2rem 0.5rem; }
  .slider-handle-grip { width: 28px; height: 28px; }
}

/* Hero CTA — shown at top of landing page */
.cta--hero {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

/* Wallet-connected artworks panel */
.wallet-artworks {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.wallet-artworks h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--amber);
}
.artworks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}
.artwork-thumb {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s;
}
.artwork-thumb:hover { border-color: var(--amber); }
.artwork-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.artwork-thumb-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.25rem 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artworks-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.25rem 0;
  color: var(--text-muted);
}

/* Jobs notification pill — links to /jobs page */
.jobs-notification {
  display: block;
  background: var(--orange-glow);
  border: 1px solid var(--orange);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  margin-bottom: 1rem;
  color: var(--orange);
  font-size: 0.875rem;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.jobs-notification:hover { background: rgba(255, 107, 44, 0.2); }

/* Jobs page */
.wallet-prompt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.wallet-prompt-card p { margin-bottom: 1rem; color: var(--text-muted); }

.jobs-loading { color: var(--text-muted); padding: 1rem 0; font-size: 0.9rem; }
.jobs-empty { text-align: center; padding: 2rem 0; color: var(--text-muted); }

.jobs-section { margin-bottom: 2rem; }
.jobs-section-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }

.jobs-list { display: flex; flex-direction: column; gap: 0.75rem; }

.job-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.job-card-icon { flex-shrink: 0; margin-top: 0.15rem; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--bg-elevated); }
.job-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-card-icon svg { margin: 12px; }
.job-card-info { flex: 1; min-width: 0; }
.job-card-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.25rem; }
.job-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.job-card-progress { margin-top: 0.5rem; }
.job-card-actions { flex-shrink: 0; display: flex; gap: 0.5rem; align-items: center; }
.job-progress-text { color: var(--text-muted); margin-top: 0.25rem; }

.job-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  text-transform: uppercase;
}
.job-status-pending  { background: rgba(255,179,71,0.15); color: var(--amber); }
.job-status-paid     { background: rgba(255,179,71,0.15); color: var(--amber); }
.job-status-processing { background: rgba(255,107,44,0.15); color: var(--orange); }
.job-status-complete { background: rgba(232,184,42,0.15); color: var(--sage); }
.job-status-minted  { background: rgba(76,175,80,0.15); color: #4CAF50; }
.job-status-cancelled { background: rgba(150,150,150,0.15); color: var(--text-muted); }
.job-status-failed   { background: rgba(220,53,69,0.15); color: #e05566; }
.job-status-expired  { background: rgba(255,179,71,0.15); color: var(--amber); opacity: 0.8; }

.btn-mint {
  background: linear-gradient(135deg, var(--sage), var(--amber));
  color: var(--bg);
  font-weight: 600;
}

.job-chain-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  background: rgba(153, 69, 255, 0.15);
  color: #b794f6;
  border: 1px solid rgba(153, 69, 255, 0.25);
}
.job-explorer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}
.job-explorer-link:hover { opacity: 1; color: var(--orange); text-decoration: underline; }

@media (max-width: 600px) {
  .job-card { flex-wrap: wrap; }
  .job-card-actions { width: 100%; flex-direction: column; margin-top: 0.5rem; }
  .job-card-actions .btn { width: 100%; text-align: center; margin-left: 0 !important; }
}

@media (max-width: 480px) {
  .artworks-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.5rem; }
}

/* ─── Existing NFT Retrofit Panel ─── */

.existing-preview-card {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.existing-preview-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

#existing-preview-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

#existing-preview-info p {
  color: var(--text-muted);
}

.existing-selected-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.existing-done-card {
  background: var(--bg-surface);
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.existing-done-msg {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 1rem;
}

.existing-done-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Filter row for existing NFT panel */
.existing-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}
.existing-filter-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}
.existing-filter-label input[type="checkbox"] {
  accent-color: var(--sage);
  width: 16px;
  height: 16px;
}

/* Badge container for existing NFT cards — centered overlay */
.existing-nft-badges {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

/* Individual badge on existing NFT cards */
.existing-nft-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.existing-nft-badge--protected {
  background: rgba(232, 184, 42, 0.15);
  color: var(--sage);
}

.existing-nft-badge--type {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.existing-nft-badge--dried {
  background: rgba(232, 184, 42, 0.55);
  color: var(--text);
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
}

/* Existing NFT grid cards — reuse gallery-card but add relative for badge */
#existing-nft-grid .gallery-card {
  position: relative;
}

#existing-nft-grid .gallery-card--dried {
  opacity: 0.85;
}

@media (max-width: 600px) {
  .existing-preview-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .existing-preview-card img {
    width: 200px;
    height: 200px;
  }
  .existing-selected-actions {
    flex-direction: column;
  }
  .existing-selected-actions .btn {
    width: 100%;
    text-align: center;
  }
  .existing-done-actions {
    flex-direction: column;
  }
  .existing-done-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ── Protect page ── */
.protect-how {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.protect-step {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.protect-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem;
  border-radius: 50%;
  background: var(--orange);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
}
@media (max-width: 600px) {
  .protect-how {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ── Push notification opt-in banner ── */
.push-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.push-banner span { flex: 1; }
.push-banner .btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.push-banner .btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}
.push-banner .btn-text:hover { color: var(--text); }

/* ── Embed Mode (iframe) ── */
body.embed-mode {
  padding: 0 !important;
  min-height: auto;
  background: var(--bg);
}
body.embed-mode .container {
  padding: 1rem 1rem 0.75rem;
  max-width: 100%;
}
body.embed-mode header,
body.embed-mode footer,
body.embed-mode .bottom-nav,
body.embed-mode .protect-integrate,
body.embed-mode .push-banner,
body.embed-mode .protect-how {
  display: none !important;
}
body.embed-mode .page-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
body.embed-mode .page-explain {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.embed-close-btn {
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 9999;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.embed-close-btn:hover {
  background: rgba(255, 70, 70, 0.6);
}
body.embed-mode .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}
@media (max-width: 600px) {
  body.embed-mode .container { padding: 0.75rem; }
}

/* ── Node Network / Leaderboard ─────────────────────────────────────────── */

.node-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}
.node-card:hover { border-color: var(--orange); }

.node-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.node-card-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.node-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.node-card-wallet {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}
.node-card-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Status dot */
.node-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.node-status-online {
  background: #4aeaaa;
  box-shadow: 0 0 6px rgba(74, 234, 170, 0.5);
}
.node-status-offline {
  background: #666;
}

/* Badges */
.node-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.node-badge-both { background: rgba(255, 107, 44, 0.15); color: var(--orange); }
.node-badge-writer { background: rgba(255, 107, 44, 0.15); color: var(--orange-light); }
.node-badge-reader { background: rgba(74, 234, 170, 0.12); color: #4aeaaa; }
.node-badge-ws { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
.node-badge-jito { background: rgba(167, 139, 250, 0.12); color: #a78bfa; }
.node-badge-standard { background: rgba(138, 130, 120, 0.12); color: var(--text-muted); }
.node-badge-ws\+jito { background: rgba(167, 139, 250, 0.12); color: #a78bfa; }

/* Metrics grid — auto-fit so sparse data doesn't leave empty cells */
.node-card-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.node-metric {
  text-align: center;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: 6px;
}
.node-metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--orange);
}
.node-metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Details row */
.node-card-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Recent jobs */
.node-card-jobs {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.node-jobs-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.node-job-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  color: var(--text);
  flex-wrap: wrap;
}
.node-job-id { color: var(--text-muted); font-family: monospace; min-width: 3rem; }
.node-job-chunks { color: var(--text-muted); }
.node-job-tps { color: var(--orange); font-weight: 600; }
.node-job-time { color: var(--text-muted); }

/* 6-col stats on desktop, 3 on mobile */
@media (max-width: 600px) {
  .node-card-metrics { grid-template-columns: repeat(2, 1fr); }
  .node-card-header { flex-direction: column; align-items: flex-start; }
  .node-job-row { font-size: 0.72rem; gap: 0.5rem; }
}

/* ── Live TX Feed ────────────────────────────────────────────────────── */
.tx-feed-panel {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #151210;
  overflow: hidden;
}
.tx-feed-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-muted);
}
.tx-feed-stats [data-feed-chunks] { color: var(--text); font-weight: 600; }
.tx-feed-stats [data-feed-tps] { color: var(--orange); font-weight: 600; }
.tx-feed-live { color: #4ade80; }
.tx-feed-live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; margin-right: 0.35rem; animation: feed-pulse 1.5s ease-in-out infinite; }
.tx-feed-connecting { color: var(--amber); }
.tx-feed-stopped { color: var(--text-muted); }
.tx-feed-error { color: #f87171; }

@keyframes feed-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.tx-feed-log {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.tx-feed-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  animation: feed-row-in 0.2s ease-out;
}
.tx-feed-row:nth-child(even) { background: rgba(255,255,255,0.02); }
.tx-feed-chunk { color: var(--orange); min-width: 3.5rem; font-weight: 600; }
.tx-feed-sig { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.tx-feed-sig:hover { color: var(--orange-light); }
.tx-feed-time { color: var(--text-muted); margin-left: auto; font-size: 0.7rem; }

@keyframes feed-row-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Watch Live button */
.btn-watch {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-watch:hover { border-color: var(--orange); color: var(--orange); }
.btn-watch.active { border-color: #4ade80; color: #4ade80; }
.btn-watch .watch-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (max-width: 600px) {
  .tx-feed-log { max-height: 200px; }
  .tx-feed-row { gap: 0.5rem; font-size: 0.7rem; }
  .tx-feed-chunk { min-width: 2.5rem; }
}

/* ── FD# Celebration Modal ─────────────────────────────────────────────────── */
.fd-celebration-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: fdOverlayIn 0.3s ease-out;
}
@keyframes fdOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.fd-celebration {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem 2rem; max-width: 420px; width: 90%;
  text-align: center; position: relative;
  animation: fdSlideUp 0.4s ease-out;
}
@keyframes fdSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.fd-celebration-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.2rem; cursor: pointer; padding: 0.25rem;
  line-height: 1; transition: color 0.15s;
}
.fd-celebration-close:hover { color: var(--text); }

.fd-celebration-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--amber));
  display: flex; align-items: center; justify-content: center;
  animation: fdPulse 1.5s ease-in-out infinite;
}
@keyframes fdPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,107,44,0.4); } 50% { box-shadow: 0 0 0 12px rgba(255,107,44,0); } }

.fd-celebration-icon svg { width: 28px; height: 28px; }

.fd-celebration h3 { margin: 0 0 0.25rem; font-size: 1.1rem; color: var(--text); }
.fd-celebration .fd-subtitle { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 1.25rem; }

.fd-number-display {
  font-family: var(--font-mono, 'SF Mono', 'Fira Code', monospace);
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--orange); margin: 0 0 0.5rem;
  word-break: break-all;
}

.fd-number-explain {
  color: var(--text-muted); font-size: 0.78rem; line-height: 1.5;
  margin: 0 0 1.5rem; max-width: 320px; margin-inline: auto;
}

.fd-celebration-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.fd-celebration-actions .btn { width: 100%; justify-content: center; }

.fd-copy-btn {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text); padding: 0.5rem 1rem; border-radius: var(--radius);
  cursor: pointer; font-size: 0.85rem; transition: border-color 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.fd-copy-btn:hover { border-color: var(--orange); color: var(--orange); }
.fd-copy-btn.copied { border-color: #4ade80; color: #4ade80; }

/* ── Onboarding Walkthrough ────────────────────────────────────────────────── */
.onboarding-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fdOverlayIn 0.3s ease-out;
}

.onboarding-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem 1.75rem; max-width: 480px; width: 92%;
  position: relative; animation: fdSlideUp 0.4s ease-out;
}

.onboarding-progress {
  display: flex; gap: 6px; justify-content: center; margin-bottom: 1.5rem;
}
.onboarding-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: background 0.3s, transform 0.3s;
}
.onboarding-dot.active { background: var(--orange); transform: scale(1.3); }
.onboarding-dot.done { background: var(--sage); }

.onboarding-step { text-align: center; }
.onboarding-step h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--text); }
.onboarding-step p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; margin: 0 0 1rem; }

.onboarding-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}

.onboarding-highlight {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 1rem; margin: 1rem 0;
  font-family: var(--font-mono, monospace); font-size: 0.85rem;
  color: var(--orange);
}

.onboarding-table {
  width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.8rem; text-align: left;
}
.onboarding-table th { color: var(--text-muted); font-weight: 600; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); }
.onboarding-table td { padding: 0.35rem 0.5rem; color: var(--text); }
.onboarding-table tr:nth-child(even) td { background: var(--bg-elevated); }

.onboarding-nav {
  display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; gap: 0.75rem;
}
.onboarding-skip {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 0.8rem; padding: 0.25rem; transition: color 0.15s;
}
.onboarding-skip:hover { color: var(--text); }

.onboarding-nav .btn { min-width: 100px; }

.onboarding-username-input {
  display: block; width: 100%; max-width: 280px; margin: 0.75rem auto;
  padding: 0.6rem 1rem; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.95rem;
  text-align: center; outline: none; transition: border-color 0.2s;
}
.onboarding-username-input:focus { border-color: var(--orange); }
.onboarding-username-input::placeholder { color: var(--text-muted); }

.onboarding-username-status {
  font-size: 0.78rem; margin-top: 0.35rem; min-height: 1.2em;
}
.onboarding-username-status.error { color: #e05566; }
.onboarding-username-status.success { color: #4ade80; }

.onboarding-replay-btn {
  position: fixed; bottom: 70px; left: 0.75rem; z-index: 100;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-surface); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0; opacity: 0.5; transition: opacity 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.onboarding-replay-btn:hover { opacity: 1; border-color: var(--orange); }
.onboarding-replay-btn img { display: block; }

@media (max-width: 480px) {
  .fd-celebration { padding: 2rem 1.25rem; }
  .fd-number-display { font-size: 1.2rem; }
  .onboarding-card { padding: 1.5rem 1.25rem; }
}
