/* Bizz Cards — web profile + landing. Soft UI / neumorphism (docs/BACKEND.md §4/§6).
   One background colour for everything; every surface is shaped only by two soft
   shadows: a highlight from the top-left and a shade to the bottom-right. Pressed
   states use the same two colours as inset shadows.
   Colours are CSS custom properties; profile.js overwrites them per card
   (theme.js). The defaults below are the sage palette. */

:root {
  --bg: #ECEEF1;
  --surface: #ECEEF1;
  --text: #1F2328;
  --text-2: #6B7280;
  --text-3: #9AA1AD;
  --icon: #3A3F47;
  --shade: #C5CAD3;
  --highlight: #FFFFFF;
  --hairline: rgb(197 202 211 / 0.6);
  --qr-bg: #F5F6F8;
  --accent: #5E8F74;
  --accent-2: #9CC7AF;
  --tint: #D0DBD8;
  --accent-text: #476A57;
  --accent-ink: #436553;
  --on-accent: #FFFFFF;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 34px;
  --radius-row: 22px;
  --gutter: 16px;
  --avatar: clamp(80px, 24vw, 104px);
  --qr-w: clamp(88px, 26vw, 112px);
  --notch: 16px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #23262C;
    --surface: #23262C;
    --text: #ECEEF1;
    --text-2: #A1A7B3;
    --text-3: #6E7480;
    --icon: #C9CED6;
    --shade: #15171B;
    --highlight: #2F333B;
    --hairline: rgb(0 0 0 / 0.35);
    --qr-bg: #E9EBEE;
    --tint: #344340;
    --accent-text: #8EB19E;
    --accent-ink: #94B5A3;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #23262C;
  --surface: #23262C;
  --text: #ECEEF1;
  --text-2: #A1A7B3;
  --text-3: #6E7480;
  --icon: #C9CED6;
  --shade: #15171B;
  --highlight: #2F333B;
  --hairline: rgb(0 0 0 / 0.35);
  --qr-bg: #E9EBEE;
  --tint: #344340;
  --accent-text: #8EB19E;
  --accent-ink: #94B5A3;
  color-scheme: dark;
}

/* Depth scale (1 = the card: 6px 6px 18px). Declared on every element so the shadows always
   follow the current theme colours. */
* {
  --raised: 6px 6px 18px var(--shade), -6px -6px 18px var(--highlight);
  --raised-md: 4.5px 4.5px 13px var(--shade), -4.5px -4.5px 13px var(--highlight);
  --raised-sm: 3.5px 3.5px 10px var(--shade), -3.5px -3.5px 10px var(--highlight);
  --raised-xs: 2.5px 2.5px 7px var(--shade), -2.5px -2.5px 7px var(--highlight);
  --raised-tint:
    3px 3px 8px color-mix(in srgb, var(--shade) 70%, transparent),
    -3px -3px 8px color-mix(in srgb, var(--highlight) 70%, transparent);
  --pressed: inset 3px 3px 7px var(--shade), inset -3px -3px 7px var(--highlight);
  --pressed-sm: inset 2px 2px 5px var(--shade), inset -2px -2px 5px var(--highlight);
}

/* ---------------------------------------------------------------- base */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i--fill { fill: currentColor; stroke: none; }

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- layout */

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    calc(28px + env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

.page > * { width: 100%; max-width: 480px; }

@media (max-width: 420px) {
  :root { --gutter: 12px; }
}

@media (min-width: 720px) {
  .page { padding-top: 48px; gap: 30px; }
}

/* Generic raised surface (landing, notices). */
.soft {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--raised);
}

/* ---------------------------------------------------------------- card */

/* The card's two shadows are drawn by its pseudo-elements with drop-shadow filters, so they
   follow the ticket notches (a box-shadow would ignore them). Highlight below, shade on top —
   the same stacking as `box-shadow: shade, highlight`. */
