/* button.bio – website, dashboard and admin */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --ink: #1E1B3A;
  --ink-2: #4A4670;
  --ink-3: #6B6790;
  --paper: #F3F4FA;
  --surface: #FFFFFF;
  --surface-2: #F7F7FC;
  --line: #E3E3EF;
  --line-2: #CDCDE0;
  --cobalt: #3245FF;
  --cobalt-hover: #2737E0;
  --cobalt-soft: #E9EBFF;
  --butter: #FFCD3C;
  --butter-deep: #D9A400;
  --ok: #0F7A56;
  --ok-bg: #E2F6EE;
  --bad: #C42651;
  --bad-bg: #FDE7ED;
  --warn: #8A5A00;
  --warn-bg: #FFF2CC;
  --pink: #B4236A;
  --pink-bg: #FCE7F3;
  --chart-1: #3245FF;
  --chart-2: #EB6834;
  --chart-grid: #E7E7F1;
  --radius: 14px;
  --radius-s: 10px;
  --radius-l: 24px;
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(30, 27, 58, .05), 0 6px 20px rgba(30, 27, 58, .06);
  --focus: 0 0 0 3px var(--surface), 0 0 0 6px var(--cobalt);
}
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #EDEBFF;
  --ink-2: #C6C3EA;
  --ink-3: #9D99C8;
  --paper: #15132B;
  --surface: #211E3F;
  --surface-2: #28254B;
  --line: #34305E;
  --line-2: #48437C;
  --cobalt: #8E99FF;
  --cobalt-hover: #A9B2FF;
  --cobalt-soft: #2C2A5C;
  --ok: #5FD9AC;
  --ok-bg: #173B35;
  --bad: #FF7EA0;
  --bad-bg: #44203A;
  --warn: #FFCF6B;
  --warn-bg: #3D3220;
  --pink: #FF8CC6;
  --pink-bg: #3D1F36;
  --chart-1: #6B78F5;
  --chart-2: #D95926;
  --chart-grid: #34305E;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .25);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
