/* 1AN — One App Network · brand tokens + components */
:root {
  --orange: #FF6B00; --orange-hover: #E85F00; --orange-ink: #B84A00;
  --black: #0A0A0A; --white: #FFFFFF; --mist: #F5F5F5; --hairline: #E6E6E6; --graphite: #6B6B6B; --night: #1A1A1A;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-display: clamp(48px, 7vw, 96px); --text-h1: clamp(40px, 5vw, 64px); --text-h2: clamp(32px, 3.5vw, 44px);
  --text-h3: clamp(22px, 2.2vw, 28px); --text-body-lg: clamp(18px, 1.6vw, 21px);
  --radius-card: 24px; --radius-input: 12px; --radius-pill: 999px;
  --shadow-float: 0 40px 80px rgba(0,0,0,.12);
  --ease: cubic-bezier(0.2, 0, 0, 1); --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --side: 24px; --section: 96px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 768px) { :root { --side: 48px; --section: 128px; } }
@media (min-width: 1200px) { :root { --side: 80px; --section: 160px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }
.display { font-size: var(--text-display); line-height: 1; letter-spacing: -0.03em; }
.h1 { font-size: var(--text-h1); line-height: 1.05; letter-spacing: -0.025em; }
.h2 { font-size: var(--text-h2); line-height: 1.1; letter-spacing: -0.02em; }
.h3 { font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); margin: 0 0 12px; }
.body-lg { font-size: var(--text-body-lg); line-height: 1.5; }
.caption { font-size: 14px; line-height: 1.5; color: var(--graphite); margin: 0; }
.muted { color: var(--graphite); }
.accent { color: var(--orange); }
.center { text-align: center; }
.pre { white-space: pre-line; }
p { margin: 0 0 16px; }

/* layout */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--side); }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 0 var(--side); }
.section { padding: var(--section) 0; }
.section--black { background: var(--black); color: var(--white); }
.section--mist { background: var(--mist); }
.section--black .muted, .section--black .caption { color: #A3A3A3; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 500; line-height: 1; border: 0; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background var(--ease) 150ms, transform var(--ease) 150ms, color 150ms, border-color 150ms; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--orange); color: var(--black); }
.btn--primary:hover { background: var(--orange-hover); }
.btn--secondary { background: transparent; color: var(--black); box-shadow: inset 0 0 0 1.5px var(--black); }
.btn--secondary:hover { background: var(--black); color: var(--white); }
.section--black .btn--secondary, .on-dark .btn--secondary { color: var(--white); box-shadow: inset 0 0 0 1.5px var(--white); }
.section--black .btn--secondary:hover, .on-dark .btn--secondary:hover { background: var(--white); color: var(--black); }
.btn--ghost { background: var(--mist); color: var(--black); }
.btn--ghost:hover { background: var(--hairline); }
.btn--danger { background: transparent; color: #B42318; box-shadow: inset 0 0 0 1.5px #E4B4AF; }
.btn--danger:hover { background: #FEF3F2; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textlink { font-weight: 500; color: var(--orange-ink); display: inline-flex; gap: 6px; align-items: center; }
.textlink span { transition: transform 150ms var(--ease); }
.textlink:hover span { transform: translateX(4px); }
.link { color: var(--black); font-weight: 500; font-size: 15px; }

/* brand + top bar */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--black); text-decoration: none !important; }
.brand svg { width: 32px; height: 32px; }
.brand span { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: 19px; }
.brand--light { color: var(--white); }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent; transition: transform 300ms var(--ease), border-color 300ms; }
.topbar.is-scrolled { border-bottom-color: var(--hairline); }
.topbar.is-hidden { transform: translateY(-100%); }
.topbar--dark { background: rgba(10,10,10,.85); color: var(--white); }
.topbar--dark .brand, .topbar--dark .link, .topbar--dark .nav a { color: var(--white); }
.topbar__inner { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1440px; margin: 0 auto; padding: 0 var(--side); }
@media (min-width: 768px) { .topbar__inner { height: 64px; } }
.topbar__right { display: flex; align-items: center; gap: 20px; }
.nav { display: none; gap: 28px; }
.nav a { color: var(--black); font-size: 15px; font-weight: 500; }
@media (min-width: 960px) { .nav { display: flex; } }
.menu-btn { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.menu-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; }
@media (min-width: 960px) { .menu-btn { display: none; } }
.hide-sm { display: none; }
@media (min-width: 768px) { .hide-sm { display: inline-flex; } }