.card {
  --stub-y: calc(100% - var(--stub-h, 156px));
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  padding-bottom: 22px;
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--bg);
  pointer-events: none;
}
.card::before { filter: drop-shadow(-6px -6px 9px var(--highlight)); }
.card::after { filter: drop-shadow(6px 6px 9px var(--shade)); }
.card--ticket { padding-bottom: 0; }
.card--ticket::before,
.card--ticket::after {
  background:
    radial-gradient(circle var(--notch) at 0 var(--stub-y), #0000 calc(100% - 0.5px), var(--bg) 100%) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--stub-y), #0000 calc(100% - 0.5px), var(--bg) 100%) right / 51% 100% no-repeat;
}

/* Header photo inset in the card, with the avatar and badge overlapping its bottom edge. */
.hero { position: relative; padding: 14px; }

.banner {
  position: relative;
  aspect-ratio: 2.3; /* matches ProfileHeader.aspectRatio in the app */
  border-radius: 26px;
  overflow: hidden;
  background: var(--tint);
}
.banner > img,
.banner > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner::after { /* soft inner shadow so the photo sits just inside the surface */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 2px 2px 7px rgb(0 0 0 / 0.16), inset 0 0 1.5px rgb(0 0 0 / 0.08);
  pointer-events: none;
}
.banner--solid { background: var(--tint); }
.banner--pattern {
  background:
    radial-gradient(circle at 7.5px 7.5px, color-mix(in srgb, var(--accent) 35%, transparent) 1.5px, transparent 1.9px) 0 0 / 14px 28px,
    radial-gradient(circle at 7.5px 7.5px, color-mix(in srgb, var(--accent) 35%, transparent) 1.5px, transparent 1.9px) 7px 14px / 14px 28px,
    var(--tint);
}
.banner--mesh {
  background:
    radial-gradient(38% 70% at 60% 45%, color-mix(in srgb, var(--accent) 40%, #FFFFFF), transparent 100%),
    radial-gradient(45% 85% at 100% 52%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 100%),
    radial-gradient(45% 90% at 0% 100%, color-mix(in srgb, var(--accent) 80%, transparent), transparent 100%),
    radial-gradient(40% 80% at 50% 0%, var(--accent-2), transparent 100%),
    radial-gradient(35% 80% at 0% 50%, var(--accent-2), transparent 100%),
    radial-gradient(40% 80% at 50% 100%, var(--accent-2), transparent 100%),
    var(--tint);
}

.avatar-ring {
  position: absolute;
  z-index: 1;
  left: 28px;
  bottom: calc(14px - var(--avatar) * 0.42);
  width: calc(var(--avatar) + 14px);
  height: calc(var(--avatar) + 14px);
  padding: 7px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 5px 5px 14px var(--shade), -5px -5px 14px var(--highlight);
}
.avatar-ring.squircle { border-radius: calc(var(--avatar) * 0.3 + 7px); }
.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tint);
}
.avatar-ring.squircle .avatar { border-radius: calc(var(--avatar) * 0.3); }
.avatar--initials {
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: calc(var(--avatar) * 0.34);
  letter-spacing: -0.01em;
}

.badge {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: -4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - var(--avatar) - 80px);
  padding: 8px 15px 8px 13px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: var(--raised-tint);
}
.badge > span { overflow: hidden; text-overflow: ellipsis; }
.badge svg.i { width: 15px; height: 15px; stroke-width: 2.3; }
.badge--compact {
  position: static;
  align-self: flex-start;
  max-width: 100%;
  margin: 2px 0 2px;
  padding: 5px 11px 5px 9px;
  font-size: 12.5px;
}
.badge--compact svg.i { width: 13px; height: 13px; }

