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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Dark glass surface palette */
  --ink:       #f0f2ff;
  --ink-2:     #b8bdd6;
  --ink-3:     #6e7494;
  --surface:   rgba(18, 19, 36, 0.82);
  --surface-2: rgba(255,255,255,0.055);
  --surface-3: rgba(255,255,255,0.09);
  --border:    rgba(255,255,255,0.10);
  --border-2:  rgba(255,255,255,0.16);

  /* Brand */
  --violet:        #14b8a6;
  --violet-light:  rgba(20,184,166,0.18);
  --violet-hover:  #2dd4bf;
  --violet-glow:   rgba(20,184,166,0.35);
  --green:         #22c55e;
  --green-light:   rgba(34,197,94,0.14);
  --green-hover:   #4ade80;
  --red:           #f05050;
  --red-light:     rgba(240,80,80,0.14);
  --amber:         #f59e0b;
  --amber-light:   rgba(245,158,11,0.14);

  /* Radius */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  /* Shadows */
  --shadow-card: 0 0 0 1px rgba(255,255,255,0.08), 0 24px 64px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.35);
  --shadow-btn:  0 0 0 1px rgba(20,184,166,0.4), 0 4px 20px rgba(20,184,166,0.38);
  --shadow-green: 0 0 0 1px rgba(34,197,94,0.4), 0 4px 20px rgba(34,197,94,0.28);

  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ── Base ──────────────────────────────────────── */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080a14;
  padding: 2rem 1rem;
  color: var(--ink);
  position: relative;
  overflow-x: hidden;
}

/* Animated aurora background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(20,184,166,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 85% 85%, rgba(34,197,94,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 55% 50%, rgba(99,60,200,0.12) 0%, transparent 50%);
  pointer-events: none;
  animation: aurora 18s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

@keyframes aurora {
  0%   { opacity: 1; transform: scale(1) rotate(0deg); }
  50%  { opacity: 0.85; transform: scale(1.06) rotate(1deg); }
  100% { opacity: 1; transform: scale(1.02) rotate(-1deg); }
}

/* ── Card Shell ────────────────────────────────── */
.card {
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
  border: 1px solid var(--border-2);
}

/* Inner top glow */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Screens ───────────────────────────────────── */
.screen { display: none; animation: fadeIn .28s cubic-bezier(.4,0,.2,1); }
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Progress Stepper ──────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
}
.step-item:last-child { flex: 0; }
.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: all var(--transition);
  letter-spacing: 0;
}
.step-dot.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 4px var(--violet-light), 0 0 16px var(--violet-glow);
}
.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 0 3px var(--green-light);
}
.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  display: none;
  letter-spacing: 0.2px;
}
.step-connector {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  margin: 0 6px;
  transition: background var(--transition);
}
.step-connector.done { background: var(--green); }

/* ── Hero Screen (Screen 0) ────────────────────── */
.hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(20,184,166,0.25), rgba(20,184,166,0.1));
  border: 1px solid rgba(20,184,166,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  box-shadow: 0 0 32px rgba(20,184,166,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.hero-icon svg { width: 38px; height: 38px; }

.hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  letter-spacing: -.6px;
  line-height: 1.18;
  margin-bottom: .6rem;
}
.hero-sub {
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

/* Trust row */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.1px;
}
.trust-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  line-height: 1;
  letter-spacing: 0.1px;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--violet-hover);
  box-shadow: 0 0 0 1px rgba(20,184,166,0.5), 0 6px 24px rgba(20,184,166,0.45);
  transform: translateY(-1px);
}

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

.btn-green {
  background: var(--green);
  color: #0a1a13;
  font-weight: 700;
  box-shadow: var(--shadow-green);
}
.btn-green:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.5), 0 6px 24px rgba(34,197,94,0.38);
}

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(240,80,80,0.22);
}
.btn-danger:hover { background: rgba(240,80,80,0.2); }

.btn-nav {
  padding: 10px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--border);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.btn-nav:hover { background: var(--surface-3); border-color: var(--border-2); color: var(--ink); }

.btn:disabled, .btn[disabled] {
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

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

/* ── Section heading ───────────────────────────── */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.35px;
  margin-bottom: .4rem;
}
.section-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 1.5rem;
  line-height: 1.55;
  font-weight: 400;
}