main:focus { outline: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--paper); }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-3); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---------- logo ---------- */
.logo-mark { width: 30px; height: 30px; flex: none; }
.lm-face { fill: var(--butter); }
.lm-rim { fill: none; stroke: #1E1B3A; stroke-opacity: .22; stroke-width: 1.6; }
.lm-hole { fill: #1E1B3A; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: var(--surface);
  border: 2px solid var(--line-2); border-radius: 999px;
  cursor: pointer; transition: transform .1s ease, box-shadow .1s ease, background-color .15s, border-color .15s;
}
.btn:hover { color: var(--ink); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-hover); border-color: var(--cobalt-hover); color: #fff; }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-primary:hover { color: #15132B; }
.btn-press {
  background: var(--butter); border-color: var(--butter-deep); color: #1E1B3A;
  box-shadow: 0 4px 0 var(--butter-deep);
  margin-bottom: 4px;
}
.btn-press:hover { background: #FFD45A; border-color: var(--butter-deep); color: #1E1B3A; }
.btn-press:active { transform: translateY(4px); box-shadow: 0 0 0 var(--butter-deep); }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: .9375rem; }
.btn-small.btn-press { box-shadow: 0 3px 0 var(--butter-deep); margin-bottom: 3px; }
.btn-small.btn-press:active { transform: translateY(3px); box-shadow: none; }
.btn-large { min-height: 58px; padding: 14px 28px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.btn .ic { width: 18px; height: 18px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px;
  background: none; border: 0; color: var(--cobalt); font-weight: 700; font-size: .9375rem; cursor: pointer; text-decoration: none;
}
.link-btn:hover { color: var(--cobalt-hover); text-decoration: underline; }
.link-btn.danger { color: var(--bad); }
.link-btn .ic { width: 17px; height: 17px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  background: transparent; border: 0; border-radius: 10px; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--bad); background: var(--bad-bg); }
.icon-btn .ic { width: 18px; height: 18px; }

/* ---------- sponsor bar ---------- */
.sponsor { background: var(--ink); color: var(--paper); font-size: .875rem; }
[data-theme="dark"] .sponsor { background: #0E0C20; color: var(--ink); }
.sponsor-item {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  max-width: 1140px; margin: 0 auto; padding: 8px 24px; color: inherit; text-decoration: none; text-align: center;
}
.sponsor-item:hover { color: inherit; }
.sponsor-item:hover .sponsor-cta { text-decoration: underline; }
.sponsor-tag {
  font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  border: 1px solid currentColor; opacity: .75;
}
.sponsor-logo { height: 20px; width: auto; border-radius: 4px; background: #fff; padding: 2px 4px; }
.sponsor-name { font-weight: 700; }
.sponsor-text { opacity: .9; }
.sponsor-cta { font-weight: 700; color: var(--butter); }

/* ---------- header / footer ---------- */
.site-header { padding: 18px 0; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.header-link:hover { color: var(--cobalt); }

.site-footer { padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-weight: 700; text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-self: end; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9375rem; }
.footer-links a:hover { color: var(--cobalt); text-decoration: underline; }
.footer-tools { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 700; }
.lang-switch a[aria-current] { background: var(--ink); color: var(--paper); }
.footer-copy { margin: 0; justify-self: end; color: var(--ink-3); font-size: .875rem; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2); color: var(--ink); cursor: pointer;
}
.theme-toggle .ic-moon, [data-theme="dark"] .theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: inline; }

/* ---------- flash / notices ---------- */
.flash {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px;
  padding: 12px 16px; border-radius: var(--radius); font-weight: 700; font-size: .9375rem;
}
.flash .ic { margin-top: 1px; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.notice {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 20px;
  padding: 12px 16px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn);
}
.notice p { margin: 0; flex: 1 1 260px; font-weight: 700; }

/* ---------- start page: hero ---------- */
.hero { padding: 28px 0 72px; }
.hero { overflow-x: hidden; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 72px; align-items: center; }
.claim { margin: 0 0 22px; }
.claim-line {
  display: flex; flex-wrap: wrap; align-items: baseline;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 5.6vw, 4.4rem); line-height: 1.08; letter-spacing: -.035em;
  cursor: text;
}
.claim-host { color: var(--ink); white-space: nowrap; }
.claim-input {
  flex: 1 1 100%; min-width: 0; width: 100%; min-height: 0;
  font: inherit; letter-spacing: inherit; color: var(--cobalt);
  background: transparent; border: 0; padding: 0; margin: 0;
  border-bottom: 5px solid var(--butter); border-radius: 0;
  caret-color: var(--cobalt);
}
.claim-input::placeholder { color: var(--line-2); opacity: 1; }
.claim-input:focus { outline: none; box-shadow: none; border-bottom-color: var(--cobalt); }
.claim-row { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 26px; }
.claim-status { margin: 0; color: var(--ink-3); font-size: .9375rem; flex: 1 1 220px; }
.claim-status.is-ok, .field-hint.is-ok { color: var(--ok); font-weight: 700; }
.claim-status.is-bad, .field-hint.is-bad { color: var(--bad); font-weight: 700; }
.hero-lede { font-size: 1.1875rem; color: var(--ink-2); max-width: 34em; margin: 0; }

/* phone frames */
.phone {
  position: relative; width: 100%; max-width: 340px; margin: 0 auto;
  border-radius: 38px; padding: 10px; background: var(--ink);
  box-shadow: 0 24px 60px rgba(30, 27, 58, .22);
}
[data-theme="dark"] .phone { background: #0B0A1A; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.phone-bar {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: #1E1B3A;
  font-size: .75rem; font-weight: 700; white-space: nowrap; max-width: 80%; overflow: hidden; text-overflow: ellipsis;
}
.phone-screen { border-radius: 30px; overflow: hidden; height: 600px; }
.bb-surface { background: var(--bg); color: var(--text); }
.bb-profile.is-demo { padding: 54px 18px 24px; max-width: none; }
/* three pages fanned out: the one in front changes with the name you type */
.hero-demo { display: grid; justify-items: center; padding: 6px 0 40px; }
.hero-demo .phone { grid-area: 1 / 1; width: 300px; max-width: none; margin: 0; }
.hero-demo .phone-main { z-index: 2; }
.hero-demo .phone-side { z-index: 1; box-shadow: 0 18px 40px rgba(30, 27, 58, .16); }
.hero-demo .phone-l { transform: translate(-56%, 46px) rotate(-8deg) scale(.82); }
.hero-demo .phone-r { transform: translate(56%, 46px) rotate(8deg) scale(.82); }
.hero-demo .bb-music-go { padding: 6px 10px; }
.hero-demo .bb-btn.has-media { padding-left: 54px; padding-right: 54px; }
.hero-demo .phone-side .phone-bar { font-size: .8125rem; }
.hero-demo .bb-profile .bb-blocks { gap: 10px; }
.hero-demo .bb-music-links :is(a, .bb-music-link) { padding: 8px 2px; }
.hero-demo .bb-open-now { margin: 0 auto; }
.hero-demo .bb-btn { min-height: 52px; font-size: .9375rem; }
.hero-demo .bb-embed-compact, .hero-demo .bb-embed-video { aspect-ratio: auto; height: 120px; }
.hero-demo .bb-socials { margin-top: 10px; }
.hero-demo .bb-socials a { width: 38px; height: 38px; }
.hero-demo .bb-socials svg { width: 21px; height: 21px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-demo .phone-l { animation: fan-l .8s cubic-bezier(.2, .8, .2, 1) .25s both; }
  .hero-demo .phone-r { animation: fan-r .8s cubic-bezier(.2, .8, .2, 1) .35s both; }
  .hero-demo .bb-blocks > * { animation: pop-in .5s cubic-bezier(.2, .9, .3, 1.25) both; }
  .hero-demo .bb-blocks > :nth-child(2) { animation-delay: .1s; }
  .hero-demo .bb-blocks > :nth-child(3) { animation-delay: .2s; }
  .hero-demo .bb-blocks > :nth-child(4) { animation-delay: .3s; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fan-l { from { opacity: 0; transform: translate(-8%, 30px) rotate(-1deg) scale(.84); } }
@keyframes fan-r { from { opacity: 0; transform: translate(8%, 30px) rotate(1deg) scale(.84); } }

/* ---------- start page: sections ---------- */
.section { padding: 64px 0; }
.section-title { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -.025em; margin: 0 0 12px; }
.section-lede { color: var(--ink-2); font-size: 1.125rem; max-width: 36em; margin: 0 0 36px; }

.spec-list { display: flex; flex-direction: column; border-top: 2px solid var(--line); }
.spec-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px 56px; align-items: center;
  padding: 28px 0; border-bottom: 2px solid var(--line);
}
.spec-text h3 { font-size: 1.25rem; margin: 0 0 6px; }
.spec-text p { margin: 0; color: var(--ink-2); max-width: 30em; }
.spec-demo { border-radius: var(--radius-l); overflow: hidden; }
[data-theme="dark"] .spec-demo, [data-theme="dark"] .phone-screen { box-shadow: 0 0 0 2px var(--line); }
.spec-demo .bb-profile.is-demo { padding: 22px; }
.spec-demo .bb-tabs { margin-bottom: 12px; }

.honest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 28px; }
.list-title { font-size: 1.125rem; margin: 0 0 14px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.0625rem; }
.check-list .ic {
  width: 26px; height: 26px; padding: 4px; border-radius: 50%; margin-top: -1px;
  background: var(--ok-bg); color: var(--ok); stroke-width: 3;
}
.check-list.is-no .ic { background: var(--bad-bg); color: var(--bad); }

.looks-rail {
  display: flex; gap: 18px; overflow-x: auto; padding: 8px 24px 20px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  max-width: 1140px; margin: 0 auto;
}
.looks-rail:focus-visible { box-shadow: inset var(--focus); }
.look { flex: none; width: 168px; margin: 0; scroll-snap-align: start; text-align: center; }
.look-screen { height: 268px; border-radius: 22px; overflow: hidden; border: 2px solid var(--line); }
.look figcaption { margin-top: 8px; font-weight: 700; font-size: .9375rem; }
.bb-profile.is-mini { padding: 26px 14px; font-size: 12px; text-align: center; }
.is-mini .bb-avatar { width: 46px; height: 46px; font-size: 20px; margin-bottom: 8px; }
.is-mini .bb-name { font-size: .9375rem; margin-bottom: 14px; }
.is-mini .bb-blocks { gap: 8px; }
.is-mini .bb-btn { min-height: 36px; padding: 6px 10px; font-size: .75rem; gap: 6px; }

.faq-item { border-bottom: 2px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-weight: 700; font-size: 1.125rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item p { color: var(--ink-2); padding: 0 0 18px; margin: 0; max-width: 40em; }

.final { padding-bottom: 24px; }
.final-box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.final-title { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -.02em; max-width: 18em; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form > .btn { align-self: flex-start; }
.form > .btn-block { align-self: stretch; }
.form > .panel-lede { margin: 0; }
.panel > .segmented:last-child { margin-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field > label, .field > legend, .field > .label, .label-row label { font-weight: 700; font-size: .9375rem; }
.field > legend { padding: 0; margin-bottom: 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.small-link { font-size: .875rem; font-weight: 700; }
:where(input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="search"],
input[type="datetime-local"], input[type="date"], input[type="number"], input:not([type]), select, textarea) {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line-2); border-radius: var(--radius-s);
  font-size: 1rem; line-height: 1.4;
}
:where(textarea) { resize: vertical; min-height: 84px; }
:where(input, select, textarea):focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
input[aria-invalid="true"], .has-error input { border-color: var(--bad) !important; }
:where(input, textarea)::placeholder { color: var(--ink-3); opacity: .8; }
:where(select) { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input-prefix {
  display: flex; align-items: stretch; border: 2px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); overflow: hidden;
}
.input-prefix:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.input-prefix span { display: flex; align-items: center; padding: 0 0 0 14px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.input-prefix input { border: 0 !important; box-shadow: none !important; padding-left: 2px; min-width: 0; }
.input-reveal { position: relative; }
.input-reveal input { padding-right: 52px; }
.reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.reveal[aria-pressed="true"] { color: var(--cobalt); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400 !important; cursor: pointer; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--cobalt); }
.radio-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.field-error { margin: 0; color: var(--bad); font-weight: 700; font-size: .875rem; }
.field-hint { margin: 0; color: var(--ink-3); font-size: .875rem; }

/* ---------- auth pages ---------- */
.auth { padding: 32px 24px 24px; }
.auth-box { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-title { font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.03em; margin: 0 0 10px; }
.auth-lede { color: var(--ink-2); margin: 0 0 24px; }
.auth-alt { margin: 22px 0 0; color: var(--ink-2); }
.error-code { font-family: var(--display); font-weight: 700; font-size: 5.5rem; line-height: 1; letter-spacing: -.04em; color: var(--butter); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; margin: 0 0 14px; }
.error-page .auth-title { margin-bottom: 22px; }
.missing-url { font-family: var(--display); font-size: 1.125rem; color: var(--ink-3); margin: 0 0 8px; overflow-wrap: anywhere; }
.missing-url strong { color: var(--cobalt); }

/* ---------- legal ---------- */
.legal { padding-top: 16px; padding-bottom: 24px; }
.legal h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.03em; margin: 0 0 6px; }
.legal-meta { color: var(--ink-3); margin-bottom: 28px; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--ink-2); max-width: 44em; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* ---------- dashboard shell ---------- */
.page-dash { background: var(--paper); }
.app { position: relative; display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.app::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 252px; background: var(--surface); border-right: 2px solid var(--line); }
.app-side {
  position: sticky; top: 0; z-index: 1; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px; padding: 20px 14px;
}
.app-side .brand { padding: 4px 8px; }
.page-switch { position: relative; }
.page-switch summary {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius); border: 2px solid var(--line);
}
.page-switch summary::-webkit-details-marker { display: none; }
.page-switch summary:hover { border-color: var(--line-2); }
.ps-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; background: var(--butter); color: #1E1B3A; font-weight: 700;
}
.ps-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ps-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ps-text strong, .ps-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-text small { color: var(--ink-3); }
.ps-chev { margin-left: auto; width: 16px; height: 16px; }
.ps-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.ps-menu button, .ps-new {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9375rem;
}
.ps-menu button:hover, .ps-new:hover { background: var(--surface-2); color: var(--ink); }
.ps-new { justify-content: flex-start; color: var(--cobalt); border-top: 2px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a, .side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 700; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; font-size: 1rem;
}
.app-nav a:hover, .side-link:hover { background: var(--surface-2); color: var(--ink); }
.app-nav a[aria-current="page"] { background: var(--cobalt-soft); color: var(--cobalt); }
.badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--butter); color: #1E1B3A; font-size: .75rem; text-align: center; }
.app-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 2px solid var(--line); padding-top: 12px; }
.side-link.theme-toggle { display: flex; width: 100%; height: auto; border-radius: 12px; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.m-menu { display: none; position: relative; }
.m-menu summary { display: flex; align-items: center; gap: 4px; list-style: none; cursor: pointer; padding: 3px 6px 3px 3px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); }
.m-menu summary::-webkit-details-marker { display: none; }
.m-menu .ps-menu { right: auto; width: min(290px, calc(100vw - 32px)); }
.ps-extra { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 6px; }
.ps-extra form { margin: 0; }
.ps-extra .side-link { justify-content: flex-start; gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: .9375rem; color: var(--ink-2); }
.ps-extra .side-link:hover { color: var(--ink); background: var(--surface-2); }
.live-url { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 14px; max-width: 100%; }
.live-link { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.live-link:hover { color: var(--cobalt); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px var(--ok-bg); }
.app-content { padding: 8px 28px 48px; flex: 1; }
.app-tabbar { display: none; }
.page-title { font-family: var(--display); font-size: 1.6rem; letter-spacing: -.025em; margin: 6px 0 22px; }
.narrow-page { max-width: 760px; }

/* panels */
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-l); padding: 22px; margin-bottom: 20px; }
.panel-title { font-size: 1.125rem; margin: 0 0 14px; }
.panel-lede { color: var(--ink-2); font-size: .9375rem; margin: -6px 0 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head .panel-title { margin: 0; }
.sub-title { font-size: 1rem; margin: 0 0 4px; }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-2); }
.empty-title { font-weight: 700; color: var(--ink); font-size: 1.0625rem; margin-bottom: 4px; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt); font-size: .75rem; font-weight: 700; vertical-align: middle; }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-muted { background: var(--surface-2); color: var(--ink-3); }

