:root {
  --bg: #0a0e17;
  --bg-card: rgba(18, 24, 38, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 229, 196, 0.25);

  --text: #eef2ff;
  --text-muted: #8b95a8;
  --text-dim: #5c6578;

  --mint: #00e5c4;
  --mint-dim: rgba(0, 229, 196, 0.15);
  --violet: #7c6cff;
  --violet-dim: rgba(124, 108, 255, 0.2);
  --amber: #ffb547;
  --amber-dim: rgba(255, 181, 71, 0.15);
  --rose: #ff6b8a;

  --font: 'Outfit', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { min-height: 100dvh; position: relative; }

/* ── Ambient background ── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient__mesh {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, rgba(0, 229, 196, 0.12), transparent),
    radial-gradient(ellipse 45% 35% at 80% 10%, rgba(124, 108, 255, 0.14), transparent),
    radial-gradient(ellipse 40% 30% at 60% 85%, rgba(255, 181, 71, 0.08), transparent);
  animation: meshShift 20s ease-in-out infinite alternate;
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

@keyframes meshShift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-3%, 2%) scale(1.05); }
}

.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-dark {
  background: rgba(14, 18, 28, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ── Layout ── */
.app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 16px 20px 28px;
}

.screen {
  display: none;
  flex-direction: column;
  min-height: calc(100dvh - 52px);
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.active { display: flex; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-right: 72px;
}

.brand--compact {
  margin-bottom: 24px;
  padding-right: 72px;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mint-dim), var(--violet-dim));
  border: 1px solid var(--border-glow);
  color: var(--mint);
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(0, 229, 196, 0.12);
}

.brand__mark--sm { width: 34px; height: 34px; border-radius: 10px; }
.brand__mark svg { width: 22px; height: 22px; }
.brand__mark--sm svg { width: 18px; height: 18px; }

.brand__text { display: flex; flex-direction: column; gap: 1px; }
.brand__name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand__tag { font-size: 0.68rem; font-weight: 600; color: var(--mint); text-transform: uppercase; letter-spacing: 0.12em; }

/* ── Hero ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero__title {
  font-size: clamp(1.85rem, 6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  max-width: 340px;
  margin-bottom: 20px;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--mint), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 310px;
  margin-top: 24px;
  margin-bottom: 28px;
}

.hero__link {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
  margin-top: 16px;
}

.hero__link:hover { color: var(--mint); }

.landing-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 32px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Radar card ── */
.radar-card {
  width: 100%;
  max-width: 300px;
  padding: 18px 20px 16px;
  border-radius: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}

.radar {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  flex-shrink: 0;
}

.radar__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 196, 0.12);
}

.radar__ring--2 { inset: 24px; border-color: rgba(0, 229, 196, 0.08); }
.radar__ring--3 { inset: 48px; border-color: rgba(0, 229, 196, 0.05); }

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 229, 196, 0.18) 40deg, transparent 80deg);
  animation: sweep 3.5s linear infinite;
}

@keyframes sweep { to { transform: rotate(360deg); } }

.radar__core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.97);
  border: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.radar__label {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  line-height: 1;
  white-space: nowrap;
}

.radar__score {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--text), var(--mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.radar__blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: blip 2s ease infinite;
  z-index: 1;
}

.radar__blip--a { top: 14px; right: 28px; animation-delay: 0s; }
.radar__blip--b { bottom: 22px; left: 18px; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation-delay: 0.7s; }
.radar__blip--c { top: 36px; left: 22px; background: var(--rose); box-shadow: 0 0 10px var(--rose); animation-delay: 1.4s; }

@keyframes blip {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.6); }
}

