:root {
  --ink: #1c1730;
  --muted: #625d72;
  --bg: #f5f0ff;
  --card: rgba(255, 255, 255, 0.9);
  --primary: #5e3bc4;
  --primary-text: #ffffff;
  --border: rgba(53, 36, 100, 0.14);
  --shadow: 0 12px 30px rgba(48, 25, 110, 0.13);
  --page-bg:
    radial-gradient(circle at 8% 10%, rgba(144, 106, 255, 0.35) 0 90px, transparent 91px),
    radial-gradient(circle at 93% 73%, rgba(255, 174, 97, 0.32) 0 70px, transparent 71px),
    linear-gradient(145deg, #ede5ff, #fff8ef 55%, #e7f7f0);
  --portrait-bg: linear-gradient(145deg, #5432b7, #9a71f9);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
}

.profile-page {
  width: min(100%, 400px);
  position: relative;
  padding: 18px 18px 24px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.47);
  box-shadow: 0 20px 60px rgba(45, 25, 90, 0.18);
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-button, .icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  text-decoration: none;
  display: grid;
  place-items: center;
}

.portrait {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 4px auto 13px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: white;
  background: var(--portrait-bg);
  box-shadow: 0 8px 20px rgba(73, 45, 160, 0.25);
  font-size: 31px;
  font-weight: 700;
  overflow: hidden;
}

.portrait img { width: 100%; height: 100%; object-fit: cover; }

h1 { margin: 0; font-size: 25px; }

.bio {
  max-width: 290px;
  margin: 9px auto 17px;
  color: var(--muted);
  line-height: 1.45;
}

.save-contact { display: block; margin: 6px 0 18px; }

.links { display: grid; gap: 12px; }

.link-button {
  min-height: 57px;
  display: grid;
  grid-template-columns: 34px 1fr 28px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 17px;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(48, 25, 110, 0.18);
  border-color: var(--primary);
}

.link-button > span:first-child {
  color: var(--primary);
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-icon svg {
  width: 19px;
  height: 19px;
}

.link-label { font-weight: 650; }
.dots { font-size: 20px; opacity: .72; }

.featured {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 12px;
  margin: 19px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.63);
  text-align: left;
  text-decoration: none;
}

.featured-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 27px;
  background: #ffffff;
  overflow: hidden;
}

.featured-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.featured strong { display: block; line-height: 1.35; }
.featured p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.35; }

.mini-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.mini-brand img { width: 18px; height: 18px; object-fit: contain; }
.mini-brand strong { color: var(--ink); }

/* App chrome: forms, dashboard, marketing page */

.card-shell { width: min(100%, 420px); }

.landing {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.landing-brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.landing-brand img { width: 34px; height: 34px; object-fit: contain; }
.landing-brand span { font-size: 20px; font-weight: 700; color: var(--ink); }

.landing-pitch h2 { font-size: 20px; margin: 0 0 6px; }
.landing-pitch p { margin: 0 0 10px; }

.pitch-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  text-align: left;
}

.pitch-features li {
  position: relative;
  padding: 10px 12px 10px 34px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.pitch-features li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 760px) {
  .landing { grid-template-columns: 1fr; }
}

.landing-footer {
  grid-column: 1 / -1;
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.landing-footer p { margin: 0 0 4px; }
.landing-footer a { color: var(--muted); text-decoration: underline; }

.dashboard-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.dashboard-footer a { color: var(--muted); text-decoration: underline; }

.legal-shell { width: min(100%, 680px); }

.legal-card { text-align: left; }
.legal-card p { line-height: 1.55; }
.legal-card h2 { font-size: 16px; margin: 22px 0 6px; }
.legal-card h2:first-of-type { margin-top: 18px; }

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.fine-print {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.app-card {
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 60px rgba(45, 25, 90, 0.18);
  backdrop-filter: blur(16px);
}

.app-card h1 { font-size: 22px; margin-bottom: 6px; }
.app-card p.lede { color: var(--muted); margin-top: 0; }

.field { display: grid; gap: 6px; margin-bottom: 14px; text-align: left; }
.field label { font-size: 13px; font-weight: 650; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); }

input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
}

textarea { resize: vertical; min-height: 70px; }

.btn {
  display: inline-block;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 14px;
  color: var(--primary-text);
  background: var(--primary);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn.small { width: auto; padding: 8px 14px; font-size: 13px; }
.btn.danger { background: #c4453b; }

.notice { padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; }
.notice.error { background: #fde2df; color: #8c2b23; }
.notice.success { background: #e0f5e6; color: #206336; }

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.link-row .meta { text-align: left; flex: 1; }
.link-row .meta .type { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.link-row .meta .label { font-weight: 650; }

.link-row.dragging { opacity: 0.4; }

.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }

.theme-swatches { display: flex; flex-wrap: wrap; gap: 10px; }

.theme-swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 64px;
  padding: 8px 6px;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
}

.theme-swatch:has(input:checked) {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.85);
}

.theme-swatch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-swatch-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(45, 25, 90, 0.18);
}

.theme-swatch-label { font-size: 11px; font-weight: 650; color: var(--ink); }

.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 10px; text-align: left; }

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }

.stat-tile {
  flex: 1 1 120px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.stat-value { font-size: 26px; font-weight: 650; line-height: 1.1; color: var(--ink); }
.stat-label { margin-top: 4px; font-size: 12px; color: var(--muted); }

.click-count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.top-actions a { color: var(--muted); font-size: 13px; text-decoration: none; }

.dev-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4d6;
  color: #6b5200;
  font-size: 13px;
  text-align: left;
  word-break: break-all;
}