/* ── Platform Cards ────────────────────────────── */
.platform-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem; }

.platform-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.platform-card:hover {
  border-color: rgba(20,184,166,0.45);
  background: var(--violet-light);
  transform: translateX(2px);
}
.platform-card.selected {
  border-color: rgba(20,184,166,0.6);
  background: var(--violet-light);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.12), inset 0 1px 0 rgba(20,184,166,0.08);
}
.platform-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.platform-card.selected .platform-logo,
.platform-card:hover .platform-logo {
  background: rgba(20,184,166,0.12);
  border-color: rgba(20,184,166,0.3);
}
.platform-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.platform-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-weight: 400; }
.platform-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: var(--surface-2);
}
.platform-card.selected .platform-check {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 8px var(--violet-glow);
}
.platform-card.selected .platform-check::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

/* ── Instructions ──────────────────────────────── */
.instructions-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 1.25rem;
}
.instructions-box h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 10px;
}
.instructions-box ol {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  padding-left: 18px;
}
.instructions-box li { margin-bottom: 6px; }
.instructions-box code {
  background: rgba(20,184,166,0.12);
  border: 1px solid rgba(20,184,166,0.22);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  color: #5eead4;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ── Notice / Security box ─────────────────────── */
.notice {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.65;
  margin-bottom: 1rem;
  border: 1px solid;
  font-weight: 400;
}
.notice-amber {
  background: var(--amber-light);
  border-color: rgba(245,158,11,0.28);
  color: #d4a030;
}
.notice-amber strong { display: block; font-weight: 700; margin-bottom: 4px; color: #e8b340; }
.notice-green {
  background: var(--green-light);
  border-color: rgba(34,197,94,0.28);
  color: #3dd9a0;
}
.notice-violet {
  background: var(--violet-light);
  border-color: rgba(20,184,166,0.28);
  color: #5eead4;
}

/* ── Input ─────────────────────────────────────── */
.input-group { margin-bottom: 1rem; }
.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}
.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.input-group input {
  width: 100%;
  padding: 13px 13px 13px 40px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--ink);
  background: var(--surface-2);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: 0.2px;
}
.input-group input:focus {
  border-color: rgba(20,184,166,0.6);
  background: rgba(20,184,166,0.06);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.14);
}
.input-group input::placeholder { color: var(--ink-3); opacity: 0.7; }