/* ---------- editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.welcome { margin: 0 0 20px; padding: 22px; border-radius: var(--radius-l); background: var(--butter); color: #1E1B3A; }
.welcome h1 { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; margin: 0 0 6px; overflow-wrap: anywhere; }
.welcome p { margin: 0; }
.profile-edit { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: start; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.avatar-btn { position: relative; width: 104px; height: 104px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--surface-2); }
.avatar-btn img, .avatar-empty { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: var(--ink-3); }
.avatar-empty .ic, .avatar-empty svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.avatar-cam { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--butter); color: #1E1B3A; border: 3px solid var(--surface); }
.avatar-cam .ic { width: 16px; height: 16px; }
.profile-fields { display: flex; flex-direction: column; gap: 14px; }
.socials-edit { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--line); }
.social-rows { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.social-row { display: flex; align-items: center; gap: 8px; }
.social-row input { flex: 1; min-width: 0; }
.social-row.has-error input { border-color: var(--bad); }
.social-error { margin-top: -4px; padding-left: 74px; }
.net-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.net-icon svg { width: 20px; height: 20px; }
.net-icon svg.si { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drag { display: grid; place-items: center; width: 26px; height: 38px; color: var(--ink-3); cursor: grab; flex: none; touch-action: none; }
.drag svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.social-add select { max-width: 280px; }

.add-wrap { position: relative; }
.add-menu {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  margin: 0 0 16px; padding: 10px; border-radius: var(--radius); background: var(--surface-2); border: 2px solid var(--line);
}
.add-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px; text-align: left;
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink);
}
.add-item:hover { border-color: var(--cobalt); }
.add-group { grid-column: 1 / -1; margin: 6px 2px -2px; font-size: .8125rem; font-weight: 700; color: var(--ink-3); }
.add-group:first-child { margin-top: 0; }
.add-item .ic { flex: none; width: 32px; height: 32px; padding: 6px; border-radius: 9px; color: var(--cobalt); background: var(--cobalt-soft); }
/* one colour per group, the same in the block list below */
.add-item.g-media .ic, .block-type.g-media { color: var(--pink); background: var(--pink-bg); }
.add-item.g-sell .ic, .block-type.g-sell { color: var(--warn); background: var(--warn-bg); }
.add-item.g-info .ic, .block-type.g-info { color: var(--ok); background: var(--ok-bg); }
.add-item span { display: flex; flex-direction: column; line-height: 1.3; }
.add-item small { color: var(--ink-3); font-size: .8125rem; }

