:root {
  --brand: #7c3aed;
  --brand-dark: #4f46e5;
  --brand-light: #f0ebfd;
  --ink: #1e1b2e;
  --muted: #6b6478;
  --bg: #faf9fc;
  --card: #ffffff;
  --border: #ece9f3;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(76, 29, 149, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 252, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  color: white;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(124, 58, 237, 0.45); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #f3f1f9; }
.btn-block { width: 100%; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-success { background: #dcfce7; color: #15803d; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-xl { padding: 22px 48px; font-size: 1.35rem; font-weight: 800; box-shadow: 0 20px 40px -14px rgba(30, 27, 46, 0.4); }
.final-cta {
  text-align: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #6d28d9 100%);
  border-radius: 24px;
  padding: 64px 24px;
  color: #fff;
}
.final-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.final-cta h2 { font-size: 2.1rem; letter-spacing: -0.02em; margin-bottom: 12px; color: #fff; }
.final-cta p { color: rgba(255, 255, 255, 0.75); font-size: 1.05rem; max-width: 480px; margin: 0 auto 28px; }
.final-cta .btn-xl { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-phone-photo {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 28px 56px -18px rgba(30, 27, 46, 0.4);
  justify-self: center;
}
.hero-tagline {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 14px;
  text-align: center;
}
.hero-tagline-accent { color: var(--brand); }
.hero h1 {
  font-size: 3.1rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 0 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ---------- Live demo section ---------- */
.demo-section { background: var(--brand-light); border-radius: 24px; padding: 56px 24px; }
.demo-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}
.demo-qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.demo-qr-illustration { width: 100%; max-width: 340px; display: block; }
.qr-scan-hint {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  font-size: 1.17rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 21px;
  border-radius: 999px;
}

/* Countertop QR stand mockup — real product photo */
/* phone mockup */
.phone {
  justify-self: center;
  width: 260px;
  border-radius: 34px;
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  padding: 14px;
  box-shadow: 0 30px 60px rgba(76, 29, 149, 0.28);
}
.phone-screen {
  background: white;
  border-radius: 24px;
  padding: 28px 18px;
  text-align: center;
  min-height: 420px;
}
.phone-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.phone-name { font-weight: 700; margin-bottom: 2px; }
.phone-bio { font-size: 0.78rem; color: var(--muted); margin-bottom: 18px; }
.phone-link {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.phone-offers { margin-bottom: 10px; }
.phone-offer {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.phone-action-btn {
  background: var(--brand-light);
  color: var(--brand);
  border-radius: 12px;
  padding: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---------- Features ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 44px; }
.section-head h2 { font-size: 2.1rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 12px;
  opacity: 1;
}
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

.feature-card-photo { padding: 0; overflow: hidden; }
.feature-photo { width: 100%; display: block; margin-bottom: 16px; }
.feature-card-photo h3, .feature-card-photo p { padding: 0 22px; }
.feature-card-photo p { padding-bottom: 22px; }

.use-case-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}
.use-case-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.use-case-category h4 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.use-case-category ul { list-style: none; margin: 0; padding: 0; }
.use-case-category li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.9;
}

.steps-showcase {
  display: flex;
  gap: 56px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}
.step-row { display: flex; gap: 16px; align-items: flex-start; text-align: left; }
.step-num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--brand), var(--brand-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step-row h3 { margin: 0 0 6px; font-size: 1rem; }
.step-row p { margin: 0; color: var(--muted); font-size: 0.9rem; }

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 22px;
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--brand); }

/* ---------- Modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 46, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
  position: relative;
}
.modal h2 { margin: 0 0 6px; font-size: 1.4rem; }
.modal .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.error-msg {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: none;
}
.error-msg.show { display: block; }
.switch-link { text-align: center; margin-top: 16px; font-size: 0.88rem; color: var(--muted); }
.switch-link button { background: none; border: none; color: var(--brand); font-weight: 600; font-size: inherit; padding: 0; }

/* ---------- Dashboard ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 24px;
  overflow-y: auto;
}
.main-panel { flex: 1; padding: 32px 40px; max-width: 720px; }
.preview-panel {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dash-header h1 { font-size: 1.3rem; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 14px; font-size: 1rem; }

.logo-upload { display: flex; align-items: center; gap: 14px; }
.logo-preview {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-upload-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.logo-upload-actions label.btn { cursor: pointer; }

.theme-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.theme-swatch:hover { transform: scale(1.08); }
.theme-swatch.active { box-shadow: 0 0 0 2px white, 0 0 0 4px var(--brand); }
.theme-swatch-custom {
  position: relative;
  display: flex;
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
  overflow: hidden;
}
.theme-swatch-custom input[type="color"] {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: grab;
}
.link-row.dragging { opacity: 0.4; }

.admin-shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.admin-shop-row-name { font-weight: 700; }
.admin-shop-row-username { color: var(--muted); font-size: 0.82rem; margin-left: 6px; }
.admin-shop-row-date { flex: 0 0 auto; color: var(--muted); font-size: 0.8rem; margin-left: auto; }
.link-row .handle { color: var(--muted); font-size: 18px; }
.link-row .info { flex: 1; min-width: 0; }
.link-row .info .title { font-weight: 600; font-size: 0.92rem; }
.link-row .info .url { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-row .group-tag {
  font-size: 0.72rem;
  background: var(--brand-light);
  color: var(--brand);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.link-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--muted);
}
.icon-btn:hover { background: #f3f1f9; }

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f6f4fb;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  margin: 0 6px 6px 0;
}
.group-chip button { background: none; border: none; color: var(--muted); font-size: 13px; }

.empty-state { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Analytics ---------- */
.analytics-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-box {
  background: #f6f4fb;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.stat-value { font-size: 1.4rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.analytics-chart { margin-bottom: 14px; }

.analytics-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.analytics-link-title {
  flex: 0 0 140px;
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analytics-link-bar-track { flex: 1; height: 8px; background: #f0ebfd; border-radius: 999px; overflow: hidden; }
.analytics-link-bar { height: 100%; background: var(--brand); border-radius: 999px; }
.analytics-link-count { flex: 0 0 28px; text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--muted); }

@media (max-width: 480px) {
  .analytics-stats { grid-template-columns: 1fr; }
  .analytics-link-title { flex-basis: 90px; }
}

.public-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f6f4fb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
}

/* preview mimic (reuses phone) */
.preview-panel .phone { width: 260px; margin-bottom: 14px; }

.qr-box {
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-box canvas {
  border-radius: 8px;
  max-width: 100%;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
.qr-type-tabs {
  display: flex;
  width: 100%;
  background: var(--brand-light);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.qr-type-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 6px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.qr-type-tab.active {
  background: var(--brand);
  color: white;
}
.qr-type-tab[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.qr-type-note {
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 10px;
  min-height: 1em;
}
.qr-download-note {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}

/* ---------- Public profile page (iOS Settings-style dark) ---------- */
.public-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 60px 20px;
  background: #1e293b;
}
.public-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.public-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  color: #1c1c1e;
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 26px rgba(0,0,0,0.4);
}
.public-name { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; color: #fff; }
.public-bio { color: rgba(255,255,255,0.55); font-size: 0.95rem; margin-bottom: 30px; white-space: pre-wrap; }
.public-group-label {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 22px 0 8px;
  text-align: left;
}
.public-link-group-panel {
  background: #1c1c1e;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 4px;
}
.public-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 13px 16px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  animation: publicFadeIn 0.45s ease forwards;
  transition: background 0.15s ease;
}
.public-link:last-child { border-bottom: none; }
.public-link:hover { background: rgba(255,255,255,0.04); }
.public-link:active { background: rgba(255,255,255,0.08); }
button.public-link { width: 100%; background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.08); font: inherit; cursor: pointer; }
button.public-link:last-child { border-bottom: none; }
.public-link-icon {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: #fff;
}
.public-link-label { flex: 1; min-width: 0; }
.public-link-chevron { flex: 0 0 auto; display: flex; color: rgba(255,255,255,0.25); }
.public-empty-links { color: rgba(255,255,255,0.4); padding: 20px 0; }
.public-fade-in { opacity: 0; animation: publicFadeIn 0.45s ease forwards; }
@keyframes publicFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.public-actions { margin-top: 26px; display: flex; flex-direction: row; gap: 12px; }
.public-share-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.public-share-btn:hover { background: rgba(255,255,255,0.14); }
.public-powered-by {
  margin-top: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.public-powered-by a { color: rgba(255,255,255,0.6); font-weight: 400; text-decoration: none; }
.not-found { color: #fff; text-align: center; padding-top: 100px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .phone { justify-self: start; }
  .hero-phone-photo { justify-self: start; max-width: 320px; }
  .app-shell { flex-direction: column; }
  .sidebar, .preview-panel { width: 100%; border: none; border-bottom: 1px solid var(--border); }
  .main-panel { max-width: 100%; padding: 24px; }
  #adminShopsGrid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .logo { font-size: 1.25rem; gap: 8px; }
  .logo-mark { width: 32px; height: 32px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { padding: 8px 14px; font-size: 0.82rem; white-space: nowrap; }
}

/* ---------- Store (store.html) ---------- */
.store-design-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.store-design-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.store-design-thumb {
  aspect-ratio: 2 / 3;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-design-thumb-loading { color: var(--muted); font-size: 0.78rem; text-align: center; padding: 10px; }
.store-design-name { font-weight: 700; font-size: 0.88rem; margin-top: 8px; }
.store-design-desc { color: var(--muted); font-size: 0.76rem; line-height: 1.4; margin-top: 4px; }
.store-design-action { margin-top: auto; padding-top: 8px; }
.store-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(76, 29, 149, 0.08);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  font-weight: 700;
}
.store-design-thumb { cursor: pointer; }
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 46, 0.65);
}
.preview-modal-content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: var(--shadow);
}
.preview-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  z-index: 2;
}
#previewModalBody { margin-top: 20px; }
#previewModalBody img, #previewModalBody canvas {
  width: 100%;
  border-radius: 8px;
  display: block;
}
#previewModalBody .empty-state { padding: 40px 10px; }

@media (max-width: 640px) {
  .store-design-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Link type filter + grid (index.html) ---------- */
.link-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.link-filter-tab {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.link-filter-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.link-filter-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.link-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.link-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.link-type-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.link-type-card.hidden { display: none; }
.link-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--icon-bg, var(--brand-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.link-type-icon img { width: 22px; height: 22px; display: block; }
.link-type-info h4 { margin: 0 0 2px; font-size: 0.95rem; }
.link-type-info span { font-size: 0.78rem; color: var(--muted); }