/* design.qr = "badge": the QR tile takes the badge's corner. */
.qr-badge {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: -36px;
  width: 86px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.qr-badge .qr-tile { padding: 9px; border-radius: 20px; }

/* Identity */
.who {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: calc(var(--avatar) * 0.42 + 6px) 24px 0;
}
.who h1 {
  font-size: clamp(25px, 8vw, 30px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.who .verified { display: inline-block; margin-right: 2px; }
.who .verified svg.i { width: 0.62em; height: 0.62em; stroke-width: 2.6; vertical-align: 0.02em; }
.pronouns {
  display: inline-block;
  font-size: 0.66em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-2);
  white-space: nowrap;
}
.role {
  font-size: 19px;
  line-height: 1.3;
  color: var(--text-2);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.headline {
  font-size: 17px;
  line-height: 1.35;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  min-width: 0;
  font-size: 17px;
  color: var(--text-2);
}
.meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta svg.pin { width: 15px; height: 19px; stroke-width: 1.5; }

/* ---------------------------------------------------------------- buttons */

.cta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 196px), 1fr));
  gap: 14px;
  padding: 22px 14px 0;
}
.cta--single { grid-template-columns: 1fr; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--raised-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn svg.i { width: 18px; height: 18px; color: var(--icon); }
.btn:active { transform: scale(0.985); box-shadow: var(--pressed); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
/* Primary: a flat, solid accent pill with the same soft shadows (no gradient). */
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary svg.i { color: currentColor; }
.btn--primary:active {
  box-shadow:
    inset 3px 3px 7px color-mix(in srgb, var(--accent) 60%, #000000),
    inset -3px -3px 7px color-mix(in srgb, var(--accent) 70%, #FFFFFF);
}
.btn--ghost { background: transparent; box-shadow: none; color: var(--accent-ink); }
.btn--ghost:active { box-shadow: var(--pressed); }
.btn--sm { min-height: 40px; padding: 0 15px; font-size: 14px; font-weight: 550; }
.btn--sm svg.i { width: 16px; height: 16px; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- sections */

.sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 0;
}
.card--ticket .sections { padding-bottom: 26px; }
.card--ticket .cta + .stub { margin-top: 26px; } /* no visible sections */

/* Contact: raised circular buttons that scroll sideways, with a capsule indicator. */
.contact { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.contact-track { display: flex; align-items: center; gap: 2px; width: 100%; }
.contact-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 14px;
  margin: -2px -4px;
  padding: 14px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.contact-scroll::-webkit-scrollbar { display: none; }
.cbtn {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--icon);
  text-decoration: none;
  box-shadow: var(--raised-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}
.cbtn svg.i { width: 20px; height: 20px; }
.cbtn svg.i--fill { width: 21px; height: 21px; }
.cbtn:active { transform: scale(0.96); box-shadow: var(--pressed); }
.mono { font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.mono--2 { font-size: 15px; letter-spacing: -0.01em; }

.contact-more {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.contact-more svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.contact.at-end .contact-more { opacity: 0; pointer-events: none; }

.thumb {
  position: relative;
  width: 96px;
  height: 5px;
  border-radius: 999px;
  box-shadow: inset 1px 1px 2px var(--shade), inset -1px -1px 2px var(--highlight);
}
.thumb::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--thumb-w, 32px);
  border-radius: inherit;
  background: var(--text-3);
  transform: translateX(var(--thumb-x, 0px));
}
.contact.fits .contact-more,
.contact.fits .thumb { display: none; }

/* Bento rows: raised row, raised square icon tile, semibold title, content. */
.bento {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-row);
  background: var(--bg);
  box-shadow: var(--raised-md);
}
.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--icon);
  box-shadow: 3px 3px 9px var(--shade), -3px -3px 9px var(--highlight);
}
.tile svg.i { width: 19px; height: 19px; }
.bento-body { flex: 1; min-width: 0; }
.bento-title { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--text); }
/* Pills share the title's line when they all fit; otherwise they wrap underneath it. */
.bento-body--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.bento-body--inline .bento-title { flex: none; min-width: 82px; }
.about {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.about.clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  white-space: normal; /* paragraph breaks return when expanded */
}
.more {
  margin-top: 4px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.more[hidden] { display: none; }

.pills { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.pills > li { display: flex; min-width: 0; max-width: 100%; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--raised-xs);
  -webkit-tap-highlight-color: transparent;
}
.pill > span:not(.dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pill--accent { background: var(--tint); color: var(--accent-ink); box-shadow: var(--raised-tint); }
.pill .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill svg.i { width: 13px; height: 13px; stroke-width: 2.2; }
a.pill { transition: box-shadow 0.16s ease; }
a.pill:active { box-shadow: var(--pressed-sm); }

/* ---------------------------------------------------------------- QR */

.qr-open {
  display: block;
  flex: none;
  width: var(--qr-w);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.qr-open:active .qr-tile,
.qr-badge:active .qr-tile { box-shadow: var(--pressed); }

.qr-tile {
  aspect-ratio: 1;
  width: 100%;
  padding: 12px;
  border-radius: 22px;
  background: var(--qr-bg);
  box-shadow: var(--raised-sm);
  transition: box-shadow 0.16s ease;
}
.qr-tile svg { display: block; width: 100%; height: 100%; image-rendering: pixelated; }

.qr-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.qc-title { font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--text); }
.qc-sub { font-size: 15px; line-height: 1.3; color: var(--text-2); }
.nfc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 4px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: var(--raised-xs);
}
.nfc svg.i { width: 16px; height: 16px; stroke-width: 1.8; }

/* design.qr = "ticket": tear-off stub below a dotted perforation, notched into the card edges. */
.stub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 156px;
  padding: 22px 24px;
}
.stub::before {
  content: "";
  position: absolute;
  top: -1.5px;
  left: 28px;
  right: 28px;
  height: 3px;
  background: radial-gradient(circle, var(--shade) 1.2px, transparent 1.6px) 0 50% / 8px 3px repeat-x;
}
.stub-divider { flex: none; align-self: center; width: 1px; height: 84px; background: var(--hairline); }

/* design.qr = "section": the same content in an inset well. */
.qr-well {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 26px;
  box-shadow: var(--pressed);
}

@media (max-width: 420px) {
  .stub { gap: 16px; padding-inline: 20px; }
  .nfc { padding-inline: 12px; }
}

@media (max-width: 379px) {
  .who { padding-inline: 20px; }
  .cta { gap: 12px; }
  .sections { padding-inline: 10px; }
  .bento { gap: 11px; padding: 12px; }
  .pill { padding: 6px 12px; font-size: 14px; }
}

@media (max-width: 374px) {
  .stub { --qr-w: 84px; gap: 12px; padding: 20px 16px; }
  .qr-well { --qr-w: 78px; gap: 12px; padding: 12px; }
  .qr-copy { gap: 5px; }
  .qc-title { font-size: 18px; }
  .qc-sub { font-size: 13px; }
  .nfc { gap: 5px; margin-top: 3px; padding: 7px 10px; font-size: 12px; }
  .nfc svg.i { width: 13px; height: 13px; }
}

/* ---------------------------------------------------------------- footer */

.foot { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.foot-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; }
.foot .made { font-size: 13px; color: var(--text-3); }
.foot .made a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }

