/* WaffleLink design system
   Tokens → base → layout → components → marketing → auth → dashboard → public profile */

:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --surface-2: #fbf1e2;
  --ink: #24180f;
  --muted: #6f5e4b;
  --line: #eedfca;
  --primary: #e9a23b;
  --primary-hover: #dc9026;
  --primary-ink: #2b1d0e;
  --syrup: #a85a17;
  --danger: #b4321f;
  --danger-bg: #fdecea;
  --success: #24704a;
  --success-bg: #e7f5ec;
  --info-bg: #fff3dc;
  --focus: #2563eb;
  --grid: rgba(184, 116, 28, 0.07);
  --shadow: 0 1px 2px rgba(60, 35, 10, .06), 0 8px 24px rgba(60, 35, 10, .07);
  --shadow-lg: 0 2px 6px rgba(60, 35, 10, .08), 0 24px 60px rgba(60, 35, 10, .14);
  --radius: 16px;
  --radius-s: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", var(--font);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15110d; --surface: #1f1914; --surface-2: #2a221b; --ink: #f6ede2; --muted: #b9a892; --line: #3a2f25;
    --syrup: #f2b75f; --danger: #ff8a7a; --danger-bg: #3a1a15; --success: #7fd6a4; --success-bg: #15301f; --info-bg: #33270f;
    --grid: rgba(242, 183, 95, 0.05); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 24px 60px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15110d; --surface: #1f1914; --surface-2: #2a221b; --ink: #f6ede2; --muted: #b9a892; --line: #3a2f25;
  --syrup: #f2b75f; --danger: #ff8a7a; --danger-bg: #3a1a15; --success: #7fd6a4; --success-bg: #15301f; --info-bg: #33270f;
  --grid: rgba(242, 183, 95, 0.05); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 24px 60px rgba(0,0,0,.45);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--syrup); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* ---------- Utilities ---------- */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-xs { gap: 6px; } .gap-s { gap: 10px; }
