/* ==========================================================================
   QRSpot - Modern QR Code Studio
   Design System & Master Stylesheet
   Fully Mobile Responsive & Touch Optimized
   ========================================================================== */

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

:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  /* Light Theme Colors */
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
                 radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.06) 0px, transparent 50%);
  --card: #ffffff;
  --card-elevated: #ffffff;
  --card-hover: #f8fafc;
  --tx: #0f172a;
  --tx-sec: #334155;
  --mu: #64748b;
  --mu-light: #94a3b8;
  --bd: #e2e8f0;
  --bd-light: #f1f5f9;
  --bd-focus: #6366f1;

  --ac: #4f46e5;
  --ach: #4338ca;
  --ac-glow: rgba(79, 70, 229, 0.18);
  --soft: #eef2ff;
  --soft-hover: #e0e7ff;

  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 10px 24px -5px rgba(15, 23, 42, 0.04);
  --sh-lg: 0 20px 35px -5px rgba(15, 23, 42, 0.08), 0 8px 16px -6px rgba(15, 23, 42, 0.04);
  --sh-glow: 0 0 24px rgba(79, 70, 229, 0.2);

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Variables */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090d16;
    --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.08) 0px, transparent 50%);
    --card: #111726;
    --card-elevated: #161e31;
    --card-hover: #1b243a;
    --tx: #f8fafc;
    --tx-sec: #cbd5e1;
    --mu: #94a3b8;
    --mu-light: #64748b;
    --bd: #1e293b;
    --bd-light: #162032;
    --bd-focus: #818cf8;

    --ac: #6366f1;
    --ach: #818cf8;
    --ac-glow: rgba(99, 102, 241, 0.3);
    --soft: #1a2238;
    --soft-hover: #222d4a;

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);

    --sh-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --sh: 0 8px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
    --sh-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --sh-glow: 0 0 30px rgba(99, 102, 241, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #090d16;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
                 radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.08) 0px, transparent 50%);
  --card: #111726;
  --card-elevated: #161e31;
  --card-hover: #1b243a;
  --tx: #f8fafc;
  --tx-sec: #cbd5e1;
  --mu: #94a3b8;
  --mu-light: #64748b;
  --bd: #1e293b;
  --bd-light: #162032;
  --bd-focus: #818cf8;

  --ac: #6366f1;
  --ach: #818cf8;
  --ac-glow: rgba(99, 102, 241, 0.3);
  --soft: #1a2238;
  --soft-hover: #222d4a;

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);

  --sh-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --sh: 0 8px 20px -2px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --sh-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --sh-glow: 0 0 30px rgba(99, 102, 241, 0.35);
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
                 radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.06) 0px, transparent 50%);
  --card: #ffffff;
  --card-elevated: #ffffff;
  --card-hover: #f8fafc;
  --tx: #0f172a;
  --tx-sec: #334155;
  --mu: #64748b;
  --mu-light: #94a3b8;
  --bd: #e2e8f0;
  --bd-light: #f1f5f9;
  --bd-focus: #4f46e5;
  --ac: #4f46e5;
  --ach: #4338ca;
  --ac-glow: rgba(79, 70, 229, 0.18);
  --soft: #eef2ff;
  --soft-hover: #e0e7ff;
  --sh: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 10px 24px -5px rgba(15, 23, 42, 0.04);
  --sh-lg: 0 20px 35px -5px rgba(15, 23, 42, 0.08), 0 8px 16px -6px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
  box-sizing: inherit;
}

/* Ensure the hidden attribute always wins over display rules */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--tx);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img, svg {
  vertical-align: middle;
}

.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Responsive visibility helpers */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: flex !important;
}

@media (max-width: 820px) {
  .mobile-only {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bd);
  transition: background-color 0.3s, border-color 0.3s;
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--tx);
  user-select: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--ac), #0ea5e9);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px var(--ac-glow);
}

.brand span {
  color: var(--ac);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--soft);
  color: var(--ac);
  border-radius: var(--radius-full);
}

nav {
  display: none;
  align-items: center;
  gap: 26px;
  color: var(--tx-sec);
  font-size: 14px;
  font-weight: 500;
}

nav a {
  position: relative;
  padding: 6px 0;
}

nav a:hover {
  color: var(--tx);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 821px) {
  nav {
    display: flex;
  }
}

