/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1f2630;
  --border: #2d3544;
  --accent: #14b8a6;
  --accent2: #fb7185;
  --accent-glow: rgba(20,184,166,0.25);
  --text: #f0f3f7;
  --muted: #8b97a8;
  --success: #34d399;
  --radius: 16px;
  /* Banner slot dimensions - reserved to prevent CLS (Core Web Vitals) */
  --banner-leaderboard-h: 90px;
  --banner-skyscraper-w: 160px;
  --banner-rect-h: 250px;
  --banner-sticky-h: 60px;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  /* Extra bottom padding for sticky mobile banner */
  padding-bottom: var(--banner-sticky-h);
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(20,184,166,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(251,113,133,0.08) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════
   BANNER SLOTS
   Fixed dimensions prevent Cumulative Layout Shift (CLS)
   which directly impacts Google Core Web Vitals ranking score
   ═══════════════════════════════════════════════════════════════ */

/* 1. LEADERBOARD - 728×90 - below header, above hero */
.banner-leaderboard {
  position: relative; z-index: 5;
  width: 100%; min-height: var(--banner-leaderboard-h);
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,184,166,0.04);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.banner-leaderboard .banner-inner {
  width: 728px; max-width: 100%; height: var(--banner-leaderboard-h);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

/* 2. SKYSCRAPER - 160×600 - right column next to form */
.banner-skyscraper {
  width: var(--banner-skyscraper-w);
  min-height: 600px;
  flex-shrink: 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 24px;
}
.banner-skyscraper .banner-inner {
  width: var(--banner-skyscraper-w); height: 600px;
  position: sticky; top: 24px;
  display: flex; align-items: center; justify-content: center;
}

/* 3. MEDIUM RECTANGLE - 300×250 - between design and preview */
.banner-rect {
  width: 100%; min-height: var(--banner-rect-h);
  display: flex; align-items: center; justify-content: center;
  margin: 16px 0;
}
.banner-rect .banner-inner {
  width: 300px; height: var(--banner-rect-h);
  display: flex; align-items: center; justify-content: center;
}

/* 4. STICKY BANNER - 320×50 - fixed bottom, always visible on all screens */
.banner-sticky-mobile {
  display: flex; /* always visible - not mobile-only */
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--banner-sticky-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  align-items: center; justify-content: center;
  z-index: 9000;
}
.banner-sticky-mobile .banner-inner {
  width: 728px; max-width: 100%; height: 50px;
  display: flex; align-items: center; justify-content: center;
}

/* Shared banner placeholder styling */
.banner-placeholder {
  width: 100%; height: 100%;
  border: 1px dashed rgba(20,184,166,0.3);
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: rgba(20,184,166,0.04);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  overflow: hidden;
  position: relative;
}
.banner-placeholder:hover {
  border-color: var(--accent);
  background: rgba(20,184,166,0.08);
  box-shadow: 0 0 20px rgba(20,184,166,0.15);
}
.banner-placeholder::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(20,184,166,0.06) 100%);
  pointer-events: none;
}
.banner-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted); opacity: 0.6;
}
.banner-headline {
  font-family: 'Syne', sans-serif; font-weight: 700;
  color: var(--text); text-align: center; line-height: 1.3;
}
.banner-cta {
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent);
  padding: 4px 12px; border: 1px solid var(--accent);
  border-radius: 100px;
}
/* Leaderboard banner text sizes */
.banner-leaderboard .banner-headline { font-size: 16px; }
.banner-leaderboard .banner-label { font-size: 9px; }
/* Skyscraper banner text sizes */
.banner-skyscraper .banner-headline { font-size: 14px; }
/* Rectangle banner text sizes */
.banner-rect .banner-headline { font-size: 15px; }
/* Sticky banner - minimal */
.banner-sticky-mobile .banner-placeholder { border-radius: 0; border: none; border-top: 1px dashed rgba(20,184,166,0.3); }
.banner-sticky-mobile .banner-headline { font-size: 12px; }
.banner-sticky-mobile .banner-label { display: none; }
.banner-sticky-mobile .banner-cta { font-size: 10px; padding: 3px 10px; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */
header {
  position: relative; z-index: 10;
  padding: 20px 40px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
.logo {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo span { color: var(--text); -webkit-text-fill-color: var(--text); }
.tagline { font-size: 13px; color: var(--muted); letter-spacing: 0.5px; }

/* ── HERO ──────────────────────────────────────────────────────── */
.hero { position: relative; z-index: 1; text-align: center; padding: 60px 20px 40px; }
.hero h1 {
  font-family: 'Syne', sans-serif; font-size: clamp(36px, 5vw, 64px);
  font-weight: 800; line-height: 1.1; letter-spacing: -2px; margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { color: var(--muted); font-size: 17px; font-weight: 300; max-width: 520px; margin: 0 auto 16px; line-height: 1.6; }

/* Hero feature pills - helps SEO & AI understand capabilities */
.hero-features {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 16px;
}
.hero-feature {
  font-size: 12px; color: var(--muted); padding: 4px 12px;
  border: 1px solid var(--border); border-radius: 100px;
  background: var(--surface);
}

/* ── APP GRID ──────────────────────────────────────────────────── */
.app {
  position: relative; z-index: 1;
  max-width: 1400px; margin: 0 auto; padding: 0 20px 80px;
  display: grid;
  grid-template-columns: 1fr 380px var(--banner-skyscraper-w);
  gap: 24px; align-items: start;
}
.app > .left-col { min-width: 0; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.step-badge {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.panel-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.3px; }

/* ── TABS ──────────────────────────────────────────────────────── */
.type-tabs {
  padding: 20px 24px 0; display: flex; gap: 8px;
  overflow-x: auto; flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px;
}
.type-tabs::-webkit-scrollbar { display: none; }
.type-tab {
  padding: 7px 14px; border-radius: 100px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; flex-shrink: 0; min-height: 40px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.type-tab:hover { border-color: var(--accent); color: var(--text); }
.type-tab.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; box-shadow: 0 4px 20px var(--accent-glow); }

/* ── FORM ──────────────────────────────────────────────────────── */
.form-area { padding: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 14px; padding: 11px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-group select option { background: var(--surface2); }
.form-group textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.type-content { display: none; }
.type-content.active { display: block; }

/* ── DESIGN PANEL ──────────────────────────────────────────────── */
.design-section { padding: 20px 24px; border-top: 1px solid var(--border); }
.design-section-title { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.gradient-toggle-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gradient-row { display: none; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.gradient-row.visible { display: grid; }
.grad-dir-sel { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px; padding: 10px 13px; outline: none; cursor: pointer; -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.grad-dir-sel:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.grad-presets { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.grad-presets.visible { display: flex; }
.grad-preset { width: 28px; height: 28px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; transition: all .2s; flex-shrink: 0; }
.grad-preset:hover { transform: scale(1.12); border-color: var(--text); }
.color-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.color-picker-wrap { display: flex; align-items: center; gap: 10px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.color-picker-wrap input[type=color] { width: 28px; height: 28px; border: none; background: none; cursor: pointer; padding: 0; border-radius: 6px; }
.color-picker-wrap span { font-size: 13px; font-family: monospace; color: var(--text); flex: 1; }

.shape-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.shape-opt {
  aspect-ratio: 1; border: 2px solid var(--border); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; background: var(--surface2); gap: 4px;
  min-height: 56px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.shape-opt:hover { border-color: var(--accent); }
.shape-opt.active { border-color: var(--accent); background: var(--accent-glow); box-shadow: 0 0 0 1px var(--accent); }
.shape-opt svg { width: 28px; height: 28px; fill: var(--text); }
.shape-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

.ec-row { display: flex; gap: 8px; margin-bottom: 16px; }
.ec-btn {
  flex: 1; padding: 10px 7px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif;
  min-height: 44px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ec-btn:hover { border-color: var(--accent); color: var(--text); }
.ec-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.slider-wrap { margin-bottom: 16px; }
.slider-wrap .slider-header { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; background: var(--border); border-radius: 2px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 8px var(--accent-glow); }

/* ── PREVIEW PANEL ─────────────────────────────────────────────── */
.preview-panel { position: sticky; top: 24px; }
.qr-display { padding: 32px 24px; display: flex; flex-direction: column; align-items: center; }
.qr-frame {
  position: relative; padding: 20px; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--accent-glow); transition: all 0.3s;
}
.qr-frame.has-frame { border: 6px solid #000; border-radius: 20px; }
#qr-container { display: flex; align-items: center; justify-content: center; min-width: 200px; min-height: 200px; }
#qr-container canvas, #qr-container img { display: block; }
.scan-label { display: none; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; text-align: center; margin-top: 8px; color: #000; }
.qr-frame.has-frame .scan-label { display: block; }
.qr-placeholder { width: 200px; height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #ccc; }
.qr-placeholder svg { width: 60px; height: 60px; opacity: 0.3; }
.qr-placeholder p { font-size: 13px; opacity: 0.5; text-align: center; }
.qr-meta { margin-top: 20px; text-align: center; width: 100%; }
.qr-meta .type-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 100px; background: var(--surface2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* ── BUTTONS ───────────────────────────────────────────────────── */
.generate-btn {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.25s; box-shadow: 0 6px 24px var(--accent-glow); margin-bottom: 10px;
  min-height: 52px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.generate-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(20,184,166,0.4); }
.generate-btn:active { transform: translateY(0); }
.download-btn {
  width: 100%; padding: 13px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: 14px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.download-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.download-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-area { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 0; }

/* ── TOGGLE ────────────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toggle-label { font-size: 13px; color: var(--muted); }
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 22px; cursor: pointer; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: 0.3s; }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── LOGO OVERLAY ──────────────────────────────────────────────── */
.logo-upload-area {
  border: 2px dashed var(--border); border-radius: 12px; padding: 18px 16px;
  text-align: center; cursor: pointer; transition: all 0.2s;
  background: var(--surface2); position: relative; -webkit-tap-highlight-color: transparent;
}
.logo-upload-area:hover, .logo-upload-area.drag-over { border-color: var(--accent); background: var(--accent-glow); }
.logo-upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.logo-upload-icon { font-size: 24px; margin-bottom: 6px; }
.logo-upload-text { font-size: 12px; color: var(--muted); line-height: 1.5; }
.logo-upload-text strong { color: var(--text); font-weight: 500; }
.logo-preview-row {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.logo-thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; flex-shrink: 0; }
.logo-info { flex: 1; min-width: 0; }
.logo-info .logo-name { font-size: 12px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-info .logo-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.logo-remove {
  background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px;
  cursor: pointer; font-size: 16px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s;
}
.logo-remove:hover { border-color: #f43f5e; color: #f43f5e; }
.logo-size-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.logo-size-row label { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.logo-size-row input[type=range] { flex: 1; }
.logo-size-row span { font-size: 12px; color: var(--text); min-width: 30px; text-align: right; }
.logo-bg-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.logo-bg-row label { font-size: 12px; color: var(--muted); }
#logo-preview-wrap { display: none; }

/* ── TOAST ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  /* Sits comfortably above the sticky mobile banner + extra breathing room (~2cm) */
  bottom: calc(var(--banner-sticky-h) + 80px);
  left: 50%;
  /* Hidden state: slide down out of view AND invisible */
  transform: translateX(-50%) translateY(200px);
  opacity: 0;
  background: var(--success); color: #000; padding: 14px 28px; border-radius: 100px;
  font-weight: 600; font-size: 14px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  z-index: 9500; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(52,211,153,0.3);
  white-space: nowrap;
  pointer-events: none;
}
/* Visible state: slide up into view, fully opaque */
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── iOS TIP ───────────────────────────────────────────────────── */
.ios-save-tip {
  display: none; margin-top: 8px; padding: 10px 14px;
  background: rgba(20,184,166,0.12); border: 1px solid rgba(20,184,166,0.3);
  border-radius: 8px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5;
}

/* ── FAQ SECTION (SEO) ─────────────────────────────────────────── */
/* ── EDITORIAL CONTENT BLOCK ───────────────────────────────────── */
.editorial-section {
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto; padding: 60px 20px 0;
}
.editorial-section h2 {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 28px;
  letter-spacing: -0.5px; margin-bottom: 20px; text-align: center;
}
.editorial-section p {
  font-size: 15px; line-height: 1.8; color: var(--muted);
  margin-bottom: 16px;
}
.editorial-section p:last-child { margin-bottom: 0; }

.faq-section {
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto; padding: 60px 20px 40px;
}
.faq-section h2 {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 28px;
  letter-spacing: -0.5px; margin-bottom: 32px; text-align: center;
}
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.faq-question {
  width: 100%; padding: 18px 20px; text-align: left; background: none; border: none;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-question::after { content: '+'; font-size: 20px; color: var(--accent); flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 20px 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }

/* ── FOOTER ────────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 20px; text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 16px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--muted); opacity: 0.6; }
.footer-seo-text { font-size: 12px; color: var(--muted); opacity: 0.4; max-width: 700px; margin: 12px auto 0; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - TABLET 900px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr 360px; }
  .banner-skyscraper { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  header { padding: 16px 20px; }
  .hero { padding: 40px 20px 30px; }
  .banner-leaderboard .banner-inner { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - PHONE 600px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  header { padding: 12px 16px; flex-wrap: wrap; gap: 4px; }
  .tagline { display: none; }
  .hero { padding: 28px 16px 20px; }
  .hero h1 { font-size: clamp(28px, 8vw, 42px); letter-spacing: -1px; }
  .hero p { font-size: 14px; }
  .hero-features { gap: 6px; }
  .hero-feature { font-size: 11px; padding: 3px 10px; }
  .app { padding: 12px 12px 80px; gap: 16px; }
  .panel-header { padding: 14px 16px; }
  .panel-title { font-size: 13px; }
  .type-tabs { padding: 14px 16px 0; gap: 6px; }
  .type-tab { padding: 8px 12px; font-size: 12px; }
  .form-area { padding: 16px; }
  .form-group { margin-bottom: 14px; }
  .form-group input, .form-group textarea, .form-group select {
    font-size: 16px !important; /* prevents iOS auto-zoom */
    padding: 12px 14px;
  }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .design-section { padding: 14px 16px; }
  .color-row, .gradient-row { gap: 10px; }
  .color-picker-wrap { padding: 10px 12px; }
  .color-picker-wrap input[type=color] { width: 36px; height: 36px; }
  .shape-grid { gap: 8px; grid-template-columns: repeat(5, 1fr); }
  .shape-opt { min-height: 64px; }
  .shape-opt svg { width: 32px; height: 32px; }
  .ec-row { gap: 6px; }
  .ec-btn { min-height: 48px; font-size: 13px; }
  .qr-display { padding: 20px 16px; }
  .qr-frame { padding: 14px; }
  .btn-area { padding: 0 16px 20px; gap: 8px; }
  .generate-btn { padding: 16px; font-size: 16px; }
  .download-btn { padding: 14px; font-size: 14px; }
  /* Hide leaderboard on very small screens - sticky banner takes that role */
  .banner-leaderboard { display: none; }
  /* Show banner between design and preview on mobile */
  .banner-rect { margin: 12px 0; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - SMALL PHONE 380px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .shape-label { display: none; }
  .type-tab { padding: 7px 10px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════
   DOWNLOAD DROPDOWN
   ═══════════════════════════════════════════════════════════════ */
.download-wrap {
  position: relative;
  width: 100%;
}

.download-main-btn {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--surface2); color: var(--text);
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  letter-spacing: 0.3px;
}
.download-main-btn:hover:not(:disabled) {
  background: rgba(20,184,166,0.12);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 20px var(--accent-glow);
  color: var(--accent);
}
.download-main-btn:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--border); }
.download-main-btn .chevron { margin-left: auto; transition: transform 0.25s; flex-shrink: 0; }
.download-main-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.download-main-btn[aria-expanded="true"] {
  background: rgba(20,184,166,0.12);
  color: var(--accent);
  border-color: var(--accent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* The dropdown panel */
.download-menu {
  display: none;
  position: absolute; bottom: 100%; left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  z-index: 500;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(20,184,166,0.1);
  animation: slideUp 0.2s ease;
}
.download-menu.open { display: block; }

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

.download-menu-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.download-option {
  width: 100%; padding: 11px 16px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 12px;
  text-align: left; font-family: 'DM Sans', sans-serif;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.download-option:last-child { border-bottom: none; }
.download-option:hover, .download-option:focus {
  background: rgba(20,184,166,0.08);
  outline: none;
}
.download-option:hover .fmt-name { color: var(--accent); }
.download-option:active { background: rgba(20,184,166,0.15); }

/* Format icon badge */
.fmt-icon {
  width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fmt-icon svg { width: 16px; height: 16px; }
.fmt-jpg  { background: rgba(251,191,36,0.15);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.fmt-png  { background: rgba(20,184,166,0.15); color: #14b8a6; border: 1px solid rgba(20,184,166,0.3); }
.fmt-svg  { background: rgba(52,211,153,0.15);  color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.fmt-eps  { background: rgba(251,113,133,0.15); color: #fb7185; border: 1px solid rgba(251,113,133,0.3); }
.fmt-pdf  { background: rgba(244,63,94,0.15); color: #f43f5e; border: 1px solid rgba(244,63,94,0.3); }

.fmt-name {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.5px; min-width: 38px; transition: color 0.15s;
}
.fmt-desc { font-size: 12px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── POST-DOWNLOAD OFFER MODAL ────────────────────────────────────────
   Replaced the Ko-fi card 2026-08-16. The offer cards themselves come from
   the ad engine, so only the shell is styled here. */
.qrs-offer {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.qrs-offer.show { display: flex; animation: fadeIn 0.25s ease; }
.qrs-offer-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,5,8,0.72);
  backdrop-filter: blur(3px);
}
.qrs-offer-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px 20px 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  max-height: 88vh; overflow-y: auto;
}
.qrs-offer-x {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.qrs-offer-x:hover { color: var(--text); border-color: #39414f; }
.qrs-offer-tick {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow); border: 1px solid rgba(204,255,51,0.35);
  margin-bottom: 10px; color: var(--accent);
}
.qrs-offer-tick svg { width: 17px; height: 17px; display: block; }
.qrs-offer-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 19px;
  color: var(--text); margin: 0 0 3px;
}
.qrs-offer-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
/* The engine's creatives are full-width flex cards; give them a gap and let
   them size themselves rather than imposing a height they were not built for. */
.qrs-offer-body > * { margin-bottom: 9px; display: block; }
.qrs-offer-body > *:last-child { margin-bottom: 0; }
/* ad-engine.php wraps every code ad in an inline style="width:100%;height:100%",
   which is right for a fixed-size banner slot and very wrong here: height:100%
   resolves against the panel, so each card grew to fill it and the modal became
   a full-screen scroller with one offer floating at the top. Inline styles only
   lose to !important, hence the shouting. */
.qrs-offer-body [data-qs-ad-id] { height: auto !important; width: 100% !important; }
.qrs-offer-dismiss {
  display: block; width: 100%; margin-top: 8px; padding: 9px;
  background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: 12.5px; text-decoration: underline;
  cursor: pointer;
}
.qrs-offer-dismiss:hover { color: var(--text); }
@media (max-width: 520px) {
  .qrs-offer { padding: 12px; }
  .qrs-offer-panel { max-height: 92vh; }
}

/* A paragraph after a bullet list had no top margin (the * reset clears it and
   nothing puts it back), so it sat flush against the last bullet and read as
   part of it. */
main ul + p, article ul + p { margin-top: 16px; }

/* The aside was sized to its own content under align-items:start, leaving the
   sticky inner only 24px of travel - so position:sticky was declared but dead
   and the banner scrolled away. Stretching it to the grid row gives the inner
   the room to stay on screen for the whole scroll. */
.banner-skyscraper { align-self: stretch; }