/* mega menu */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--hairline); padding: 48px 0;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.mega.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mega__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; max-width: 1440px; margin: 0 auto; padding: 0 var(--side); }
.mega__col h4 { margin: 0 0 16px; }
.mega__item { display: flex; gap: 12px; padding: 10px 0; color: var(--black); }
.mega__item svg { width: 24px; height: 24px; flex: none; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mega__item b { display: block; font-weight: 500; font-size: 15px; }
.mega__item small { color: var(--graphite); font-size: 13px; }
.mega__conn { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.mega__feature { background: var(--black); color: var(--white); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--black); color: var(--white); padding: 24px; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 300ms var(--ease); overflow-y: auto; }
.sheet.is-open { transform: none; }
.sheet__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.sheet a.big { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 600; color: var(--white); padding: 8px 0; letter-spacing: -0.02em; }
.sheet details { border-top: 1px solid #262626; padding: 12px 0; }
.sheet summary { font-family: var(--font-display); font-size: 32px; font-weight: 600; cursor: pointer; list-style: none; letter-spacing: -0.02em; }
.sheet details a { display: block; color: #D4D4D4; padding: 6px 0; font-size: 18px; }
.sheet__cta { margin-top: auto; padding-top: 32px; }

/* hero + ring assembly */
.hero { min-height: calc(100svh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px var(--side) 96px; gap: 32px; }
.ring { width: min(260px, 52vw); height: auto; }
.ring .seg { transform-origin: 50px 50px; opacity: 0; animation: seg-in 1200ms var(--ease-reveal) forwards; animation-delay: calc(var(--i) * 110ms + 200ms); }
.ring .seg circle { transition: stroke 300ms; }
.ring .one { opacity: 0; transform-origin: 50px 50px; animation: one-in 900ms var(--ease-reveal) 950ms forwards; }
.ring .seg--active circle { stroke: #FFFFFF; animation: go-orange 400ms var(--ease) 1500ms forwards; }
@keyframes seg-in { from { opacity: 0; transform: rotate(-30deg) scale(1.25); } to { opacity: 1; transform: none; } }
@keyframes one-in { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes go-orange { to { stroke: #FF6B00; } }
.hero__sub { max-width: 560px; margin: 0 auto; color: #A3A3A3; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-reveal), transform 700ms var(--ease-reveal); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 100ms; } .reveal-d2 { transition-delay: 200ms; }

/* story chapters */
.chapter { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .chapter { grid-template-columns: 1fr 1fr; gap: 80px; } .chapter--flip > :first-child { order: 2; } }
.chapter__text { max-width: 520px; }
.chapter__text .h1 { margin-bottom: 24px; }
.apps { position: relative; height: 320px; display: flex; align-items: center; justify-content: center; }
.apps .app-dot { position: absolute; width: 72px; height: 72px; border-radius: 20px; background: var(--mist); border: 1px solid var(--hairline);
  transition: transform 1200ms var(--ease-reveal), opacity 900ms; display: flex; align-items: center; justify-content: center; }
.apps .app-dot svg { width: 28px; stroke: var(--graphite); stroke-width: 1.5; fill: none; }
.apps .app-dot:nth-child(1) { transform: translate(-150px, -90px) rotate(-12deg); }
.apps .app-dot:nth-child(2) { transform: translate(140px, -110px) rotate(10deg); }
.apps .app-dot:nth-child(3) { transform: translate(-170px, 80px) rotate(8deg); }
.apps .app-dot:nth-child(4) { transform: translate(160px, 90px) rotate(-8deg); }
.apps .app-dot:nth-child(5) { transform: translate(0, -150px) rotate(4deg); }
.apps .app-core { width: 120px; height: 120px; opacity: 0; transform: scale(.6); transition: transform 1200ms var(--ease-reveal) 500ms, opacity 700ms 500ms; }
.apps.is-in .app-dot { transform: translate(0,0) scale(.4); opacity: 0; }
.apps.is-in .app-core { opacity: 1; transform: none; }

/* phone mock */
.phone { width: 300px; max-width: 80vw; aspect-ratio: 9 / 19; margin: 0 auto; border-radius: 48px; background: var(--black); padding: 12px;
  box-shadow: var(--shadow-float); transform: rotate(-6deg); }
.phone__screen { width: 100%; height: 100%; border-radius: 38px; background: var(--white); overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 40px 20px 20px; gap: 10px; text-align: center; }
.phone__screen .avatar { width: 84px; height: 84px; font-size: 30px; }
.phone__name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; margin: 4px 0 0; }
.phone__sub { font-size: 13px; color: var(--graphite); margin: 0; }
.phone__row { display: flex; gap: 8px; margin-top: 6px; }
.phone__pill { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--mist); font-size: 12px; font-weight: 500; display: flex; align-items: center; }
.phone__pill--o { background: var(--orange); }
.phone__qr { width: 120px; margin-top: auto; }
.phone__tabs { display: flex; justify-content: space-around; width: 100%; padding-top: 12px; border-top: 1px solid var(--hairline); }
.phone__tabs i { width: 22px; height: 22px; border-radius: 6px; background: var(--hairline); }
.phone__tabs i.on { background: var(--orange); }

/* connector cards */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 64px; }
.conn { position: relative; background: var(--white); border-radius: var(--radius-card); padding: 32px 28px 28px; overflow: hidden; transition: transform 300ms var(--ease); }
.conn::before { content: ''; position: absolute; left: 28px; top: 0; width: 48px; height: 4px; border-radius: 0 0 4px 4px; background: var(--hairline); transition: background 300ms; }
.conn:hover::before, .conn.is-live::before { background: var(--orange); }
.conn svg { width: 28px; height: 28px; stroke: var(--black); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.conn h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.conn p { margin: 0; color: var(--graphite); font-size: 15px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; font-family: var(--font-display); }
.badge--orange { background: var(--orange); color: var(--black); }
.badge--mist { background: var(--mist); color: var(--graphite); }
.badge--black { background: var(--black); color: var(--white); }
.conn .badge { position: absolute; top: 24px; right: 24px; }

.moment { border-radius: var(--radius-card); overflow: hidden; background: linear-gradient(transparent, transparent), var(--mist); aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 40px; position: relative; }
.points { display: grid; gap: 32px; margin-top: 64px; }
@media (min-width: 768px) { .points { grid-template-columns: repeat(3, 1fr); } }
.points h3 { font-family: var(--font-display); font-weight: 500; font-size: 22px; margin: 0 0 8px; }

/* footer */
.footer { background: var(--black); color: var(--white); padding: 96px 0 calc(48px + var(--safe-b)); }
.footer--slim { padding: 48px 0 calc(48px + var(--safe-b)); }
.footer--slim .wrap { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer a { color: #D4D4D4; }
.footer a:hover { color: var(--white); }
.footer__grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer h4 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: #8A8A8A; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.footer__stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer__stack svg { width: 56px; height: 56px; }
.footer__stack span { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.05; letter-spacing: -0.03em; }
.footer__legal { margin-top: 64px; padding-top: 24px; border-top: 1px solid #262626; color: var(--graphite); font-size: 13px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }

/* forms */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .label { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 13px; color: var(--graphite); }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 16px; border-radius: var(--radius-input); border: 1px solid var(--hairline); background: var(--white);
  font: inherit; font-size: 16px; color: var(--black); transition: border-color 150ms, box-shadow 150ms; -webkit-appearance: none; appearance: none; }
.textarea { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.input[readonly] { background: var(--mist); color: var(--graphite); }
.input--code { font-family: var(--font-display); font-size: 28px; letter-spacing: .3em; text-align: center; height: 64px; }
.row2 { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); margin-top: 2px; flex: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hairline); cursor: pointer; }
.switch:first-of-type { border-top: 0; }
.switch span b { display: block; font-weight: 500; font-size: 15px; }
.switch span small { color: var(--graphite); font-size: 13px; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--hairline); position: relative; flex: none; cursor: pointer; transition: background 150ms; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform 150ms var(--ease); }
.switch input:checked { background: var(--orange); }
.switch input:checked::after { transform: translateX(20px); }
.form-error { color: #B42318; font-size: 14px; min-height: 0; margin: 0 0 12px; }
.form-error:empty { display: none; }
.form-ok { color: #067647; font-size: 14px; margin: 0 0 12px; }
.form-ok:empty { display: none; }
.seg-ctl { display: inline-flex; background: var(--mist); border-radius: 999px; padding: 4px; gap: 4px; }
.seg-ctl button { border: 0; background: none; height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 15px; color: var(--graphite); }
.seg-ctl button.is-on { background: var(--white); color: var(--black); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.swatches { display: flex; gap: 12px; }
.swatch { width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--hairline); cursor: pointer; position: relative; padding: 0; }
.swatch.is-on { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--orange); }
.swatch--light { background: var(--white); } .swatch--dark { background: var(--black); } .swatch--orange { background: var(--orange); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; border: 1px solid var(--hairline); border-radius: var(--radius-input); min-height: 48px; align-items: center; }
.tags:focus-within { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.tags input { border: 0; outline: 0; font: inherit; font-size: 16px; flex: 1; min-width: 120px; height: 32px; padding: 0 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--mist); border-radius: 999px; height: 32px; padding: 0 6px 0 12px; font-size: 14px; }
.tag button { border: 0; background: none; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; color: var(--graphite); font-size: 16px; line-height: 1; }
.tag button:hover { background: var(--hairline); }

/* cards / panels */
.panel { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 24px; }
@media (min-width: 768px) { .panel { padding: 32px; } }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; margin: 0 0 4px; }
.panel > .caption:first-of-type { margin-bottom: 20px; }
.notice { display: flex; gap: 16px; background: var(--mist); border-radius: 16px; padding: 18px 20px; border-left: 4px solid var(--orange); font-size: 15px; line-height: 1.5; }
.notice svg { width: 24px; height: 24px; flex: none; stroke: var(--black); stroke-width: 1.5; fill: none; }
.notice b { font-weight: 600; }

/* avatars + chips */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--mist); flex: none; }
.avatar--initials { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; color: var(--black); background: var(--orange); font-size: 20px; }
.avatar--lg { width: 112px; height: 112px; font-size: 40px; }
.avatar--xl { width: 152px; height: 152px; font-size: 52px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--mist); font-size: 15px; font-weight: 500; }

/* public profile */
.page-profile main { padding-top: 64px; padding-bottom: 96px; }
.profile__hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 64px; }
.profile__hero h1 { margin-top: 12px; }
.profile__hero .emoji { font-size: .8em; }
.handle { color: var(--graphite); margin: 0; font-size: 16px; }
.profile__headline { max-width: 520px; margin: 4px 0 8px; }
.profile__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }
.block { padding: 32px 0; border-top: 1px solid var(--hairline); }
.fun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.fun { background: var(--mist); border-radius: 20px; padding: 20px; }
.fun__v { font-family: var(--font-display); font-size: 19px; font-weight: 500; margin: 6px 0 0; letter-spacing: -0.01em; line-height: 1.3; }
.linklist { display: grid; gap: 8px; }
.linkrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 0 20px; border-radius: 16px; background: var(--mist); color: var(--black); font-weight: 500; }
.linkrow:hover { background: var(--hairline); text-decoration: none; }
.linkrow__u { color: var(--graphite); font-weight: 400; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.block--qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr { width: 200px; height: 200px; border-radius: 16px; }
.qr--sm { width: 96px; height: 96px; border-radius: 10px; }
.joined { margin-top: 32px; }
.notfound { padding: 160px var(--side); }
.notfound .h1 { margin-bottom: 16px; }

/* business card page */
.cardpage { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px calc(32px + var(--safe-b)); background: var(--mist); }
.cardpage--dark { background: #000; }
.bcard { width: 100%; max-width: 420px; border-radius: 32px; padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; background: var(--white); box-shadow: var(--shadow-float); }
.bcard--dark { background: var(--night); color: var(--white); }
.bcard--orange { background: var(--orange); color: var(--black); }
.bcard__top { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bcard__mode { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.bcard__mark { color: inherit; } .bcard__mark svg { width: 32px; height: 32px; }
.bcard--orange .bcard__mark svg circle:nth-child(2) { stroke: var(--white); }
.bcard .avatar { margin: 4px 0 8px; }
.bcard--orange .avatar--initials { background: var(--black); color: var(--orange); }
.bcard__name { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
.bcard__role { font-weight: 500; margin: 0; opacity: .8; }
.bcard__tag { margin: 4px 0 0; font-size: 15px; opacity: .75; max-width: 320px; }
.bcard__loc { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; opacity: .7; margin: 0; }
.bcard__loc svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.chips--card { justify-content: center; margin-top: 8px; }
.chips--card .chip { height: 30px; font-size: 13px; padding: 0 12px; }
.bcard--dark .chip { background: #262626; } .bcard--orange .chip { background: rgba(10,10,10,.1); }
.bcard__ask { margin: 8px 0 0; font-size: 15px; } .bcard__ask span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.bcard__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; width: 100%; margin: 16px 0 8px; }
.cact { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 18px; background: var(--mist); color: inherit; font-size: 13px; font-weight: 500; }
.cact:hover { text-decoration: none; background: var(--hairline); }
.cact svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bcard--dark .cact { background: #262626; } .bcard--dark .cact:hover { background: #333; }
.bcard--orange .cact { background: rgba(10,10,10,.08); } .bcard--orange .cact:hover { background: rgba(10,10,10,.14); }
.bcard--orange .btn--primary { background: var(--black); color: var(--white); }
.bcard .btn--block { margin-top: 8px; }
.bcard__links { width: 100%; display: grid; gap: 0; margin-top: 12px; }
.bcard__links a { display: flex; justify-content: space-between; padding: 14px 4px; border-top: 1px solid var(--hairline); color: inherit; font-weight: 500; }
.bcard--dark .bcard__links a { border-color: #262626; } .bcard--orange .bcard__links a { border-color: rgba(10,10,10,.15); }
.bcard__foot { width: 100%; display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); text-align: left; }
.bcard--dark .bcard__foot { border-color: #262626; } .bcard--orange .bcard__foot { border-color: rgba(10,10,10,.15); }
.bcard__small { font-size: 13px; opacity: .7; margin: 0 0 4px; }
.bcard__profile { color: inherit; font-weight: 600; font-size: 15px; display: block; }
.bcard--light .bcard__profile { color: var(--orange-ink); }
.bcard__share { border: 0; background: none; padding: 4px 0 0; cursor: pointer; font-size: 14px; text-decoration: underline; opacity: .7; }
.cardpage__cta { margin-top: 24px; font-size: 14px; }
.cardpage--dark .cardpage__cta a { color: var(--orange); }
.cardpage--orange { background: #FFF1E6; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--black); color: var(--white); padding: 12px 20px; border-radius: 999px; font-size: 15px;
  opacity: 0; transition: opacity 300ms var(--ease), transform 300ms var(--ease); z-index: 100; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* legal */
.legal h2 { margin: 40px 0 12px; }
.legal p { color: #262626; }

/* ===== member app shell ===== */
.app-body { background: var(--mist); min-height: 100svh; }
.app-main { max-width: 760px; margin: 0 auto; padding: 32px 16px calc(120px + var(--safe-b)); }
@media (min-width: 768px) { .app-main { padding: 48px 24px calc(120px + var(--safe-b)); } }
.app-main > .view { animation: view-in 300ms var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view__head { margin-bottom: 24px; }
.view__head .h2 { margin-bottom: 6px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--hairline); display: flex; justify-content: space-around; padding: 6px 8px calc(6px + var(--safe-b)); }
.tabbar a { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--graphite); font-size: 11px; font-weight: 500; text-decoration: none !important; min-height: 44px; }
.tabbar a svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.is-on { color: var(--black); }
.tabbar a.is-on svg { stroke: var(--orange); }
.auth { max-width: 440px; margin: 0 auto; }
.auth__mark { width: 72px; margin: 0 auto 24px; }
.auth .panel { padding: 32px 24px; }
.auth__switch { text-align: center; margin-top: 20px; font-size: 15px; }
.welcome { text-align: center; padding: 48px 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.welcome .auth__mark { width: 112px; margin: 0; }
.me-card { display: flex; gap: 20px; align-items: center; }
.me-card .avatar { width: 88px; height: 88px; font-size: 32px; }
.me-card h2 { margin: 0 !important; }
.meter { height: 8px; background: var(--mist); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.meter i { display: block; height: 100%; background: var(--orange); border-radius: 999px; transition: width 700ms var(--ease-reveal); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile { background: var(--white); border: 1px solid var(--hairline); border-radius: 20px; padding: 20px; color: var(--black); display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.tile:hover { text-decoration: none; border-color: var(--black); }
.tile svg { width: 26px; height: 26px; stroke: var(--black); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tile b { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; margin-top: auto; }
.tile small { color: var(--graphite); font-size: 13px; margin-top: -10px; }
.photo-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.photo-edit .avatar { width: 96px; height: 96px; font-size: 34px; }
.savebar { position: sticky; bottom: calc(76px + var(--safe-b)); z-index: 30; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px;
  background: rgba(245,245,245,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 12px 0; }
.savebar .caption { margin-right: auto; }
.linked { display: grid; grid-template-columns: 1fr 1.6fr 44px; gap: 8px; margin-bottom: 8px; }
.icon-btn { width: 44px; height: 48px; border: 1px solid var(--hairline); background: var(--white); border-radius: var(--radius-input); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--graphite); }
.icon-btn:hover { color: var(--black); border-color: var(--black); }
.counter { font-size: 12px; color: var(--graphite); text-align: right; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; stroke: var(--graphite); fill: none; stroke-width: 1.5; }
.search-box .input { padding-left: 46px; height: 52px; border-radius: 999px; }
.results { display: grid; gap: 8px; margin-top: 20px; }
.person { display: flex; gap: 16px; align-items: center; background: var(--white); border: 1px solid var(--hairline); border-radius: 20px; padding: 14px 16px; color: var(--black); }
.person:hover { text-decoration: none; border-color: var(--black); }
.person .avatar { width: 52px; height: 52px; font-size: 18px; }
.person b { display: block; font-weight: 600; }
.person small { color: var(--graphite); font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person > div:not(.avatar) { min-width: 0; flex: 1; }
.person__arrow { color: var(--graphite); }
.empty { text-align: center; padding: 48px 16px; color: var(--graphite); }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.qr-wrap .qr { width: 220px; height: 220px; border: 1px solid var(--hairline); }
.preview-frame { width: 100%; height: 720px; border: 0; border-radius: 24px; background: var(--mist); display: block; }
.card-layout { display: grid; gap: 16px; }
.qr-full { position: fixed; inset: 0; z-index: 90; background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.qr-full img.qr { width: min(80vw, 420px); height: auto; border: 0; }
.qr-full .h2 { margin: 0; }
.qr-full__close { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.backup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 17px; background: var(--mist); padding: 16px; border-radius: 16px; margin: 16px 0; }
.ios-steps { text-align: left; margin: 0; padding-left: 20px; }
.ios-steps li { margin-bottom: 8px; }
hr.sep { border: 0; border-top: 1px solid var(--hairline); margin: 24px 0; }

/* ===== admin ===== */
.admin-body { background: var(--mist); min-height: 100svh; }
.admin-top { background: var(--black); color: var(--white); }
.admin-top .topbar__inner { height: 64px; }
.admin-top .brand { color: var(--white); }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 32px 16px 96px; }
@media (min-width: 768px) { .admin-main { padding: 48px 32px 96px; } }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 24px; background: var(--white); border-radius: 999px; padding: 4px; border: 1px solid var(--hairline); width: max-content; max-width: 100%; }
.admin-tabs button { border: 0; background: none; height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 15px; color: var(--graphite); white-space: nowrap; }
.admin-tabs button.is-on { background: var(--black); color: var(--white); }
.admin-tabs .dot { display: inline-flex; min-width: 20px; height: 20px; border-radius: 999px; background: var(--orange); color: var(--black); font-size: 12px; align-items: center; justify-content: center; margin-left: 6px; padding: 0 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--white); border: 1px solid var(--hairline); border-radius: 20px; padding: 20px; }
.stat b { display: block; font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 16px; }
.bars div { flex: 1; background: var(--black); border-radius: 6px 6px 2px 2px; min-height: 4px; position: relative; }
.bars div:last-child { background: var(--orange); }
.bars-x { display: flex; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--graphite); }
.bars-x span { flex: 1; text-align: center; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--graphite); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.table td { padding: 12px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .who { display: flex; gap: 12px; align-items: center; }
.table .avatar { width: 36px; height: 36px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.status { display: inline-flex; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; align-items: center; }
.status--active { background: #ECFDF3; color: #067647; }
.status--suspended { background: #FEF3F2; color: #B42318; }
.msg { background: var(--white); border: 1px solid var(--hairline); border-radius: 20px; padding: 20px; margin-bottom: 12px; }
.msg--new { border-left: 4px solid var(--orange); }
.msg__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.msg__body { white-space: pre-wrap; margin: 12px 0 16px; font-size: 15px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; flex: 1; min-width: 200px; }
.brand span { white-space: nowrap; }
@media (max-width: 599px) { .topbar .brand span { display: none; } }
.person { min-width: 0; } .results, .linklist { min-width: 0; } .results > *, .linklist > * { min-width: 0; }