/* Mobile Navigation Drawer */
.mobile-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--card) 95%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bd);
  box-shadow: var(--sh-lg);
  z-index: 55;
  padding: 16px 0 24px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--tx-sec);
  transition: var(--transition);
}

.mobile-nav-link svg {
  color: var(--ac);
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: var(--soft);
  color: var(--ac);
}

.mobile-drawer-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   Buttons & Micro-interactions
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--bd);
  background: var(--card);
  color: var(--tx);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
  min-height: 40px;
  touch-action: manipulation;
}

.btn:hover {
  border-color: var(--ac);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.p {
  background: var(--ac);
  border-color: var(--ac);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--ac-glow);
}

.btn.p:hover {
  background: var(--ach);
  border-color: var(--ach);
  box-shadow: 0 6px 20px var(--ac-glow);
  transform: translateY(-1.5px);
}

.btn.subtle {
  background: transparent;
  border-color: transparent;
  color: var(--tx-sec);
}

.btn.subtle:hover {
  background: var(--soft);
  color: var(--ac);
}

.btn.sm {
  padding: 6px 12px;
  font-size: 13px;
  min-height: 36px;
  border-radius: var(--radius-sm);
}

.btn.lg {
  padding: 13px 22px;
  font-size: 15px;
  min-height: 46px;
  border-radius: var(--radius-md);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bd);
  background: var(--card);
  color: var(--tx-sec);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}

.icon-btn:hover {
  border-color: var(--ac);
  color: var(--tx);
  background: var(--card-hover);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  text-align: center;
  padding: 48px 0 28px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid color-mix(in srgb, var(--ac) 25%, transparent);
  color: var(--ac);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
  transition: var(--transition);
}

.hero-pill:hover {
  border-color: var(--ac);
  box-shadow: 0 0 16px var(--ac-glow);
}

.hero h1 {
  font-size: clamp(28px, 6vw, 54px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 auto 16px;
  max-width: 820px;
  color: var(--tx);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--ac) 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--mu);
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 24px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 24px;
  color: var(--mu);
  font-size: 13px;
  font-weight: 500;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg {
  color: var(--success);
}

/* ==========================================================================
   Quick Preset Styles Bar
   ========================================================================== */

.preset-bar-card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 22px;
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .preset-bar-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.preset-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--tx);
  white-space: nowrap;
}

.preset-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.preset-list::-webkit-scrollbar {
  display: none;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bd);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-sec);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  touch-action: manipulation;
}

.preset-chip:hover,
.preset-chip:active {
  border-color: var(--ac);
  background: var(--soft);
  color: var(--ac);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(148, 163, 184, 0.55);
}

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

/* Prevent wide children (tabs, preset rows) from blowing out grid columns */
.grid > * {
  min-width: 0;
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  }
  .stick {
    position: sticky;
    top: 84px;
  }
  .stick .card {
    margin-bottom: 0;
  }
}

/* ==========================================================================
   Cards & Panels
   ========================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--sh);
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: color-mix(in srgb, var(--bd) 75%, var(--ac));
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--tx);
  letter-spacing: -0.01em;
}

.card-title svg {
  color: var(--ac);
  flex-shrink: 0;
}

/* ==========================================================================
   Type Tabs
   ========================================================================== */

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

@media (min-width: 980px) {
  .tabs {
    flex-wrap: wrap;
    overflow: visible;
    scroll-snap-type: none;
  }
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid var(--bd);
  background: var(--card);
  color: var(--mu);
  padding: 9px 14px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  scroll-snap-align: start;
  flex-shrink: 0;
  min-height: 40px;
  touch-action: manipulation;
}

.tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tab:hover {
  color: var(--tx);
  border-color: var(--ac);
  background: var(--card-hover);
}

.tab.on {
  background: var(--soft);
  color: var(--ac);
  border-color: var(--ac);
  box-shadow: 0 2px 8px var(--ac-glow);
}

/* ==========================================================================
   Form Controls & Inputs
   ========================================================================== */

.field-group {
  margin-bottom: 15px;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--tx-sec);
}

.label-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--mu);
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--bd);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--tx);
  font-family: inherit;
  font-size: 14.5px;
  min-height: 44px;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--bd-focus);
  box-shadow: 0 0 0 3px var(--ac-glow);
  background: var(--card);
}

input.bad,
textarea.bad,
select.bad {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px var(--danger-soft) !important;
}

.err {
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  min-height: 16px;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Prevent unwanted zoom on iOS Safari */
@media (max-width: 768px) {
  input[type="text"],
  input[type="url"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Color inputs */
.color-picker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--bd);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  min-height: 44px;
}

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
}