.tabs-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.tab-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 5px 14px;
  border-radius: 999px; border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 700; font-size: .9375rem; cursor: pointer;
}
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-edit { padding: 2px 4px 2px 8px; cursor: default; }
.chip-input { min-height: 30px !important; width: 140px !important; padding: 2px 8px !important; border-width: 1px !important; }

.block-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.block { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); }
.block.is-hidden .block-head { opacity: .62; }
.block.is-incomplete { border-color: var(--warn); border-style: dashed; }
.block.is-ghost { opacity: .4; }
.block-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; }
.block-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 6px;
  background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); border-radius: 10px;
}
.block-type { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--cobalt-soft); color: var(--cobalt); }
.block-type svg, .block-chev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.block-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.block-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.block-badges span { font-size: .75rem; font-weight: 700; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); }
.block-badges .badge-warn { background: var(--warn-bg); color: var(--warn); }
.block-badges .badge-info { background: var(--cobalt-soft); color: var(--cobalt); }
.block-badges .badge-star { background: var(--butter); color: #1E1B3A; }
.block-badges .badge-tab { background: var(--ok-bg); color: var(--ok); }
.block-badges:empty { display: none; }
.block-chev { margin-left: auto; color: var(--ink-3); transition: transform .2s; }
.block-toggle[aria-expanded="true"] .block-chev { transform: rotate(180deg); }
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 28px; margin: 0; cursor: pointer; }
.switch-ui { width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; transition: background-color .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + .switch-ui { background: var(--ok); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--focus); }
.block-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; border-top: 2px solid var(--line); padding-top: 16px; }
/* fields that belong to one choice only, e.g. products from the shop or entered by hand */
.block-body [data-when][hidden], .block-body .field-void { display: none !important; }
/* products from the shop: status and loading */
.shop-state { gap: 8px; }
.shop-box { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 2px solid var(--line); }
.shop-box.is-ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.shop-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); background: var(--line); }
.shop-ic svg { width: 20px; height: 20px; }
.shop-box.is-ok .shop-ic { color: var(--ok); background: var(--ok-bg); }
.shop-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.shop-txt strong { font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.shop-txt small { color: var(--ink-3); font-size: .8125rem; }
.shop-box .btn { flex: none; }
@media (max-width: 480px) {
  .shop-box { flex-wrap: wrap; }
  .shop-box .btn { width: 100%; justify-content: center; }
}
.field-narrow input { max-width: 120px; }
.field-check { margin-top: -4px; }
.img-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.img-field img { max-height: 96px; border-radius: 10px; }
.img-field img.thumb { width: 48px; height: 48px; object-fit: cover; }
.list-field .list-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: item; }
.list-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.list-item > .field { grid-column: 1; }
.list-item > .icon-btn { grid-column: 2; grid-row: 1; }
/* dates: date and name side by side, place and note below, the ticket link across */
.list-events .list-item { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; }
.list-events .list-item > .field:nth-child(1) { grid-column: 1; grid-row: 1; }
.list-events .list-item > .field:nth-child(2) { grid-column: 2; grid-row: 1; }
.list-events .list-item > .field:nth-child(3) { grid-column: 1; grid-row: 2; }
.list-events .list-item > .field:nth-child(5) { grid-column: 2; grid-row: 2; }
.list-events .list-item > .field:nth-child(4) { grid-column: 1 / 3; grid-row: 3; }
.list-events .list-item > .icon-btn { grid-column: 3; grid-row: 1; align-self: end; }
/* folder links: title and address side by side */
.list-folder .list-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.list-folder .list-item > .field:nth-child(2) { grid-column: 2; grid-row: 1; }
.list-folder .list-item > .icon-btn { grid-column: 3; align-self: end; }
@media (max-width: 480px) {
  .list-events .list-item, .list-folder .list-item { grid-template-columns: minmax(0, 1fr) auto; }
  .list-events .list-item > .field:nth-child(n), .list-folder .list-item > .field:nth-child(n) { grid-column: 1; grid-row: auto; }
  .list-events .list-item > .icon-btn, .list-folder .list-item > .icon-btn { grid-column: 2; grid-row: 1; align-self: start; }
}
.list-item .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.block-extra { border-top: 2px dashed var(--line); padding-top: 10px; }
.block-extra summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: .9375rem; }
.block-extra summary svg, .link-btn svg, .ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico { display: inline-flex; }
.extra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.extra-grid .wide { grid-column: 1 / -1; }
.block-actions { display: flex; gap: 18px; justify-content: flex-end; }
.gal-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gal-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.gal-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.gal-fields { display: flex; flex-direction: column; gap: 6px; }
.gal-fields input { min-height: 38px !important; padding: 6px 10px !important; font-size: .9375rem !important; }
/* products: name and price side by side, the link below */
.gal-products .gal-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 7.5rem); }
.gal-products .gal-fields > :nth-child(3) { grid-column: 1 / -1; }
.file-name { font-weight: 700; font-size: .9375rem; }
.add-menu { max-height: min(520px, 70vh); overflow-y: auto; }
.import-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; }
.import-form .check, .import-form .field-hint { grid-column: 1 / -1; }