.wrap-row { flex-wrap: wrap; }
.center { text-align: center; } .center-row { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.mt-s { margin-top: 12px; } .mt-m { margin-top: 20px; }
.stack > * + * { margin-top: 16px; } .stack-s > * + * { margin-top: 8px; }
.h3 { font-size: 1.1rem; font-weight: 700; }
.danger-text { color: var(--danger) !important; }
@media (max-width: 420px) { .hide-xs { display: none !important; } }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.01em; }
.logo-word { font-weight: 600; } .logo-word b { color: var(--syrup); font-weight: 800; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 650; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s, box-shadow .15s, border-color .15s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 38px; padding: 7px 12px; font-size: .9rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.15rem; line-height: 1; }
.icon-btn:hover:not(:disabled) { border-color: var(--primary); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.star-on { color: #c77a00; background: var(--info-bg); border-color: var(--primary); }
.theme-toggle { border-color: transparent; background: transparent; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; } :root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; } :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; } }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards, forms, notices ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card, .card + form, form + .card { margin-top: 16px; }
fieldset.card { margin: 0; min-width: 0; } fieldset.card + fieldset.card { margin-top: 16px; }
legend.h3 { padding: 0; float: left; width: 100%; margin-bottom: 12px; } legend.h3 + * { clear: both; }
.field label, .field > .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--bg); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(233, 162, 59, .22); }
.field input[type=color] { width: 100%; height: 46px; padding: 4px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--bg); cursor: pointer; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.field-error { color: var(--danger); font-size: .875rem; margin: 6px 0 0; font-weight: 600; }
.input-prefix { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--bg); overflow: hidden; }
.input-prefix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(233, 162, 59, .22); }
.input-prefix span { display: flex; align-items: center; padding: 0 2px 0 12px; color: var(--muted); white-space: nowrap; font-size: .95rem; }
.field .input-prefix input { border: 0 !important; box-shadow: none !important; padding-left: 2px !important; min-width: 0; background: transparent !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; } .grid-2 .full { grid-column: 1 / -1; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.flash { padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; font-weight: 550; border: 1px solid transparent; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.flash-error { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.flash-info { background: var(--info-bg); color: var(--ink); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 8px; vertical-align: middle; text-transform: uppercase; letter-spacing: .03em; }
.chip-pref { background: var(--info-bg); color: var(--syrup); }
.icon { flex: none; }

/* ---------- Site header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header .wrap { min-height: 64px; }
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 40px; }
.footer-grid { display: grid; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 550; } .footer-links a:hover { color: var(--syrup); }
.footer-note { margin: 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1fr auto; } .footer-note { grid-column: 1 / -1; } }

/* ---------- Marketing ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 56px;
  background-image: linear-gradient(var(--grid) 2px, transparent 2px), linear-gradient(90deg, var(--grid) 2px, transparent 2px); background-size: 44px 44px; background-position: center top; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 72px 0 88px; } .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.eyebrow { display: inline-block; font-weight: 700; color: var(--syrup); background: var(--info-bg); padding: 4px 12px; border-radius: 99px; font-size: .9rem; margin-bottom: 16px; }
.display { font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 4.2rem); letter-spacing: -.03em; line-height: 1.02; margin-bottom: 18px; font-weight: 800; }
.syrup { color: var(--syrup); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 34em; margin-bottom: 26px; }
.hero-demo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.demo-url { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; font-size: .95rem; box-shadow: var(--shadow); color: var(--muted); }
.demo-url b { color: var(--ink); }
.demo-phone { width: min(100% - 12px, 360px); border-radius: 36px; padding: 10px; background: #2a1d12; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .demo-phone { transform: rotate(-1.5deg); } }
.demo-phone .pscope { border-radius: 28px; overflow: hidden; min-height: 0; }
.section { padding: 56px 0; } .section-alt { background: var(--surface-2); }
.section-title { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; text-align: center; font-weight: 800; }
.section-sub { text-align: center; color: var(--muted); max-width: 36em; margin: 0 auto 32px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps h3 { font-size: 1.1rem; } .steps p { color: var(--muted); margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 800; margin-bottom: 14px;
  background-image: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px); background-size: 10px 10px; }
.features { display: grid; gap: 16px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.feature .icon { color: var(--syrup); width: 28px; height: 28px; margin-bottom: 10px; }
.feature h3 { font-size: 1.05rem; } .feature p { color: var(--muted); margin: 0; }
.cta-band .btn { margin-top: 4px; }
.prose { max-width: 760px; padding-top: 32px; padding-bottom: 24px; }
.prose h1 { font-family: var(--font-display); font-size: 2.2rem; letter-spacing: -.02em; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; } .prose h3 { font-size: 1.05rem; margin-top: 1.2em; }
.prose li { margin-bottom: .4em; }
.notfound { text-align: center; padding-top: 56px; padding-bottom: 32px; max-width: 640px; }
.notfound h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.6rem); }
.nf-waffle { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; padding: 10px; background: var(--primary); border-radius: 18px; width: max-content; margin: 0 auto 24px; transform: rotate(-6deg); }
.nf-waffle span { width: 34px; height: 34px; border-radius: 8px; background: rgba(120, 70, 10, .35); }
.nf-waffle span.hole { background: var(--bg); }

/* ---------- Auth ---------- */
.auth-body { background-image: linear-gradient(var(--grid) 2px, transparent 2px), linear-gradient(90deg, var(--grid) 2px, transparent 2px); background-size: 44px 44px; }
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 20px 16px 32px; gap: 20px; }
.auth-top { width: 100%; max-width: 440px; display: flex; justify-content: space-between; align-items: center; }
.auth-card { width: 100%; max-width: 440px; padding: 28px 22px; }
@media (min-width: 480px) { .auth-card { padding: 32px; } .auth { justify-content: center; } }
.auth-card h1 { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: -.02em; }

/* ---------- Dashboard ---------- */
.app-body { background: var(--bg); }
.dash-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.dash-top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 16px; max-width: 1280px; margin: 0 auto; }
.dash-body { max-width: 1280px; margin: 0 auto; }
.dash-nav { display: flex; gap: 4px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 60px; z-index: 20; background: var(--bg); }
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: .95rem; }
.dash-nav a:hover { background: var(--surface-2); color: var(--ink); }
.dash-nav a.active { background: var(--info-bg); color: var(--ink); }
.dash-nav a.active .icon { color: var(--syrup); }
.dash-main { padding: 20px 16px 48px; display: grid; gap: 28px; min-width: 0; }
.dash-content { min-width: 0; }
.dash-title { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.02em; margin: 22px 0 16px; }
@media (min-width: 960px) {
  .dash-body { display: grid; grid-template-columns: 230px 1fr; }
  .dash-nav { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--line); padding: 20px 12px; height: calc(100vh - 60px); top: 60px; }
  .dash-main { padding: 28px 32px 64px; }
  .dash-main.with-preview { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}