.color-hex {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--tx);
  text-transform: uppercase;
}

/* Range input */
input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bd);
  accent-color: var(--ac);
  cursor: pointer;
  outline: none;
  margin: 10px 0 4px;
}

.range-marks {
  display: flex;
  justify-content: space-between;
  color: var(--mu);
  font-size: 11.5px;
}

/* Checkbox & Switch */
.chk {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  margin: 12px 0;
  color: var(--tx);
  min-height: 32px;
}

.chk input {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  accent-color: var(--ac);
  cursor: pointer;
  flex-shrink: 0;
}

/* Segmented Control - Wrap enabled for Mobile */
.seg {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--bd);
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.seg button {
  flex: 1 1 auto;
  min-width: 68px;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--mu);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-align: center;
  touch-action: manipulation;
}

.seg button:hover {
  color: var(--tx);
}

.seg button.on {
  background: var(--card);
  color: var(--ac);
  box-shadow: var(--sh-sm);
}

/* ==========================================================================
   Logo & Dropzone
   ========================================================================== */

.drop {
  border: 2px dashed var(--bd);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  color: var(--mu);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  background: var(--bg);
  touch-action: manipulation;
}

.drop svg {
  margin-bottom: 8px;
  color: var(--ac);
}

.drop.over,
.drop:hover {
  border-color: var(--ac);
  background: var(--soft);
  color: var(--tx);
}

.bar {
  height: 5px;
  background: var(--bd);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
  display: none;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ac), #0ea5e9);
  transition: width 0.15s;
}

.logo-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--bd);
  border-radius: var(--radius-md);
  background: var(--bg);
  margin-top: 12px;
}

.logo-thumb-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-thumb-wrapper img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--bd);
  padding: 4px;
}

.logo-meta b {
  display: block;
  font-size: 13.5px;
  color: var(--tx);
}

.logo-meta small {
  color: var(--mu);
  font-size: 12px;
}

/* Preset Logo Icons */
.preset-icons-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--mu);
  margin: 14px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preset-icons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.preset-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bd);
  background: var(--bg);
  color: var(--tx);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}

.preset-icon-btn:hover,
.preset-icon-btn:active {
  border-color: var(--ac);
  background: var(--soft);
  color: var(--ac);
}

/* ==========================================================================
   Live QR Preview Card
   ========================================================================== */

.pv {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.pv-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-soft);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.qrbox {
  width: 100%;
  max-width: min(300px, calc(100vh - 340px));
  min-width: 220px;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--bd);
  background: #ffffff;
  display: grid;
  place-items: center;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--sh);
  padding: 16px;
  position: relative;
  margin-inline: auto;
}

.qrbox svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qrbox .ph {
  color: var(--mu);
  padding: 24px;
  font-size: 14px;
  text-align: center;
}

.contrast-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-top: 14px;
  background: var(--soft);
  color: var(--ac);
  border: 1px solid color-mix(in srgb, var(--ac) 20%, transparent);
}

.contrast-pill.warning {
  background: var(--warning-soft);
  color: #92400e;
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}

.contrast-pill.danger {
  background: var(--danger-soft);
  color: #b91c1c;
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

/* Preview View Mode Tabs (Vector vs Real-Life Mockup) */
.pv-view-tabs {
  display: flex;
  background: var(--bg-sec);
  border: 1px solid var(--bd);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
  margin-bottom: 14px;
  width: 100%;
}

.pv-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: calc(var(--radius-md) - 2px);
  border: none;
  background: transparent;
  color: var(--tx-sec);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pv-tab:hover {
  color: var(--tx);
}

.pv-tab.on {
  background: var(--surface);
  color: var(--tx);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Real-Life Mockup Container & Stage */
.mockup-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mockup-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
}

.mockup-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--bd);
  background: var(--surface);
  color: var(--tx-sec);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mockup-chip:hover {
  border-color: var(--bd-focus);
  color: var(--tx);
}

.mockup-chip.on {
  background: var(--soft);
  color: var(--ac);
  border-color: var(--ac);
}

.mockup-stage {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--bd);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh);
  transition: background 0.3s ease;
}