/* preview */
.editor-preview { position: sticky; top: 72px; }
.preview-sticky { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone-preview { max-width: 330px; padding: 9px; }
.phone-preview iframe { display: block; width: 100%; height: min(660px, calc(100vh - 170px)); border: 0; border-radius: 28px; background: #fff; }
.preview-open { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.preview-fab { display: none; }

.save-state {
  position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translate(-50%, 16px);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9375rem;
  background: var(--ink); color: var(--paper); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; max-width: calc(100vw - 32px);
}
.save-state.is-visible { opacity: 1; transform: translate(-50%, 0); }
.save-state.is-error { background: var(--bad); color: #fff; }
.save-state.is-saved::before { content: "✓ "; }

/* ---------- design ---------- */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.preset { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset-screen { display: block; width: 100%; height: 150px; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); transition: transform .1s; }
.preset-screen .bb-profile { display: flex; flex-direction: column; align-items: center; padding: 18px 10px; }
.preset-screen .bb-avatar { width: 34px; height: 34px; font-size: 15px; margin: 0 0 10px; }
.preset-screen .bb-blocks { width: 100%; gap: 6px; }
.preset-screen .bb-btn { min-height: 26px; padding: 3px 6px; font-size: .6875rem; border-width: 1.5px; }
.preset input:checked + .preset-screen { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.preset input:focus-visible + .preset-screen { box-shadow: var(--focus); }
.preset:hover .preset-screen { transform: translateY(-2px); }
.preset-name { font-weight: 700; font-size: .875rem; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line); margin-bottom: 16px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: .9375rem; color: var(--ink-2); }
.segmented input:checked + span { background: var(--ink); color: var(--paper); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }
@media (max-width: 600px) {
  /* phones: options sit in an even grid instead of a pill that breaks into ragged rows */
  .segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); border-radius: 18px; }
  .segmented span { text-align: center; padding: 8px 10px; border-radius: 13px; }
}
.design-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; margin-bottom: 16px; }
.design-row:last-child { margin-bottom: 0; }
.color-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .875rem; }
.color-field input[type="color"] { width: 64px; height: 44px; padding: 3px; border: 2px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; }
.field-color { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; flex-wrap: wrap; }
.field-color .check { align-items: center; font-weight: 700 !important; }
.field-color input[type="color"] { width: 64px; height: 40px; padding: 3px; border: 2px solid var(--line-2); border-radius: 12px; background: var(--surface); cursor: pointer; }
.field-color input[type="color"]:disabled { opacity: .35; cursor: not-allowed; }
.range-field { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: .875rem; min-width: 200px; flex: 1 1 200px; }
.range-field output { color: var(--ink-3); font-weight: 400; }
.range-field input { accent-color: var(--cobalt); width: 100%; }
.bg-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bg-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }
.btn-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-bottom: 18px; }
.btn-style { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; background: var(--surface-2); }
.btn-style input { position: absolute; opacity: 0; }
.btn-style:has(input:checked) { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.btn-style:has(input:focus-visible) { box-shadow: var(--focus); }
.bs-sample { width: 80%; height: 26px; border-radius: 999px; }
.bs-fill { background: var(--ink); }
.bs-outline { border: 2px solid var(--ink); }
.bs-glass { background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.35)); border: 1px solid var(--line-2); box-shadow: 0 2px 8px rgba(30, 27, 58, .12); }
.bs-raised { background: linear-gradient(180deg, #8A93FF, #3245FF); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 6px rgba(30, 27, 58, .25); }
.bs-inset { background: var(--line); box-shadow: inset 0 3px 6px rgba(30, 27, 58, .25), inset 0 -1px 1px rgba(255,255,255,.6); }
[data-theme="dark"] .bs-glass { background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,.12)); }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 700; font-size: .875rem; text-align: center; }
.choice input { position: absolute; opacity: 0; }
.choice svg { width: 64px; height: 56px; fill: var(--ink-2); }
.choice:has(input:checked) { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.choice:has(input:checked) svg { fill: var(--cobalt); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 4px; }
.choice-small { padding: 8px 6px; font-size: .8125rem; }
.swatch { display: block; width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line); }
.design-row .grow { flex: 1 1 220px; display: flex; }
.design-row .grow .range-field { flex: 1; }
.design-row .field { flex: 0 1 auto; }
@media (max-width: 600px) { .design-row .field { flex: 1 1 100%; } }
.design-row .field .segmented { margin-bottom: 0; }
.design-row:has(.color-field) .range-field input { height: 44px; margin: 0; }
.panel .sub-title { margin-top: 20px; margin-bottom: 10px; }
.panel .check + [data-show-avatar] { margin-top: 12px; }
.preset-screen, .look-screen { position: relative; }
.preset-screen .bb-profile, .look-screen .bb-profile { position: relative; }
.pv-banner { position: absolute; left: 0; right: 0; top: 0; height: 58px; background: var(--banner); border-radius: 0 0 40% 40% / 0 0 22px 22px; }
.look-screen .pv-banner { height: 64px; }
.preset-screen .pv-hero .bb-avatar { width: 100%; height: 52px; border-radius: 10px; }
.look-screen .pv-hero .bb-avatar { width: 100%; height: 86px; border-radius: 12px; }
.preset-screen .pv-side .bb-avatar { margin: 0 auto 10px 6px; }
.look-screen .pv-side { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left; }
.look-screen .pv-side .bb-avatar, .look-screen .pv-side .bb-name { margin: 0; }
.look-screen .pv-side .bb-blocks { grid-column: 1 / -1; margin-top: 16px; }
.look { content-visibility: auto; contain-intrinsic-size: auto 168px auto 300px; }
.bs-name { font-weight: 700; font-size: .875rem; }
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.font-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; background: var(--surface-2); }
.font-opt input { position: absolute; opacity: 0; }
.font-opt:has(input:checked) { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.font-opt:has(input:focus-visible) { box-shadow: var(--focus); }
.font-sample { font-size: 1.75rem; line-height: 1.2; }
.font-name { font-size: .8125rem; color: var(--ink-3); font-weight: 700; }

/* ---------- statistics ---------- */
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stats-head .page-title { margin: 6px 0 0; }
.range { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); margin-bottom: 18px; }
.stats-head .range { margin-bottom: 0; }
.range a { padding: 6px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9375rem; }
.range a[aria-current] { background: var(--ink); color: var(--paper); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-label { color: var(--ink-2); font-weight: 700; font-size: .875rem; }
.tile-num { font-family: var(--display); font-size: 1.85rem; letter-spacing: -.03em; line-height: 1.2; }
.tile-delta { color: var(--ink-3); font-size: .8125rem; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-head .panel-title { margin: 0; }
.legend { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; font-size: .875rem; color: var(--ink-2); font-weight: 700; }
.legend li { display: flex; align-items: center; gap: 8px; }
.key { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.key-1 { background: var(--chart-1); }
.key-2 { background: var(--chart-2); }
.chart {
  position: relative; outline: none; touch-action: pan-y;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 240px auto; column-gap: 10px;
}
.chart:focus-visible { box-shadow: var(--focus); border-radius: 12px; }
.y-axis { grid-area: 1 / 1; position: relative; width: var(--yw, 3ch); font-size: .75rem; }
.y-axis span { position: absolute; right: 0; top: var(--y); transform: translateY(-50%); color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1; }
.plot { grid-area: 1 / 2; position: relative; }
.plot svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .area-1 { fill: var(--chart-1); opacity: .1; }
.chart .line-1, .chart .line-2 { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .line-1 { stroke: var(--chart-1); }
.chart .line-2 { stroke: var(--chart-2); }
.chart .crosshair { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.dot {
  position: absolute; left: var(--x); top: var(--y); width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; border: 2px solid var(--surface); pointer-events: none;
}
.dot-1 { background: var(--chart-1); }
.dot-2 { background: var(--chart-2); }
.chart:hover .dot.is-end, .chart:focus-visible .dot.is-end { opacity: 0; }
.end-labels { grid-area: 1 / 3; position: relative; width: 8.5em; font-size: .8125rem; }
.end-labels span { position: absolute; left: 0; top: var(--y); transform: translateY(-50%); display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-2); font-weight: 700; line-height: 1; }
.end-labels .key { width: 12px; }
.x-axis { grid-area: 2 / 2; position: relative; height: 22px; margin-top: 6px; }
.x-axis span { position: absolute; left: var(--x); transform: translateX(-50%); font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
.x-axis span:not([data-w]) { display: none; }
.x-axis .is-first { transform: none; }
.x-axis .is-last { transform: translateX(-100%); }
.tip {
  position: absolute; top: 4px; transform: translateX(14px); z-index: 2; min-width: 150px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); pointer-events: none; font-size: .875rem;
}
.tip.is-left { transform: translateX(calc(-100% - 14px)); }
.tip-day { color: var(--ink-3); margin-bottom: 4px; font-size: .8125rem; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row strong { font-size: 1rem; }
.tip-row span:last-child { color: var(--ink-2); }
.tip-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.empty-chart { color: var(--ink-3); margin: 0 0 8px; }
.table-view summary { cursor: pointer; font-weight: 700; color: var(--cobalt); font-size: .9375rem; margin-top: 8px; }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9375rem; }
.table-view th, .table-view td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table-view th:first-child { text-align: left; }
.stats-grid { columns: 2; column-gap: 20px; }
.stats-grid > .panel { break-inside: avoid; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label val" "track track"; gap: 4px 12px; align-items: baseline; }
.bar-label { grid-area: label; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: .9375rem; }
.bar-val { grid-area: val; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9375rem; }
.bar-track { grid-area: track; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar { display: block; height: 100%; width: var(--w); background: var(--chart-1); border-radius: 0 4px 4px 0; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-3); font-size: .875rem; margin-top: 6px; }

/* ---------- inbox / reports ---------- */
.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-l); padding: 18px; }
.msg.is-new { border-color: var(--butter-deep); }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 8px; }
.msg-head time { color: var(--ink-3); font-size: .875rem; margin-left: auto; }
.msg-body { white-space: normal; overflow-wrap: anywhere; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.msg-actions form { margin: 0; }

/* ---------- share ---------- */
.copy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.copy-url { font-family: var(--display); font-size: 1.15rem; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); overflow-wrap: anywhere; }
.qr-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: center; }
.qr { width: 200px; height: 200px; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.og-preview { width: 100%; height: auto; border-radius: 16px; border: 2px solid var(--line); display: block; }

/* ---------- settings ---------- */
.sub-panel { border-top: 2px solid var(--line); padding-top: 14px; margin-top: 16px; }
.sub-panel summary { cursor: pointer; font-weight: 700; }
.sub-panel .form { margin-top: 14px; }
.inline-form { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.inline-form > .btn { align-self: flex-end; margin-bottom: 4px; }
.inline-form .field { flex: 0 1 240px; }
.page-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.page-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
.page-list form { margin: 0; }
.danger-zone { border-color: var(--bad-bg); }
.danger-zone .form + .form { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--line); }
fieldset.field { gap: 10px; }
.redirect-box { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); }
.redirect-box > legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; }
.redirect-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 560px) { .redirect-fields { grid-template-columns: minmax(0, 1fr); } }
.redirect-box:not(:has([name="redirect_on"]:checked)) .redirect-fields { display: none; }
.subs-panel { margin-top: 24px; }
.subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.subs li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.subs li:last-child { border-bottom: 0; }
.subs li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.subs time { color: var(--ink-3); font-size: .875rem; }