/* ── Messages ──────────────────────────────────── */
.msg {
  font-size: 12.5px;
  margin-bottom: 1rem;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  display: none;
  border-left: 3px solid;
  line-height: 1.55;
  font-weight: 500;
}
.msg.visible { display: block; }
.msg-error   { background: var(--red-light);    color: #f07070; border-color: var(--red); }
.msg-success { background: var(--green-light);   color: #3dd9a0; border-color: var(--green); }
.msg-warning { background: var(--amber-light);   color: #d4a030; border-color: var(--amber); }
.msg-neutral { background: var(--surface-2);     color: var(--ink-2); border-color: var(--border-2); }

/* Rate limit */
.rate-limit-warning {
  background: var(--red-light);
  color: #f07070;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 1rem;
  display: none;
  border: 1px solid rgba(240,80,80,0.22);
  font-weight: 500;
}

/* ── QR Display ────────────────────────────────── */
.qr-section {
  display: none;
  flex-direction: column;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 18px;
  margin-bottom: 1.25rem;
}
.qr-section.visible { display: flex; }

.qr-frame {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 32px rgba(0,0,0,0.4);
  margin-bottom: 1.25rem;
}
#qrCanvas canvas, #qrCanvas img {
  display: block;
  border-radius: 4px;
}

.qr-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
  flex-wrap: wrap;
}
.qr-meta-item { text-align: center; }
.qr-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.qr-meta-value { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ── Download section ──────────────────────────── */
.download-section { display: none; }
.download-section.visible { display: block; }

.format-selector { display: flex; gap: 8px; margin-bottom: 1rem; }
.format-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.format-btn:hover { border-color: rgba(20,184,166,0.45); color: var(--violet); background: var(--violet-light); }
.format-btn.selected { border-color: var(--green); background: rgba(34,197,94,0.15); color: var(--green); }

/* ── Nav bar ───────────────────────────────────── */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  gap: 10px;
}

/* ── Danger zone ───────────────────────────────── */
.danger-zone {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.danger-zone p {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: .75rem;
  font-weight: 400;
}

/* ── Footer ────────────────────────────────────── */
.app-footer {
  margin-top: 1.5rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.app-footer a { color: var(--ink-2); text-decoration: none; font-weight: 600; transition: color var(--transition); }
.app-footer a:hover { color: var(--violet); }
.security-line {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.1px;
  opacity: 0.85;
}
.security-line span { display: flex; align-items: center; gap: 4px; }

/* ── Modal ─────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(4,5,12,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal.active { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content {
  background: rgba(18,19,36,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 0 0 1px var(--border-2), 0 24px 64px rgba(0,0,0,0.7);
  border: 1px solid var(--border-2);
  animation: fadeIn .22s cubic-bezier(.4,0,.2,1);
}
.modal-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--red-light);
  border: 1px solid rgba(240,80,80,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 24px;
}
.modal-content h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; letter-spacing: -.2px; }
.modal-content p { font-size: 13px; color: var(--ink-3); margin-bottom: 1.5rem; line-height: 1.55; }
.modal-buttons { display: flex; gap: 10px; }
.modal-buttons button {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.1px;
}
.btn-confirm { background: var(--red); color: #fff; }
.btn-confirm:hover { background: #e86060; transform: translateY(-1px); }
.btn-cancel { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border) !important; }
.btn-cancel:hover { background: var(--surface-3); color: var(--ink); }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 520px) {
  .card { padding: 2rem 1.25rem 1.75rem; }
  .format-selector, .modal-buttons { flex-direction: column; }
  .nav-bar { flex-direction: column-reverse; }
  .btn-nav { width: 100%; justify-content: center; }
}

@media (min-width: 380px) {
  .step-label { display: block; }
}

/* ── Reduced motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .screen { animation: none; }
  .btn-primary:hover, .btn-green:hover { transform: none; }
}

/* ── Site Nav ──────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(8,10,20,0.80);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.2px;
  flex-shrink: 0;
}
.nav-brand-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20,184,166,0.35), rgba(20,184,166,0.15));
  border: 1px solid rgba(20,184,166,0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-brand-icon svg { width: 16px; height: 16px; }
.nav-brand-text { color: var(--ink); }
.nav-brand-text em { color: var(--violet); font-style: normal; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  border-radius: 7px;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link svg { opacity: 0.55; flex-shrink: 0; transition: opacity var(--transition); }
.nav-link:hover svg { opacity: 0.9; }
.nav-link-active { color: var(--violet) !important; background: var(--violet-light) !important; }
.nav-link-active svg { opacity: 1 !important; }
/* Hamburger — hidden on desktop */
.nav-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--ink-2); cursor: pointer; padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}
.nav-menu-btn:hover { background: var(--surface-2); }

/* ── Site Footer ───────────────────────────────── */
.site-footer {
  width: 100%;
  max-width: 900px;
  margin-top: 3rem;
  position: relative;
  z-index: 2;
}
.site-footer-inner {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 2.5rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Brand row */
.footer-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.footer-brand-link {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.2px;
  flex-shrink: 0;
}
.footer-tagline {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.65;
  margin-top: 3px;
  opacity: 0.7;
}

/* Three-column grid */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}
.footer-col-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--ink-3);
  opacity: 0.55;
  margin-bottom: 12px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.footer-link {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(176,180,210,0.7);
  text-decoration: none;
  transition: color var(--transition);
  display: inline-block;
  padding: 2px 0;
}
.footer-link:hover { color: var(--violet); }

/* Bottom bar */
.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11.5px;
  color: var(--ink-3);
  opacity: 0.55;
}
.footer-bottom-bar a { color: inherit; font-weight: 600; text-decoration: none; transition: color var(--transition); }
.footer-bottom-bar a:hover { color: var(--violet); opacity: 1; }
.footer-bottom-meta { font-size: 11px; }

/* Push card down below fixed nav */
body { padding-top: 5rem; }