/* Mockup Scene: Cafe Table Stand */
.mockup-stage[data-scene="stand"] {
  background: radial-gradient(circle at 50% 30%, #3e2723, #1a0f0d);
}

.mockup-stand-card {
  width: 180px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: perspective(600px) rotateX(7deg) rotateY(-3deg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
}

.mockup-stand-header {
  font-size: 11px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mockup-stand-qr {
  width: 130px;
  height: 130px;
}

.mockup-stand-qr svg {
  width: 100%;
  height: 100%;
}

.mockup-stand-base {
  position: absolute;
  bottom: -10px;
  width: 196px;
  height: 12px;
  background: linear-gradient(90deg, #b48c58, #ecd4b4, #946c38);
  border-radius: 4px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.65);
}

/* Mockup Scene: Business Card */
.mockup-stage[data-scene="card"] {
  background: radial-gradient(circle at 50% 50%, #1e293b, #090d16);
}

.mockup-biz-card {
  width: 245px;
  height: 145px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: perspective(700px) rotateX(10deg) rotateY(-12deg) rotateZ(2deg);
  color: #ffffff;
}

.mockup-biz-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 110px;
}

.mockup-biz-name {
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
}

.mockup-biz-role {
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
}

.mockup-biz-scan {
  font-size: 9px;
  color: var(--ac);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 10px;
}

.mockup-biz-qr {
  width: 90px;
  height: 90px;
  background: #ffffff;
  padding: 4px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.mockup-biz-qr svg {
  width: 100%;
  height: 100%;
}

/* Mockup Scene: Smartphone Screen */
.mockup-stage[data-scene="phone"] {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
}

.mockup-phone-frame {
  width: 170px;
  height: 250px;
  background: #090d16;
  border-radius: 26px;
  border: 4px solid #1e293b;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  position: relative;
  overflow: hidden;
}

.mockup-phone-notch {
  width: 50px;
  height: 12px;
  background: #000000;
  border-radius: 0 0 8px 8px;
  margin-bottom: 12px;
}

.mockup-scanner-box {
  width: 124px;
  height: 124px;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  position: relative;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px;
  overflow: hidden;
}

.mockup-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: laserScan 2s infinite ease-in-out alternate;
}

@keyframes laserScan {
  0% { top: 6px; }
  100% { top: calc(100% - 8px); }
}

.mockup-scanner-qr {
  width: 100%;
  height: 100%;
}

.mockup-scanner-qr svg {
  width: 100%;
  height: 100%;
}

.mockup-phone-hint {
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 600;
  margin-top: 14px;
  letter-spacing: 0.3px;
}

/* Mockup Scene: Round Kraft Sticker */
.mockup-stage[data-scene="sticker"] {
  background: linear-gradient(145deg, #d7ccc8, #8d6e63);
}

.mockup-sticker-card {
  width: 175px;
  height: 175px;
  background: #ffffff;
  border-radius: 50%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 3px dashed #cbd5e1;
  position: relative;
  transform: rotate(-3deg);
}

.mockup-sticker-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #334155;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mockup-sticker-qr {
  width: 110px;
  height: 110px;
}

.mockup-sticker-qr svg {
  width: 100%;
  height: 100%;
}

/* Downloads Matrix */
.dls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 18px;
}

.dls .btn {
  flex-direction: column;
  gap: 2px;
  padding: 10px 4px;
  font-size: 13px;
  min-height: 48px;
}

.dls small {
  font-weight: 500;
  color: var(--mu);
  font-size: 10.5px;
}

.dls .btn.p small {
  color: #e0e7ff;
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.pv-tools {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.pv-tools select {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
}

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

.pv .dls {
  margin-top: 14px;
}

.pv-header {
  gap: 10px;
  flex-wrap: wrap;
}

.pv-header .contrast-pill {
  margin-top: 0;
}

.pv .dls .btn {
  min-height: 44px;
  padding: 6px 4px;
}

/* In the preview, the tip only appears for low-contrast warnings */
.pv .tip-banner:not(.warning) {
  display: none;
}

.tip-banner {
  background: var(--soft);
  color: var(--tx-sec);
  border: 1px solid color-mix(in srgb, var(--ac) 15%, transparent);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 16px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tip-banner svg {
  flex-shrink: 0;
  color: var(--ac);
  margin-top: 2px;
}

.tip-banner.warning {
  background: var(--warning-soft);
  color: #78350f;
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}

.tip-banner.warning svg {
  color: #b45309;
}

/* Floating Bottom Action Bar on Mobile */
.mobile-floating-bar {
  display: none;
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  right: 14px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bd);
  border-radius: var(--radius-full);
  box-shadow: var(--sh-lg);
  padding: 7px 14px 7px 8px;
  z-index: 45;
  align-items: center;
  justify-content: space-between;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.floating-preview-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floating-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--bd);
  overflow: hidden;
  padding: 2px;
  display: grid;
  place-items: center;
}

.floating-thumb svg {
  width: 100%;
  height: 100%;
}

.floating-text b {
  display: block;
  font-size: 13px;
  color: var(--tx);
  line-height: 1.2;
}

.floating-text small {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}

/* ==========================================================================
   Recent QR Codes (History)
   ========================================================================== */

.recent-section {
  padding-top: 20px;
}

.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.recent {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.rc {
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--card);
  transition: var(--transition);
}

.rc:hover {
  transform: translateY(-2px);
  border-color: var(--ac);
  box-shadow: var(--sh);
}

.rc .th {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--bd);
  cursor: pointer;
  background: #ffffff;
  padding: 8px;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.rc .th svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rc b {
  display: block;
  font-size: 13.5px;
  margin-top: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tx);
}

.rc small {
  color: var(--mu);
  font-size: 11.5px;
}

.rc .ra {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.rc .ra .btn {
  flex: 1;
  padding: 6px 4px;
  font-size: 12px;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

section {
  padding: 60px 0;
}

.section-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ac);
  background: var(--soft);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

section h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--tx);
}

.section-desc {
  text-align: center;
  color: var(--mu);
  font-size: 15.5px;
  max-width: 580px;
  margin: 0 auto 36px;
}

.feat {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feat-card {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-xl);
  padding: 26px;
  transition: var(--transition);
}

.feat-card:hover {
  transform: translateY(-3px);
  border-color: var(--ac);
  box-shadow: var(--sh-lg);
}

.feat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--soft);
  color: var(--ac);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  transition: var(--transition);
}