/* ---------- admin ---------- */
.page-admin { background: var(--paper); }
.admin-top { background: var(--surface); border-bottom: 2px solid var(--line); padding: 12px 0; margin-bottom: 24px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; }
.admin-nav a[aria-current] { background: var(--ink); color: var(--paper); }
.admin-main { padding-bottom: 48px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; font-size: .9375rem; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--ink-3); font-size: .8125rem; }
.admin-page { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-page form, .admin-actions form { margin: 0; display: inline; }
.admin-actions { white-space: nowrap; }
.admin-actions form + form { margin-left: 6px; }
.admin-search { display: flex; gap: 10px; max-width: 520px; margin-bottom: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-preview {
    display: none; position: fixed; inset: 0; z-index: 40; padding: 16px 16px 84px;
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    align-items: center; justify-content: center;
  }
  .show-preview .editor-preview { display: flex; }
  .show-preview { overflow: hidden; }
  .phone-preview iframe { height: min(640px, calc(100vh - 190px)); height: min(640px, calc(100dvh - 190px)); }
  .preview-fab { display: inline-flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 45; box-shadow: 0 3px 0 var(--butter-deep), 0 8px 24px rgba(30, 27, 58, .18); }
  .btn-small.btn-press.preview-fab:active { transform: translate(-50%, 3px); box-shadow: 0 0 0 var(--butter-deep); }
  .show-preview .preview-fab { bottom: 20px; }
  .fab-open, .fab-close { display: inline-flex; align-items: center; gap: 8px; }
  .fab-close, .show-preview .fab-open { display: none; }
  .show-preview .fab-close { display: inline-flex; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; }
  .hero-demo .phone { width: 272px; }
  .hero-demo .phone-l { transform: translate(-44%, 46px) rotate(-7deg) scale(.78); }
  .hero-demo .phone-r { transform: translate(44%, 46px) rotate(7deg) scale(.78); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-demo .phone { width: 280px; }
  .hero-demo .phone-l { transform: translate(-64%, 40px) rotate(-8deg) scale(.82); }
  .hero-demo .phone-r { transform: translate(64%, 40px) rotate(8deg) scale(.82); }
  .phone-screen { height: 540px; }
  .spec-row { grid-template-columns: minmax(0, 1fr); }
  .honest-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-links, .footer-copy { justify-self: start; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app::before, .app-side { display: none; }
  .m-menu { display: block; margin-right: auto; }
  .app-top { justify-content: space-between; padding: 10px 16px; }
  .app-content { padding: 6px 16px 104px; }
  .dash-editor .app-content, .dash-design .app-content { padding-bottom: 150px; }
  .app-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 2px solid var(--line);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  }
  .app-tabbar a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 1px; border-radius: 12px; color: var(--ink-3); text-decoration: none; font-size: .6875rem; font-weight: 700; }
  .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-ic { position: relative; display: inline-flex; }
  .tab-dot { position: absolute; top: -2px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--butter); box-shadow: 0 0 0 2px var(--surface); }
  .app-tabbar a[aria-current="page"] { color: var(--cobalt); background: var(--cobalt-soft); }
  .stats-grid { columns: 1; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .save-state { bottom: 90px; }
  .end-labels { display: none; }
  .x-axis span[data-w] { display: none; }
  .x-axis span[data-n] { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .header-nav .header-signup { display: none; }
  .sponsor { font-size: .8125rem; }
  .sponsor-item { flex-wrap: nowrap; justify-content: flex-start; gap: 8px; padding: 7px 18px; text-align: left; }
  .sponsor-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sponsor-tag, .sponsor-name, .sponsor-logo { flex: none; }
  .sponsor-cta { display: none; }
  .hero { padding-top: 12px; }
  .panel { padding: 18px 16px; border-radius: 18px; }
  .profile-edit { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .profile-fields { width: 100%; }
  .add-menu { grid-template-columns: minmax(0, 1fr); }
  .tiles { gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile-num { font-size: 1.45rem; }
  .qr-row { grid-template-columns: minmax(0, 1fr); }
  .import-form { grid-template-columns: minmax(0, 1fr); }
  .social-error { padding-left: 0; }
  .admin-table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* settings: pictures, check mark */
.pic-setting legend { font-weight: 700; margin-bottom: 8px; }
.pic-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pic-share { width: 200px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); }
.pic-logo { max-width: 160px; max-height: 64px; padding: 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); }
.pic-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { box-shadow: var(--focus); }
.verify-state { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; }
.verify-state .ic { color: var(--ink-3); }
.verify-state.is-on .ic { color: var(--cobalt); }
.hours-grid { display: grid; grid-template-columns: max-content minmax(0, 24rem); gap: 6px 12px; align-items: center; }
.hours-grid label { font-size: .875rem; font-weight: 700; }
.qr-options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 4px 0 8px; }
.qr-opt { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.qr-opt input[type="color"] { width: 52px; height: 36px; padding: 2px; border: 2px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; }

/* admin: actions in one row */
.row-actions { white-space: nowrap; }
.row-actions > form { display: inline-flex; vertical-align: middle; margin-left: 12px; }
.row-actions > form:first-child { margin-left: 0; }

/* settings: legal notice and privacy notice */
.legal-form .segmented { align-self: flex-start; margin-bottom: 4px; }
.legal-part[hidden] { display: none !important; }
div.legal-part { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 2px solid var(--line); }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.legal-grid .wide { grid-column: 1 / -1; }
.legal-hint { margin-bottom: 18px; }
@media (max-width: 560px) {
  .legal-form .segmented { align-self: stretch; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  div.legal-part { padding: 12px; }
}