.radar-card__legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.radar-card__legend span { display: flex; align-items: center; gap: 5px; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot--safe { background: var(--mint); }
.dot--warn { background: var(--amber); }
.dot--risk { background: var(--rose); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--glow {
  background: linear-gradient(135deg, var(--mint) 0%, #00c4a7 100%);
  color: #041510;
  box-shadow: 0 4px 24px rgba(0, 229, 196, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn--glow:hover:not(:disabled) {
  box-shadow: 0 8px 36px rgba(0, 229, 196, 0.45);
}

.btn--lg {
  width: 100%;
  max-width: 320px;
  padding: 16px 28px;
  border-radius: 14px;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.btn--glow svg { width: 18px; height: 18px; opacity: 0.7; }

/* ── Steps ── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 10px;
}

.steps__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.steps__dot.done { background: var(--mint); box-shadow: 0 0 8px rgba(0,229,196,0.4); }
.steps__dot.active { background: var(--violet); box-shadow: 0 0 10px rgba(124,108,255,0.5); animation: pulse 1.5s infinite; }

.steps__line {
  flex: 1;
  height: 2px;
  background: var(--text-dim);
  opacity: 0.3;
  max-width: 40px;
}

.steps__line.done { background: var(--mint); opacity: 0.5; }
.steps__line.active { background: linear-gradient(90deg, var(--mint), var(--violet)); opacity: 0.7; }

.steps__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
}

/* ── Scan screen ── */
.scan {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.scan__title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.scan__subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 300px;
}

.wallet-card {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  text-align: left;
}

.wallet-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mint);
  margin-bottom: 12px;
}

.wallet-card__row { display: flex; align-items: center; gap: 12px; }

.wallet-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--violet-dim);
  border: 1px solid rgba(124, 108, 255, 0.3);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--violet);
}

.wallet-card__name { font-weight: 700; font-size: 0.9rem; }
.wallet-card__addr { color: var(--text-dim); font-size: 0.78rem; font-family: var(--mono); margin-top: 2px; }

.wallet-card__balances {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-card__bal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.wallet-card__bal-row strong {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--mint);
  font-weight: 700;
}

.orbit-scan {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 8px auto 40px;
}

.orbit-scan__track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(124, 108, 255, 0.25);
}

.orbit-scan__planet {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--violet);
  border-right-color: var(--mint);
  animation: spin 2s linear infinite;
}

.orbit-scan__icon {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--violet-dim);
  border: 1px solid rgba(124, 108, 255, 0.25);
  color: var(--violet);
  display: grid;
  place-items: center;
}

.orbit-scan__icon svg { width: 32px; height: 32px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: end;
  animation: fadeIn 0.25s ease;
}

.overlay[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 92dvh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.modal__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mint);
  margin-bottom: 6px;
}

.modal__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.modal__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s;
}

.modal__close:hover { border-color: var(--rose); color: var(--rose); }

.network-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--amber-dim);
  border: 1px solid rgba(255, 181, 71, 0.2);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 20px;
}