.feat-card:hover .feat-icon {
  background: var(--ac);
  color: #ffffff;
  transform: scale(1.06);
}

.feat-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--tx);
}

.feat-card p {
  color: var(--mu);
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ==========================================================================
   How It Works
   ========================================================================== */

.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  position: relative;
}

.step-card {
  text-align: center;
  padding: 26px 20px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-xl);
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--ac);
  transform: translateY(-2px);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ac), #0ea5e9);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px var(--ac-glow);
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--tx);
}

.step-card p {
  color: var(--mu);
  margin: 0;
  font-size: 14.5px;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-list {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

details {
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: var(--transition);
}

details[open] {
  border-color: var(--ac);
  box-shadow: var(--sh-sm);
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: var(--tx);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  touch-action: manipulation;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--mu);
  transition: transform 0.2s;
}

details[open] summary::after {
  content: '−';
  color: var(--ac);
}

details p {
  color: var(--mu);
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ==========================================================================
   QR Scanner Modal / Drawer
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 500px;
  background: var(--card);
  border: 1px solid var(--bd);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--sh-lg);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-backdrop.open .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 800;
}

.scan-result-box {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  border-top: 1px solid var(--bd);
  padding: 44px 0 28px;
  background: var(--card);
  color: var(--mu);
  font-size: 14px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
}

.footer-brand p {
  max-width: 340px;
  margin: 10px 0 0;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}

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

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--bd);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

#toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.toast.e {
  background: #dc2626;
}

.toast.s {
  background: #059669;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   Media Queries & Mobile Refinements
   ========================================================================== */

@media (max-width: 979px) {
  .mobile-floating-bar {
    display: flex;
  }
  body {
    padding-bottom: 74px; /* Space for sticky floating bar */
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-inline: 14px;
  }

  .badge-tag {
    display: none;
  }

  .hero {
    padding: 32px 0 18px;
  }

  .hero h1 {
    font-size: clamp(26px, 7.5vw, 36px);
  }

  .hero p {
    font-size: 14.5px;
    margin-bottom: 20px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .trust-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .card {
    padding: 16px 14px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
  }

  .qrbox {
    max-width: 290px;
    padding: 12px;
  }

  .row2, .row3 {
    grid-template-columns: 1fr;
  }

  .dls {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .dls .btn {
    min-height: 50px;
    padding: 8px 6px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .header-actions .btn.p span {
    display: none;
  }

  .actions-row {
    grid-template-columns: 1fr;
  }

  .preset-icon-btn {
    width: 38px;
    height: 38px;
  }
}

/* ==========================================================================
   Accessibility & Reduced Motion
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--bd-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