/* ---------------------------------------------------------------- states */

.state { padding: 34px 24px 28px; text-align: center; }
.state-art { width: 168px; margin: 0 auto 18px; }
.state h1 { font-size: 23px; font-weight: 600; letter-spacing: -0.015em; }
.state p { margin-top: 8px; color: var(--text-2); }
.state .cta { padding: 22px 0 0; }
.state code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; color: var(--accent-ink); overflow-wrap: anywhere; }

/* not-found / error illustration */
.art-shadow { fill: var(--shade); opacity: 0.7; }
.art-card { fill: var(--bg); stroke: var(--hairline); stroke-width: 2; }
.art-accent { fill: var(--tint); }
.art-line { fill: var(--accent-2); opacity: 0.75; }
.art-line.soft { fill: var(--text-3); opacity: 0.35; }
.art-q { fill: var(--accent); }
.art-q-mark { fill: none; stroke: var(--on-accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- skeleton */

.sk {
  background: color-mix(in srgb, var(--shade) 45%, var(--bg));
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--highlight) 55%, transparent), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton .banner { background: color-mix(in srgb, var(--shade) 45%, var(--bg)); }
.skeleton .banner::after { box-shadow: none; }
.skeleton .avatar { background: color-mix(in srgb, var(--shade) 45%, var(--bg)); }
.skeleton .who { gap: 0; }
.skeleton .contact-scroll { overflow: hidden; }
.skeleton .bento { min-height: 72px; }
.skeleton .qr-tile { background: color-mix(in srgb, var(--shade) 30%, var(--bg)); }
.sk-line { height: 14px; margin-top: 12px; }
.sk-line.big { height: 26px; width: 62%; margin-top: 0; }
.w40 { width: 40%; }
.w55 { width: 55%; }
.w70 { width: 70%; }
.w85 { width: 85%; }
.sk-btn { min-height: 50px; }
.mt0 { margin-top: 0; }

/* ---------------------------------------------------------------- dialog */

dialog.sheet {
  width: min(100% - 24px, 460px);
  max-height: min(100% - 24px, 760px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 28px 70px rgb(0 0 0 / 0.28), var(--raised);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.sheet::backdrop { background: rgb(18 20 24 / 0.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: rise 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.sheet-inner { padding: 22px 20px 20px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sheet-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.sheet-sub { color: var(--text-2); font-size: 14.5px; margin-bottom: 18px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--icon);
  cursor: pointer;
  box-shadow: var(--raised-sm);
  transition: box-shadow 0.16s ease;
}
.icon-btn svg.i { width: 18px; height: 18px; }
.icon-btn:active { box-shadow: var(--pressed); }

.form { display: grid; gap: 14px; }
.form .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field span { font-size: 13px; font-weight: 600; color: var(--text-2); padding-left: 6px; }
.field small { font-weight: 400; color: var(--text-3); }
/* Inputs are inset wells in the surface colour. */
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px; /* ≥16px prevents iOS zoom on focus */
  box-shadow: var(--pressed);
  outline: none;
  transition: box-shadow 0.16s ease;
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.4; }
.field input:focus,
.field textarea:focus { box-shadow: var(--pressed), 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { min-height: 1.2em; color: #C2413F; font-size: 14px; font-weight: 600; }
:root[data-theme="dark"] .form-error { color: #FF8F8A; }
.fine { font-size: 12.5px; color: var(--text-3); text-align: center; }
.form .btn--block { margin-top: 4px; }

.bubble {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--icon);
  box-shadow: var(--raised-sm);
}
.done { text-align: center; padding: 12px 4px 4px; }
.done .bubble { width: 68px; height: 68px; margin: 4px auto 18px; color: var(--accent-ink); }
.done .bubble svg.i { width: 30px; height: 30px; stroke-width: 2.2; }
.done h2 { font-size: 21px; font-weight: 600; }
.done p { margin: 6px 0 20px; color: var(--text-2); }

.qr-dialog-inner { padding: 22px; text-align: center; }
.qr-dialog-inner .qr-tile { max-width: 280px; margin: 10px auto 16px; padding: 16px; }

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.25);
  transform: translate(-50%, 0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast[hidden] { display: block; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }

.noscript { margin: 24px auto; max-width: 480px; padding: 24px; text-align: center; }

/* ---------------------------------------------------------------- landing */

.landing .hero { padding: 30px 24px 26px; text-align: center; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.logo img { width: 36px; height: 36px; border-radius: 9px; }
.landing .hero h1 { margin-top: 22px; font-size: clamp(30px, 8vw, 40px); line-height: 1.07; font-weight: 700; letter-spacing: -0.03em; }
.landing .hero p { margin: 12px auto 0; max-width: 32ch; color: var(--text-2); font-size: 17px; }
.landing .hero .cta { padding: 24px 0 0; }
.demo-card {
  position: relative;
  margin: 28px auto 6px;
  width: min(100%, 300px);
  aspect-ratio: 1.586;
  border-radius: 24px;
  padding: 18px;
  text-align: left;
  color: var(--text);
  background: var(--bg);
  box-shadow: var(--raised);
  transform: rotate(-3deg);
}
.demo-card .dc-name { font-weight: 600; font-size: 20px; }
.demo-card .dc-role { color: var(--text-2); font-size: 14px; }
.demo-card .dc-qr { position: absolute; right: 16px; bottom: 16px; width: 66px; height: 66px; border-radius: 14px; background: var(--qr-bg); padding: 6px; box-shadow: var(--raised-sm); }
.demo-card .dc-dot { width: 44px; height: 44px; border-radius: 50%; background: var(--tint); box-shadow: var(--raised-sm); margin-bottom: 14px; }
.features { display: grid; gap: 18px; }
.feature { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; padding: 18px; border-radius: var(--radius-row); }
.feature h2 { font-size: 16.5px; font-weight: 600; }
.feature p { color: var(--text-2); font-size: 15px; margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