/* ── Nav + Footer responsive ───────────────────── */
@media (max-width: 640px) {
  .site-nav { padding: 0 1rem; }
  .nav-menu-btn { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(8,10,20,0.97);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 1rem 12px;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; border-radius: 8px; padding: 9px 12px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-brand-row { flex-direction: column; gap: .5rem; }
}
@media (max-width: 400px) {
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom-bar { flex-direction: column; align-items: flex-start; }
}

/* ── Creator Details Form (masking step) ────────── */
.field-row { display: flex; gap: 10px; }
.field-row .input-group { flex: 1; }
.input-group input[type="datetime-local"] {
  font-family: inherit;
  padding-left: 13px;
  color-scheme: dark;
}
.field-hint {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.5;
  font-weight: 400;
}
.checkbox-group { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 8px; }
.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--transition);
}
.checkbox-item:hover { border-color: rgba(20,184,166,0.4); background: var(--violet-light); }
.checkbox-item input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--violet);
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-item span { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.masked-link-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.masked-link-box code {
  flex: 1;
  font-size: 12px;
  color: #5eead4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  word-break: break-all;
}
.copy-btn {
  flex-shrink: 0;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--ink-2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.copy-btn:hover { color: var(--violet); border-color: rgba(20,184,166,0.45); }

@media (max-width: 480px) {
  .field-row { flex-direction: column; gap: 0; }
}

/* ── Spin animation + scrollbar (was second inline block) ── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* ── Scrollbar (dark) ──────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Announcement Banner (configured via js/config/announcement.json) ── */
.announcement-bar {
  position: relative;
  z-index: 90;
  width: 100%;
  padding: 10px 3rem 10px 1rem;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(20,184,166,0.28), rgba(20,184,166,0.14));
  border-bottom: 1px solid rgba(20,184,166,0.3);
}
.announcement-info { background: linear-gradient(90deg, rgba(20,184,166,0.28), rgba(20,184,166,0.14)); }
.announcement-warning { background: linear-gradient(90deg, rgba(245,158,11,0.28), rgba(245,158,11,0.12)); border-bottom-color: rgba(245,158,11,0.3); }
.announcement-bar a { color: var(--violet-hover); margin-left: 8px; text-decoration: underline; }
.announcement-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.announcement-close:hover { color: var(--ink); }

/* ── Consent Banner ─────────────────────────────── */
.consent-banner {
  position: fixed;
  z-index: 200;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 640px;
  margin: 0 auto;
  background: rgba(14,15,28,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.consent-banner p { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.consent-banner a { color: var(--violet-hover); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; }
.consent-actions .btn { width: auto; padding: 10px 18px; }
@media (max-width: 480px) {
  .consent-actions { flex-direction: column; }
  .consent-actions .btn, .consent-actions .btn-nav { width: 100%; }
}

/* ── How to Use section (home screen) ──────────── */
.how-to-use { margin: 1.75rem 0; }
.how-to-use-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 1rem;
  text-align: center;
}
.how-to-steps { display: flex; flex-direction: column; gap: 10px; }
.how-to-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.how-to-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--violet-light);
  border: 1px solid rgba(20,184,166,0.35);
  color: var(--violet-hover);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-to-step-text { font-size: 13px; color: var(--ink-2); line-height: 1.5; padding-top: 3px; }
.how-to-step-text strong { color: var(--ink); }

/* ── AdSense footer slot (only shown if configured) ── */
.ad-slot-footer { margin: 1.5rem 0; text-align: center; min-height: 90px; }

/* ── Legal / informational page prose ──────────── */
.legal-page { text-align: left; max-width: 720px; margin: 0 auto; }
.legal-page h1.section-title { text-align: left; }
.legal-page h2 { font-size: 16px; color: var(--ink); margin: 1.5rem 0 .5rem; }
.legal-page p { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; margin-bottom: .85rem; }
.legal-page ul, .legal-page ol { margin: 0 0 .85rem 1.2rem; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.legal-page a { color: var(--violet-hover); text-decoration: underline; }
.legal-page .pending-notice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 1.25rem;
}

/* ── Legal / Info Pages (page-bg, legal-wrap design) ───────────── */
.page-bg { flex: 1; padding-top: var(--nav-h, 64px); position: relative; min-height: 100vh; }
.page-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, var(--violet-light) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 80%, var(--green-light) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.legal-wrap { max-width: 720px; width: 100%; margin: 0 auto; padding: 3rem 1.5rem 4rem; position: relative; z-index: 1; }
.legal-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--violet-hover); margin-bottom: 10px; }
.legal-h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; color: var(--ink); letter-spacing: -.5px; line-height: 1.15; margin-bottom: .75rem; }
.legal-meta { font-size: 13px; color: var(--ink-3); margin-bottom: 2.5rem; }
.legal-meta strong { color: var(--ink-2); }