.network-chip__icon { font-size: 0.85rem; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.tabs__btn {
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.tabs__btn.active {
  background: linear-gradient(135deg, var(--violet-dim), var(--mint-dim));
  color: var(--text);
  border: 1px solid var(--border);
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 10px;
}

.wallet-item {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 12px;
  transition: background 0.15s, transform 0.15s;
}

.wallet-item:hover {
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

.wallet-item__icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  display: grid;
  place-items: center;
}

.wallet-item__icon img { width: 100%; height: 100%; object-fit: cover; }
.wallet-item__icon span { font-size: 0.65rem; font-weight: 800; color: #fff; }
.wallet-item span:last-child { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); }

.wallet-item__icon--trust { background: linear-gradient(135deg, #3375bb, #1a4f8a); }
.wallet-item__icon--okx { background: #111; }
.wallet-item__icon--bitget { background: linear-gradient(135deg, #00b4d8, #0077b6); }
.wallet-item__icon--bybit { background: #1a1a1a; border-color: #333; }
.wallet-item__icon--tp { background: #2980fe; }
.wallet-item__icon--im { background: #11c4d1; }
.wallet-item__icon--browser { background: var(--violet-dim); color: var(--violet); font-size: 1.1rem; }

.qr-panel { padding: 12px 0; }

.qr-panel__frame {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.qr-placeholder {
  width: 140px;
  height: 140px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  display: grid;
  place-items: center;
  color: var(--text-dim);
}

.qr-placeholder svg { width: 56px; height: 56px; }
.qr-panel p { color: var(--text-dim); font-size: 0.82rem; }

#qr-container {
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: grid;
  place-items: center;
}
#qr-container img,
#qr-container canvas {
  width: 200px !important;
  height: 200px !important;
}

/* ── Sheets ── */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 440px;
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  padding: 12px 24px 32px;
  z-index: 110;
  box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet[hidden] { display: none; }
.sheet--tall { max-height: 88dvh; overflow-y: auto; }

.sheet__handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  margin: 4px auto 24px;
}

.sheet__pulse-ring {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 2px solid var(--mint-dim);
  display: grid;
  place-items: center;
  animation: pulseRing 2s ease infinite;
}

@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 196, 0.2); }
  50% { box-shadow: 0 0 0 12px rgba(0, 229, 196, 0); }
}

.sheet__pulse-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mint-dim);
  color: var(--mint);
  display: grid;
  place-items: center;
}

.sheet__pulse-icon svg { width: 24px; height: 24px; }

.sheet__title {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.sheet__sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 6px 0 24px;
}

.sheet__progress {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.sheet__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--mint));
  border-radius: 999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(0, 229, 196, 0.4);
}

.sheet__tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.sheet__tags span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ── Results ── */
.results { text-align: center; padding-bottom: 8px; }

.grade-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--mint-dim);
  color: var(--mint);
  border: 1px solid var(--border-glow);
  margin-bottom: 14px;
  letter-spacing: 0.06em;
}

.results__score {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--text) 30%, var(--mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 4px;
}

.results__score-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 20px;
}

.results__desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 28px;
  text-align: left;
}

.metrics { text-align: left; }

.metric {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.metric__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 12px;
}

.metric__label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.metric__value { font-size: 0.85rem; font-weight: 800; font-family: var(--mono); color: var(--text); }

.metric__bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.metric__fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.metric__fill--mint { background: linear-gradient(90deg, var(--mint), #00c4a7); }
.metric__fill--violet { background: linear-gradient(90deg, var(--violet), #9d8fff); }
.metric__fill--amber { background: linear-gradient(90deg, var(--amber), #ff9f1c); }

.permit-details {
  margin-top: 24px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.permit-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.permit-preview {
  margin-top: 10px;
  font-size: 0.68rem;
  font-family: var(--mono);
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--mint);
  border: 1px solid var(--border);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 24, 38, 0.95);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 200;
  max-width: calc(100% - 40px);
  text-align: center;
  border: 1px solid var(--border-glow);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: rise 0.3s ease;
}

.toast[hidden] { display: none; }
.toast--error { border-color: rgba(255, 107, 138, 0.4); color: var(--rose); }

/* ── Language switcher ── */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-switch__btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-switch__btn:hover {
  color: var(--text-muted);
}

.lang-switch__btn.active {
  background: var(--mint-dim);
  color: var(--mint);
  border: 1px solid var(--border-glow);
}

@media (min-width: 481px) {
  .overlay { place-items: center; padding: 24px; }
  .modal, .sheet { border-radius: 24px; }
  .sheet { bottom: 24px; }
}

/* ── Demo preview bar (DEMO_MODE only) ── */
.demo-preview {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 10, 16, 0.94);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.demo-preview__label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-right: 4px;
}

.demo-preview button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.demo-preview button:hover {
  border-color: var(--border-glow);
  color: var(--mint);
}

body:has(.demo-preview) .toast {
  bottom: calc(64px + env(safe-area-inset-bottom));
}

body:has(.demo-preview) .sheet {
  bottom: calc(52px + env(safe-area-inset-bottom));
}

body:has(.demo-preview) .landing-foot {
  padding-bottom: 56px;
}

/* WalletConnect modal — always on top */
w3m-modal,
wcm-modal {
  z-index: 99999 !important;
  position: fixed !important;
}
w3m-modal::part(modal),
wcm-modal::part(modal) {
  z-index: 99999 !important;
}
