/* Wibty — core styles */
:root {
  --bg: #F3F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --ink: #15172A;
  --ink-2: #3A3E52;
  --muted: #6B7084;
  --line: #E3E5EC;
  --navy: #2A2E48;
  --navy-hover: #1E2136;
  --accent: #5352C9;
  --accent-soft: #ECECFB;
  --ok: #2E9D6B;
  --ok-soft: #E6F5EE;
  --danger: #C8423B;
  --danger-soft: #FBECEA;
  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --shadow: 0 1px 2px rgba(21, 23, 42, .05), 0 6px 20px rgba(21, 23, 42, .06);
  --shadow-l: 0 2px 4px rgba(21, 23, 42, .04), 0 24px 60px rgba(21, 23, 42, .12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.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 { transition: none !important; animation: none !important; } }

/* ---------- Logo ---------- */
.logo { font-weight: 800; font-size: 26px; letter-spacing: -.03em; text-decoration: none; color: var(--ink); display: inline-flex; align-items: baseline; }
.logo i { font-style: normal; color: var(--accent); }
.logo-s { font-size: 21px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(42, 46, 72, .22); }
.btn-primary:hover { background: var(--navy-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #4443B4; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #C9CCD8; }
.btn-soft { background: #E9EAF0; color: var(--ink); }
.btn-soft:hover { background: #DFE1E9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-link { background: none; border: 0; color: var(--muted); padding: 0; height: auto; font-weight: 500; }
.btn-link:hover { color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 84px; padding: 10px 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid { border-color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--danger); }
.error { font-size: 12.5px; color: var(--danger); margin-top: 6px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prefix-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.prefix-input span { padding: 0 2px 0 13px; color: var(--muted); white-space: nowrap; }
.prefix-input input { border: 0; height: 42px; flex: 1; min-width: 0; padding: 0 13px 0 0; background: transparent; }
.prefix-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.prefix-input input:focus { outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--accent); }

/* switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #CDD0DA; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Alerts / toast ---------- */
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-ok { background: var(--ok-soft); color: #1E6B49; }
.alert-bad { background: var(--danger-soft); color: #8E2D28; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Site header ---------- */
.site-header { max-width: 1160px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; gap: 28px; }
.site-nav { display: flex; gap: 28px; margin: 0 auto; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 15px; }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.lang { display: flex; gap: 2px; background: #E9EAF0; border-radius: 8px; padding: 3px; }
.lang a { text-decoration: none; font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 7px; border-radius: 6px; }
.lang a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* ---------- Landing ---------- */
.hero { max-width: 1160px; margin: 0 auto; padding: 56px 24px 88px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin: 0 0 22px; }
.hero h1 span { display: block; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 30ch; margin: 0 0 32px; line-height: 1.5; }
.claim { display: flex; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); }
.claim label { display: flex; align-items: center; padding-left: 14px; color: var(--muted); font-size: 17px; white-space: nowrap; }
.claim input { flex: 1; min-width: 0; border: 0; font-size: 17px; font-weight: 600; padding: 0 4px; background: transparent; }
.claim input:focus { outline: none; }
.claim:focus-within { border-color: var(--accent); }
.hero-sub { margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.hero-sub a { color: var(--ink); font-weight: 600; }

.stage { position: relative; display: flex; justify-content: center; }
.browser { width: 100%; max-width: 440px; background: #EEF0F5; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-l); overflow: hidden; }
.browser-bar { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #F8F9FB; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D5D8E0; }
.browser-bar em { margin-left: 16px; flex: 1; height: 20px; border-radius: 6px; background: #EBEDF2; font-style: normal; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.browser-body { padding: 34px 28px; display: flex; justify-content: center; }

.steps { max-width: 1160px; margin: 0 auto; padding: 24px 24px 90px; }
.steps h2, .section h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 36px; max-width: 18ch; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: counter(s); display: block; font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.steps li h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.steps li p { margin: 0; color: var(--muted); }

.section { max-width: 1160px; margin: 0 auto; padding: 20px 24px 90px; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.feature { background: var(--surface); padding: 30px; }
.feature svg { color: var(--accent); margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); max-width: 44ch; }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); max-width: 70ch; }

.cta-band { max-width: 1112px; margin: 0 auto 80px; background: var(--navy); color: #fff; border-radius: 24px; padding: 56px 40px; text-align: center; }
.cta-band h2 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; }
.cta-band p { margin: 0 0 26px; color: #B9BCD3; }
.cta-band .btn { background: #fff; color: var(--navy); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer div { max-width: 1160px; margin: 0 auto; padding: 26px 24px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - 90px); display: flex; align-items: center; justify-content: center; padding: 20px 16px 60px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 34px 30px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); }
.auth-alt { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth-alt a { color: var(--ink); font-weight: 600; }
.split { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 14px; }
.split a { color: var(--muted); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash.has-preview { grid-template-columns: 240px 1fr 360px; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .logo { padding: 0 10px 26px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.side nav a:hover { background: var(--surface-2); }
.side nav a.on { background: var(--accent-soft); color: var(--accent); }
.side nav a svg { color: currentColor; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who small { display: block; font-weight: 400; color: var(--muted); }
.side-foot button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.side-foot button:hover { color: var(--ink); background: var(--surface-2); }
.avatar-xs { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }

.main { padding: 32px 36px 110px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.main-head h1 { font-size: 28px; letter-spacing: -.025em; margin: 0; }
.main-head p { margin: 4px 0 0; color: var(--muted); }
.my-link { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; font-size: 14px; }
.my-link a { font-weight: 600; text-decoration: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; margin-bottom: 20px; }
.card h2 { font-size: 16px; margin: 0 0 18px; }
.card h2 small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.card.danger { border-color: #F0CFCC; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.savebar { position: sticky; bottom: 16px; display: flex; gap: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.savebar .btn { flex: 1; }

.avatar-upload { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.avatar-drop { position: relative; width: 96px; height: 96px; border-radius: 50%; background: var(--surface-2); border: 1.5px dashed #C9CCD8; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11.5px; cursor: pointer; overflow: hidden; flex: none; }
.avatar-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar-drop:hover { border-color: var(--accent); color: var(--accent); }
.counter { float: right; font-weight: 400; color: var(--muted); font-size: 12px; }

/* link rows */
.link-list { display: flex; flex-direction: column; gap: 10px; }
.link-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px 7px 6px; }
.link-row.dragging { opacity: .5; }
.link-row.over { border-color: var(--accent); }
.grip { cursor: grab; color: #A9ADBC; display: flex; padding: 4px 0; touch-action: none; }
.brand { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.brand-instagram { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.link-row .fields { flex: 1; display: flex; gap: 8px; min-width: 0; }
.link-row .fields .input { height: 38px; }
.link-row .fields .input.label-input { max-width: 150px; }
.icon-btn { background: none; border: 0; color: #A9ADBC; cursor: pointer; padding: 7px; border-radius: 8px; display: flex; }
.icon-btn:hover { color: var(--danger); background: var(--danger-soft); }
.link-row.is-off .fields .input { color: var(--muted); }
.platform-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 16px; }
.platform-picker label { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.platform-picker input { position: absolute; opacity: 0; pointer-events: none; }
.platform-picker .brand { width: 26px; height: 26px; border-radius: 7px; }
.platform-picker input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.platform-picker input:focus-visible + label { outline: 2px solid var(--accent); }
.add-row { display: flex; gap: 10px; }
.add-row .input { flex: 1; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 12px; }

/* theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.theme-opt input, .style-opt input { position: absolute; opacity: 0; }
.theme-opt label { display: block; cursor: pointer; border: 2px solid transparent; border-radius: 14px; padding: 4px; }
.theme-opt input:checked + label { border-color: var(--accent); }
.theme-opt input:focus-visible + label { outline: 2px solid var(--accent); }
.swatch { height: 110px; border-radius: 10px; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 7px; background: var(--p-bg); border: 1px solid var(--line); }
.swatch b { width: 26px; height: 26px; border-radius: 50%; background: var(--p-muted); opacity: .5; }
.swatch i { width: 100%; height: 14px; border-radius: 5px; background: var(--p-btn); border: 1px solid var(--p-btn-line); }
.theme-opt span { display: block; text-align: center; font-size: 13.5px; font-weight: 500; margin-top: 6px; }
.style-row { display: flex; gap: 12px; flex-wrap: wrap; }
.style-opt label { display: flex; align-items: center; justify-content: center; width: 130px; height: 46px; border: 1.5px solid var(--line); cursor: pointer; font-size: 14px; font-weight: 500; background: var(--surface); }
.style-opt input:checked + label { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.style-opt.rounded label { border-radius: 10px; }
.style-opt.pill label { border-radius: 99px; }
.style-opt.square label { border-radius: 2px; }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; }
.kpi b { display: block; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: 14px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 10px; }
.bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.bars div:hover { opacity: 1; }
.bars div[data-zero] { background: #E1E3EA; }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 8px; }
.meter { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--surface-2); font-size: 14px; }
.meter:last-child { border-bottom: 0; }
.meter .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.meter .brand { width: 26px; height: 26px; border-radius: 7px; }
.meter .track { width: 34%; height: 6px; background: var(--surface-2); border-radius: 9px; overflow: hidden; }
.meter .track i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.meter b { width: 42px; text-align: right; }
.seg { display: inline-flex; background: #E9EAF0; border-radius: 10px; padding: 3px; }
.seg a { text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* admin table */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.table td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: #1E6B49; }
.badge.bad { background: var(--danger-soft); color: #8E2D28; }
.badge.acc { background: var(--accent-soft); color: var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); font-size: 14px; }

/* preview column */
.preview-col { border-left: 1px solid var(--line); padding: 32px 24px; position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--bg); }
.preview-col h3 { font-size: 16px; margin: 0 0 16px; font-weight: 600; }
.phone { width: 290px; margin: 0 auto; border-radius: 46px; background: #1B1C22; padding: 11px; box-shadow: var(--shadow-l); }
.phone-screen { border-radius: 36px; overflow: hidden; height: 600px; overflow-y: auto; position: relative; scrollbar-width: none; }
.phone-screen::-webkit-scrollbar { display: none; }
.phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; background: #1B1C22; border-radius: 20px; z-index: 2; }
.phone .pcard { padding-top: 44px; font-size: 13px; }
.phone .pcard-avatar { width: 84px; height: 84px; font-size: 28px; }
.phone .pcard-name { font-size: 28px; }
.phone .plinks { grid-template-columns: 1fr; }
.phone .plink { height: 44px; font-size: 13.5px; }
.phone .pcard-foot { display: none; }

/* mobile dashboard */
.mob-top { display: none; }
.tabbar { display: none; }

/* ---------- Public profile card (themeable) ---------- */
.pcard, .pbody, .swatch { --p-bg: #F4F5F8; --p-surface: #FFFFFF; --p-ink: #15172A; --p-muted: #6B7084; --p-btn: #FFFFFF; --p-btn-line: #E3E5EC; --p-btn-ink: #15172A; --p-accent: #5352C9; --p-radius: 12px; }
.theme-dark { --p-bg: #121318; --p-surface: #1B1D25; --p-ink: #F2F3F7; --p-muted: #9A9EB2; --p-btn: #22242E; --p-btn-line: #2E3140; --p-btn-ink: #F2F3F7; --p-accent: #8C8BF2; }
.theme-midnight { --p-bg: #10183A; --p-surface: #17214A; --p-ink: #EEF1FF; --p-muted: #A3AEDB; --p-btn: #1D2858; --p-btn-line: #2A3770; --p-btn-ink: #EEF1FF; --p-accent: #8FA6FF; }
.theme-lilac { --p-bg: #F1EEFB; --p-surface: #FFFFFF; --p-ink: #2A2350; --p-muted: #756E97; --p-btn: #FFFFFF; --p-btn-line: #E1DAF6; --p-btn-ink: #2A2350; --p-accent: #6B4FD8; }
.theme-mono { --p-bg: #FFFFFF; --p-surface: #FFFFFF; --p-ink: #000000; --p-muted: #555555; --p-btn: #FFFFFF; --p-btn-line: #000000; --p-btn-ink: #000000; --p-accent: #000000; }
.theme-sunset { --p-bg: linear-gradient(170deg, #FFE7D6 0%, #F9D4E4 55%, #E4DAF8 100%); --p-surface: rgba(255,255,255,.7); --p-ink: #3B2230; --p-muted: #86606F; --p-btn: rgba(255,255,255,.75); --p-btn-line: rgba(255,255,255,.9); --p-btn-ink: #3B2230; --p-accent: #D1467A; }
.btn-style-pill { --p-radius: 99px; }
.btn-style-square { --p-radius: 3px; }

.pcard { background: var(--p-bg); color: var(--p-ink); min-height: 100%; padding: 30px 20px 40px; }
.pcard-inner { max-width: 620px; margin: 0 auto; }
.pcard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.pcard-top .logo { color: var(--p-ink); font-size: 22px; }
.pcard-top .logo i { color: var(--p-accent); }
.p-share { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--p-btn); border: 1px solid var(--p-btn-line); color: var(--p-btn-ink); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.pcard-head { text-align: center; }
.pcard-avatar { width: 116px; height: 116px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover; background: var(--p-btn-line); display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 700; color: var(--p-muted); box-shadow: 0 0 0 4px var(--p-surface), 0 8px 24px rgba(0,0,0,.12); }
.pcard-name { font-size: clamp(18px, 2.6vw, 26px); font-weight: 700; letter-spacing: -.02em; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.verified { color: var(--p-accent); display: inline-flex; }
.pcard-title { color: var(--p-ink); opacity: .8; margin: 2px 0 0; }
.pcard-loc { color: var(--p-muted); font-size: 14px; margin: 2px 0 0; display: inline-flex; gap: 4px; align-items: center; }
.pcard-about { margin: 22px 0 18px; }
.pcard-about h2 { font-size: 14px; margin: 0 0 4px; }
.pcard-about p { margin: 0; color: var(--p-ink); opacity: .85; }
.plinks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plink { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 12px; background: var(--p-btn); border: 1px solid var(--p-btn-line); border-radius: var(--p-radius); text-decoration: none; color: var(--p-btn-ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .12s, box-shadow .12s; min-width: 0; }
.plink:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.plink .brand { width: 28px; height: 28px; border-radius: 7px; }
.plink .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plink .v { color: var(--p-muted); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.btn-style-pill .plink .brand { border-radius: 50%; }
.pcard-foot { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--p-btn-line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pcard-url { font-size: 20px; font-weight: 600; letter-spacing: -.01em; word-break: break-all; }
.pcard-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pbtn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--p-btn); border: 1px solid var(--p-btn-line); color: var(--p-btn-ink); font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer; }
.qr-box { background: #fff; padding: 7px; border-radius: 10px; flex: none; line-height: 0; border: 1px solid var(--p-btn-line); }
.qr-box canvas, .qr-box img { width: 92px; height: 92px; image-rendering: pixelated; }
.pcard-made { text-align: center; margin-top: 30px; font-size: 13px; color: var(--p-muted); }
.pcard-made a { color: var(--p-ink); font-weight: 600; }
.pbody { background: var(--p-bg); min-height: 100vh; }
.pbody .pcard { background: transparent; }

/* ---------- Share modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(21, 23, 42, .45); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 90; }
.modal.open { display: flex; }
.modal-box { background: #fff; color: var(--ink); width: 100%; max-width: 400px; border-radius: 20px; padding: 24px; box-shadow: var(--shadow-l); position: relative; }
.modal-box h2 { margin: 0 0 16px; font-size: 20px; text-align: center; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-qr { display: flex; justify-content: center; margin-bottom: 16px; }
.modal-qr canvas { width: 200px; height: 200px; image-rendering: pixelated; }
.copy-row { display: flex; gap: 8px; margin-bottom: 18px; }
.copy-row .input { height: 40px; font-size: 14px; }
.share-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 4px 0; }
.share-grid .brand { width: 42px; height: 42px; border-radius: 12px; }

/* ---------- Installer ---------- */
.install { max-width: 720px; margin: 40px auto; padding: 0 16px 60px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-size: 14px; }
.checks div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--surface-2); padding: 6px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .dash.has-preview { grid-template-columns: 220px 1fr; }
  .preview-col { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 28px; }
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .steps ol { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .dash, .dash.has-preview { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 120px; }
  .mob-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; font-size: 11px; color: var(--muted); text-decoration: none; }
  .tabbar a.on { color: var(--accent); }
  .savebar { bottom: 76px; }
  .grid-2, .kpis { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 24px; }
}
@media (max-width: 560px) {
  .site-header { padding: 16px; gap: 10px; }
  .header-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 46px; }
  .hero p.lead { font-size: 17px; }
  .claim { flex-wrap: wrap; }
  .claim label { padding: 8px 0 0 10px; font-size: 15px; }
  .claim input { padding: 8px 0 8px 2px; font-size: 15px; }
  .claim .btn { width: 100%; }
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .plinks { grid-template-columns: 1fr; }
  .pcard-url { font-size: 16px; }
  .link-row { flex-wrap: wrap; }
  .link-row .fields { flex-basis: 100%; order: 5; flex-direction: column; }
  .link-row .fields .input.label-input { max-width: none; }
  .cta-band { margin: 0 16px 60px; padding: 40px 22px; }
  .checks { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: repeat(5, 1fr); }
}