.url-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1.5px dashed color-mix(in srgb, var(--primary) 70%, transparent); }
.url-card-text { display: flex; flex-direction: column; min-width: 0; }
.url-value { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.url-value:hover { color: var(--syrup); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.check-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.checklist li.done .check-dot { background: var(--success); border-color: var(--success); color: #fff; }
.avatar-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.add-card summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; }
.add-card summary::-webkit-details-marker { display: none; }
.add-card summary::after { content: "＋"; margin-left: auto; color: var(--muted); }
.add-card[open] summary::after { content: "－"; }
.link-list { list-style: none; padding: 0; margin: 16px 0 0; }
.link-item + .link-item { margin-top: 12px; }
.link-item { padding: 14px; }
.link-item.is-disabled { opacity: .72; background: var(--surface-2); box-shadow: none; }
.link-item.is-preferred { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.link-row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.link-info { min-width: 0; }
.link-label { font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.link-dest { margin: 0; overflow-wrap: anywhere; }
.link-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.link-actions form { margin: 0; }
.link-edit { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.link-edit summary { cursor: pointer; color: var(--syrup); font-weight: 650; padding: 4px 0; }
.empty { text-align: center; padding: 36px 20px; margin-top: 16px; } .empty .icon { margin: 0 auto 8px; color: var(--syrup); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.choice { cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); height: 100%; transition: border-color .15s; }
.choice input:checked + .choice-box { border-color: var(--primary); background: var(--info-bg); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-label { font-size: .85rem; font-weight: 650; }
.swatch { width: 52px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(0,0,0,.08); }
.swatch i { width: 30px; height: 10px; border-radius: 5px; }
.swatch-waffle { background: #fff6e8; } .swatch-waffle i { background: #e9a23b; }
.swatch-classic { background: #f6f6f8; } .swatch-classic i { background: #1d1d22; }
.swatch-berry { background: #fdf0f5; } .swatch-berry i { background: #c2185b; }
.swatch-ocean { background: #eaf6fb; } .swatch-ocean i { background: #0e7490; }
.swatch-midnight { background: #11131f; } .swatch-midnight i { background: #8b97ff; }
.swatch-forest { background: #0f1f19; } .swatch-forest i { background: #3ddc97; }
.swatch-custom { background: conic-gradient(#f87171, #fbbf24, #34d399, #60a5fa, #a78bfa, #f87171); } .swatch-custom i { background: #fff; }
.bgprev { width: 52px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background-color: var(--surface-2); }
.bgprev.bg-waffle { background-image: linear-gradient(rgba(120,70,10,.18) 2px, transparent 2px), linear-gradient(90deg, rgba(120,70,10,.18) 2px, transparent 2px); background-size: 10px 10px; }
.bgprev.bg-gradient { background-image: linear-gradient(160deg, var(--surface-2), var(--primary)); }
.bgprev.bg-dots { background-image: radial-gradient(rgba(120,70,10,.3) 1.5px, transparent 1.6px); background-size: 9px 9px; }
.btnprev { width: 56px; height: 22px; border-radius: 6px; background: var(--primary); border: 2px solid var(--primary); }
.btnprev.shape-pill { border-radius: 99px; } .btnprev.shape-square { border-radius: 0; }
.btnprev.fill-outline { background: transparent; } .btnprev.fill-soft { background: color-mix(in srgb, var(--primary) 30%, transparent); border-color: transparent; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.live-preview { position: sticky; top: 84px; }
.live-preview .phone, .phone { border-radius: 34px; padding: 9px; background: #2a1d12; box-shadow: var(--shadow-lg); max-width: 340px; margin: 8px auto 0; }
.phone .pscope { border-radius: 26px; overflow: hidden; max-height: 640px; overflow-y: auto; min-height: 0; }
.phone-lg { max-width: 420px; }
.phone iframe { display: block; width: 100%; height: 720px; max-height: 75vh; border: 0; border-radius: 26px; background: #fff; }
@media (max-width: 959px) {
  .live-preview { position: static; }
  .with-preview .live-preview { order: 2; }
}

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar-lg { width: 112px; height: 112px; } .avatar-md { width: 84px; height: 84px; } .avatar-sm { width: 40px; height: 40px; }
.avatar-default { display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: var(--primary-ink); background: var(--primary);
  background-image: linear-gradient(rgba(0,0,0,.07) 2px, transparent 2px), linear-gradient(90deg, rgba(0,0,0,.07) 2px, transparent 2px); background-size: 14px 14px; }
.avatar-lg.avatar-default { font-size: 2.4rem; } .avatar-md.avatar-default { font-size: 1.8rem; }

/* ---------- Public profile (themed with --p-* variables) ---------- */
.pscope { --p-bg: #fff6e8; --p-text: #17120e; --p-muted: #6b5d50; --p-card: #fffbf5; --p-accent: #e9a23b; --p-accent-text: #17120e; --p-line: #e7dccd;
  --p-radius: 14px; background-color: var(--p-bg); color: var(--p-text); min-height: 100vh; min-height: 100dvh; }
body.profile-body { background-color: var(--p-bg); }
.pscope.bg-waffle { background-image: linear-gradient(color-mix(in srgb, var(--p-text) 6%, transparent) 2px, transparent 2px), linear-gradient(90deg, color-mix(in srgb, var(--p-text) 6%, transparent) 2px, transparent 2px); background-size: 36px 36px; }
.pscope.bg-gradient { background-image: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--p-accent) 38%, transparent), transparent 70%); }
.pscope.bg-dots { background-image: radial-gradient(color-mix(in srgb, var(--p-text) 14%, transparent) 1.5px, transparent 1.6px); background-size: 18px 18px; }
body.pscope.bg-waffle, body.pscope.bg-dots, body.pscope.bg-gradient { background-attachment: fixed; }
.pscope.shape-pill { --p-radius: 999px; } .pscope.shape-square { --p-radius: 4px; }
.profile-main { padding: 0 16px; }
.pcard { container-type: inline-size; width: 100%; max-width: 520px; margin: 0 auto; padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; min-height: inherit; }
.phone .pcard, .demo-phone .pcard { padding: 28px 16px 18px; }
.p-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.p-head .avatar { box-shadow: 0 0 0 4px var(--p-bg), 0 0 0 6px var(--p-accent); margin-bottom: 14px; }
.p-head .avatar-default { background-color: var(--p-accent); color: var(--p-accent-text); }
.p-name { font-family: var(--font-display); font-size: 1.6rem; margin: 0; overflow-wrap: anywhere; letter-spacing: -.01em; font-weight: 800; }
.p-handle { color: var(--p-muted); margin: 2px 0 0; font-weight: 600; }
.p-bio { margin: 12px 0 0; max-width: 30em; white-space: pre-line; overflow-wrap: anywhere; }
.p-bio.is-empty { display: none; }
.p-section { margin-top: 26px; }
.p-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--p-muted); margin: 0 0 8px; text-align: center; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pl-list > li { min-width: 0; }
.pl-btn { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px 10px 10px; border-radius: var(--p-radius); text-decoration: none; color: var(--p-text);
  background: var(--p-card); border: 2px solid var(--p-line); transition: transform .12s, box-shadow .12s, border-color .12s; position: relative; }
.pl-btn:hover { transform: translateY(-1px); border-color: var(--p-accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--p-text) 12%, transparent); }
.pl-btn:active { transform: translateY(1px); }
.pl-btn:focus-visible { outline: 3px solid var(--p-accent); outline-offset: 3px; }
.shape-pill .pl-btn { padding-left: 10px; padding-right: 20px; }
.pl-badge { width: 42px; height: 42px; border-radius: min(var(--p-radius, 12px), 12px); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: #fff; flex: none; }
.shape-pill .pl-badge { border-radius: 50%; }
.pl-badge-icon { background: color-mix(in srgb, var(--p-accent) 20%, var(--p-card)); color: var(--p-text); }
.prov-venmo { background: #008cff; } .prov-paypal { background: #1546a0; } .prov-cashapp { background: #00a83a; } .prov-zelle { background: #6d1ed4; } .prov-custom { background: #8a5a2b; }
.pl-text { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; }
.pl-label { font-weight: 750; font-size: 1.05rem; overflow-wrap: anywhere; line-height: 1.25; }
.pl-dest { font-size: .8rem; color: var(--p-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-arrow { flex: none; opacity: .55; }
.pl-pref-tag { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 99px; flex: none; background: color-mix(in srgb, var(--p-accent-text) 16%, transparent); }
/* Preferred: always the boldest, filled with the accent color. */
.pl-btn.pl-preferred { background: var(--p-accent); color: var(--p-accent-text); border-color: var(--p-accent); min-height: 76px; box-shadow: 0 8px 24px color-mix(in srgb, var(--p-accent) 40%, transparent); }
.pl-btn.pl-preferred .pl-dest { color: inherit; opacity: .8; }
.pl-btn.pl-preferred .pl-label { font-size: 1.15rem; }
.pl-btn.pl-preferred .pl-badge { box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-accent-text) 30%, transparent); }
.pl-btn.pl-preferred .pl-badge-icon { background: color-mix(in srgb, var(--p-accent-text) 15%, transparent); color: inherit; }
.fill-solid .pl-btn:not(.pl-preferred) { background: var(--p-card); }
.fill-outline .pl-btn:not(.pl-preferred) { background: transparent; border-color: var(--p-accent); }
.fill-soft .pl-btn:not(.pl-preferred) { background: color-mix(in srgb, var(--p-accent) 16%, var(--p-bg)); border-color: transparent; }
.p-empty { text-align: center; color: var(--p-muted); margin-top: 28px; padding: 18px; border: 2px dashed var(--p-line); border-radius: 14px; }
.p-actions { display: flex; justify-content: center; margin-top: 22px; }
.p-share { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--p-line); background: var(--p-card); color: var(--p-text); font-weight: 650; cursor: pointer; }
.p-share:hover { border-color: var(--p-accent); }
.p-foot { margin-top: auto; padding-top: 32px; text-align: center; }
.p-disclaimer { font-size: .75rem; color: var(--p-muted); max-width: 26em; margin: 0 auto 12px; }
.p-brand { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--p-muted); text-decoration: none; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--p-card) 80%, transparent); }
.p-brand:hover { color: var(--p-text); }
.phone .p-foot, .demo-phone .p-foot { padding-top: 20px; }
/* Narrow cards: the "Preferred method" heading already labels the button, so drop the tag. */
@container (max-width: 400px) { .pl-pref-tag { display: none; } .pl-btn { padding-right: 12px; } }