/* Banners */
.legal-banner { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 2rem; display: flex; gap: 14px; align-items: flex-start; }
.legal-banner-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.legal-banner-text { font-size: 14px; line-height: 1.65; }
.legal-banner-text strong { display: block; margin-bottom: 4px; font-size: 15px; }
.banner-green  { background: var(--green-light); border: 1px solid rgba(34,197,94,0.3); }
.banner-green  .legal-banner-text { color: rgba(146,225,175,.9); }
.banner-green  .legal-banner-text strong { color: #6ee7a0; }
.banner-violet { background: var(--violet-light); border: 1px solid rgba(20,184,166,0.35); }
.banner-violet .legal-banner-text { color: rgba(153,235,222,.9); }
.banner-violet .legal-banner-text strong { color: #5eead4; }
.banner-amber  { background: var(--amber-light); border: 1px solid rgba(245,158,11,0.3); }
.banner-amber  .legal-banner-text { color: rgba(251,191,36,.85); }
.banner-amber  .legal-banner-text strong { color: #fbbf24; }
.banner-red    { background: var(--red-light); border: 1px solid rgba(240,80,80,0.3); }
.banner-red    .legal-banner-text { color: rgba(240,120,120,.85); }
.banner-red    .legal-banner-text strong { color: #f08080; }

/* Sections */
.legal-section { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.legal-section h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.legal-section h2 .section-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(20,184,166,0.25); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.legal-section p { font-size: 13px; color: var(--ink-2); line-height: 1.75; margin-bottom: 10px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { list-style: none; padding: 0; margin: 10px 0 0; }
.legal-section ul li { font-size: 13px; color: var(--ink-2); line-height: 1.65; padding: 6px 0 6px 20px; position: relative; border-bottom: 1px solid var(--border); }
.legal-section ul li:last-child { border-bottom: none; }
.legal-section ul li::before { content: '›'; position: absolute; left: 4px; color: var(--violet-hover); font-weight: 700; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.data-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px 12px; color: var(--ink-2); border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table td:first-child { color: var(--ink); font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-green  { background: var(--green-light);  color: #6ee7a0; }
.badge-violet { background: var(--violet-light); color: #5eead4; }
.badge-amber  { background: var(--amber-light);  color: #fbbf24; }
.badge-red    { background: var(--red-light);    color: #f08080; }

/* Highlight boxes */
.legal-highlight        { background: var(--violet-light); border: 1px solid rgba(20,184,166,0.3);  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; font-size: 13px; color: rgba(153,235,222,.85); line-height: 1.65; }
.legal-highlight-green  { background: var(--green-light);  border: 1px solid rgba(34,197,94,0.3); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; font-size: 13px; color: rgba(146,225,175,.85); line-height: 1.65; }
.legal-highlight-amber  { background: var(--amber-light);  border: 1px solid rgba(245,158,11,0.3);  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; font-size: 13px; color: rgba(251,191,36,.85); line-height: 1.65; }
.legal-highlight-red    { background: var(--red-light);    border: 1px solid rgba(240,80,80,0.3);  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; font-size: 13px; color: rgba(240,120,120,.85); line-height: 1.65; }

/* CTA */
.legal-cta { text-align: center; margin-top: 2.5rem; }
.btn-back { display: inline-flex; align-items: center; gap: 8px; background: var(--violet); color: #fff; border: none; border-radius: 100px; padding: 13px 28px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: var(--shadow-btn); text-decoration: none; transition: all var(--transition); }
.btn-back:hover { background: var(--violet-hover); }

.legal-wrap a { color: var(--violet-hover); font-weight: 600; text-decoration: none; }
.legal-wrap a:hover { text-decoration: underline; }
