/* ============================================================
   UP2 — up2app.com
   Design system mirrored from the iOS app:
   pure grayscale, capsule buttons, continuous-corner cards,
   light & dark following the device.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-2: #f4f4f5;
  --bg-3: #fafafa;
  --card: #ffffff;
  --chip: #f2f2f4;
  --text: #000000;
  --text-2: #5f5f66;
  --text-3: #8e8e93;
  --stroke: rgba(0, 0, 0, 0.12);
  --stroke-strong: rgba(0, 0, 0, 0.2);
  --btn: #000000;
  --btn-text: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.10);
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.06);
  --phone-frame: #111113;
  --phone-edge: rgba(0, 0, 0, 0.08);
  --overlay: rgba(0, 0, 0, 0.45);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #141416;
    --bg-3: #0a0a0b;
    --card: #17171a;
    --chip: #1f1f23;
    --text: #ffffff;
    --text-2: rgba(255, 255, 255, 0.72);
    --text-3: rgba(255, 255, 255, 0.5);
    --stroke: rgba(255, 255, 255, 0.16);
    --stroke-strong: rgba(255, 255, 255, 0.28);
    --btn: #ffffff;
    --btn-text: #000000;
    --nav-bg: rgba(0, 0, 0, 0.65);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.55);
    --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.4);
    --phone-frame: #2c2c2e;
    --phone-edge: rgba(255, 255, 255, 0.22);
    --overlay: rgba(0, 0, 0, 0.6);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--text); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

.wordmark {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
    "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled { border-bottom-color: var(--stroke); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  margin-right: auto;
}

.nav-logo img {
  width: 32px; height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}

.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }

.nav .btn { padding: 9px 20px; font-size: 14px; }

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--stroke);
    padding: 8px 0 12px;
  }
  .nav-links.open a { padding: 14px 28px; font-size: 17px; }
  .nav-burger { display: inline-flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 15px 30px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn:active { transform: scale(0.97); box-shadow: none; }

.btn-primary { background: var(--btn); color: var(--btn-text); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--stroke-strong);
}
.btn-secondary:hover { box-shadow: inset 0 0 0 1.5px var(--stroke-strong), var(--shadow-card); }

/* App Store badge */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--btn);
  color: var(--btn-text);
  border: none;
  border-radius: 999px;
  padding: 12px 26px 12px 22px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.store-badge:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.store-badge:active { transform: scale(0.97); }
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge .sb-top { display: block; font-size: 11px; font-weight: 500; opacity: 0.75; line-height: 1.2; }
.store-badge .sb-bottom { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */

.hero {
  padding: 150px 0 40px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.hero h1 {
  font-size: clamp(42px, 6.2vw, 74px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero .sub {
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-2);
  max-width: 46ch;
}

.hero-ctas {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}

/* Phones */

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.phone {
  width: min(300px, 72vw);
  border-radius: 52px;
  border: 9px solid var(--phone-frame);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--phone-edge), var(--shadow-soft);
  background: var(--phone-frame);
  transform: translateZ(0);
}

.phone > picture img, .phone > img { width: 100%; border-radius: 43px; }

.phone-stage .phone.back {
  position: absolute;
  width: min(250px, 58vw);
  transform: rotate(9deg) translate(58%, 6%);
  opacity: 0.9;
  z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
  .float { animation: floaty 7s ease-in-out infinite; }
  .float.delay { animation-delay: 1.6s; }
  @keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
  .phone-stage .phone.back { animation: floaty-back 8s ease-in-out infinite; }
  @keyframes floaty-back {
    0%, 100% { transform: rotate(9deg) translate(58%, 6%); }
    50% { transform: rotate(9deg) translate(58%, 4%); }
  }
}

@media (max-width: 860px) {
  .hero { padding-top: 120px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .phone-stage .phone.back { display: none; }
}

/* ---------- Sections ---------- */

section { padding: 88px 0; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-sub {
  margin-top: 14px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 60ch;
}

.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* Alternating feature rows */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  padding: 56px 0;
}

.feature.reverse .feature-copy { order: 2; }
.feature.reverse .phone-stage { order: 1; }

.feature h3 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.feature p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-2);
  max-width: 44ch;
}

.feature ul {
  margin-top: 20px;
  list-style: none;
  display: grid;
  gap: 12px;
}

.feature li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--text-2);
}

.feature li svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text);
}

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; padding: 40px 0; }
  .feature.reverse .feature-copy { order: 1; }
  .feature.reverse .phone-stage { order: 2; }
}

/* ---------- Cards / grids ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 25px;
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.card .icon-box {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--chip);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card .icon-box svg { width: 23px; height: 23px; color: var(--text); }

.card h4 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }

.card p { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* Link demo chips */

.link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  justify-content: center;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--stroke-strong);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.link-chip:hover { background: var(--btn); color: var(--btn-text); transform: translateY(-1px); }
.link-chip svg { width: 16px; height: 16px; }
.link-chip .muted { font-weight: 400; opacity: 0.55; }

/* Stats strip (business page) */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.stat-tile {
  background: var(--chip);
  border-radius: 20px;
  padding: 22px 20px;
  text-align: center;
}

.stat-tile .big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat-tile .small { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* Numbered steps */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.step {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 25px;
  padding: 28px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 18px;
}

.step h4 { font-size: 18px; font-weight: 700; }
.step p { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* ---------- Download band ---------- */

.download-band {
  text-align: center;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-3);
  padding: 96px 24px;
}

.download-band .app-icon {
  width: 96px; height: 96px;
  border-radius: 24px;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-soft);
}

/* ---------- FAQ ---------- */

.faq-list { margin-top: 40px; display: grid; gap: 12px; }

.faq-item {
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--card);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  padding: 20px 24px;
  cursor: pointer;
}

.faq-q svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-3);
}

.faq-item.open .faq-q svg { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-a-inner {
  padding: 0 24px 22px;
  font-size: 15.5px;
  color: var(--text-2);
}

.faq-a-inner p + p { margin-top: 10px; }

/* ---------- Legal / prose pages ---------- */

.page-head { padding: 140px 0 20px; }

.page-head h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head .updated { margin-top: 12px; font-size: 14px; color: var(--text-3); }

.prose { padding: 30px 0 100px; max-width: 760px; }

.prose h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

.prose h2:first-child { margin-top: 10px; }

.prose p { color: var(--text-2); font-size: 16px; margin-bottom: 14px; }

.prose ul { color: var(--text-2); font-size: 16px; margin: 0 0 14px 22px; }

.prose li { margin-bottom: 8px; }

.prose strong { color: var(--text); font-weight: 600; }

.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contact cards ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.contact-card {
  border: 1px solid var(--stroke);
  border-radius: 25px;
  padding: 30px;
  background: var(--card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.contact-card .icon-box {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--chip);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.contact-card .icon-box svg { width: 22px; height: 22px; }

.contact-card h4 { font-size: 18px; font-weight: 700; }
.contact-card p { font-size: 14.5px; color: var(--text-2); margin-top: 6px; }
.contact-card .mail {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--stroke);
  padding: 64px 0 40px;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .nav-logo { font-size: 24px; margin-bottom: 14px; }

.footer-brand p { font-size: 14px; color: var(--text-2); max-width: 30ch; }

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 15px;
  color: var(--text-2);
  padding: 5px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 40px 36px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.modal-backdrop.show .modal { transform: translateY(0) scale(1); }

.modal .app-icon {
  width: 76px; height: 76px;
  border-radius: 18px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-card);
}

.modal h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

.modal p { margin-top: 10px; font-size: 15px; color: var(--text-2); }

.modal .store-badge { margin-top: 24px; }

.modal .alt-link {
  display: block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--chip);
  color: var(--text-2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.modal-close:hover { transform: scale(1.08); color: var(--text); }

.soon-pill {
  display: inline-block;
  background: var(--chip);
  color: var(--text-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  margin-top: 16px;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .contact-card, .link-chip { transition: none; }
}

/* ============================================================
   Preview pages (/e, /l, /u) — "look, but join in the app"
   ============================================================ */

.preview-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-3);
}

.preview-main {
  flex: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 92px 20px 140px;
}

.preview-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.preview-cover { position: relative; aspect-ratio: 4 / 3; background: var(--chip); }

.preview-cover img { width: 100%; height: 100%; object-fit: cover; }

.preview-cover .cover-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
}

.preview-cover .cover-title {
  position: absolute;
  left: 24px; right: 24px; bottom: 20px;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.preview-content { padding: 26px 24px 30px; }

.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  font-size: 16px;
  color: var(--text);
}

.info-row .icon-box {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--chip);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-row .icon-box svg { width: 19px; height: 19px; color: var(--text); }

.info-row .sub { display: block; font-size: 13.5px; color: var(--text-3); }

.host-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 18px 0 4px;
  padding: 14px;
  background: var(--chip);
  border-radius: 20px;
}

.host-row img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
}

.host-row .name { font-weight: 700; font-size: 15.5px; }
.host-row .sub { font-size: 13.5px; color: var(--text-3); }

.preview-about {
  margin-top: 18px;
  font-size: 15.5px;
  color: var(--text-2);
}

.preview-about h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.going-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.going-strip .avatars { display: flex; }

.going-strip .avatars img,
.going-strip .avatars .initial {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card);
}

.going-strip .avatars > * + * { margin-left: -10px; }

.going-strip .initial {
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.going-strip span { font-size: 14.5px; color: var(--text-2); }

/* profile preview */

.profile-head {
  text-align: center;
  padding: 40px 24px 10px;
}

.profile-head img {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-card);
}

.profile-head h2 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.profile-head .username { font-size: 15.5px; color: var(--text-3); margin-top: 3px; }
.profile-head .bio { font-size: 15.5px; color: var(--text-2); margin-top: 14px; max-width: 40ch; margin-left: auto; margin-right: auto; }

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 44px;
  padding: 22px 0 8px;
}

.profile-stats .stat { text-align: center; }
.profile-stats .num { font-size: 20px; font-weight: 800; }
.profile-stats .lbl { font-size: 13px; color: var(--text-3); }

/* sticky preview action bar */

.preview-actions {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid var(--stroke);
}

.preview-actions-inner {
  max-width: 580px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.preview-actions .btn { flex: 1; padding: 15px 10px; }

/* minimal preview nav */

.preview-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--stroke);
}

.preview-nav .nav-logo { font-size: 20px; }
.preview-nav .btn { padding: 9px 20px; font-size: 14px; }

.preview-footnote {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 26px;
}

.preview-footnote a { text-decoration: underline; text-underline-offset: 3px; }

/* 404 */

.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.notfound .code {
  font-size: 90px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.notfound p { color: var(--text-2); margin: 10px 0 28px; }

/* ============================================================
   Phone UI — the app screens rebuilt as real, sharp elements.
   Rendered into .phone[data-screen] by assets/js/phones.js.
   Only photographs (avatars, covers, the map) are images.
   ============================================================ */

/* the frame wraps the screen exactly, so the bezel stays even on all sides */
.phone[data-screen] { font-size: 0; }

.pui {
  text-align: left;
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 874;
  border-radius: 43px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.35;
  user-select: none;
  -webkit-user-select: none;
}

.pui-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 22px;
  border-radius: 12px;
  background: #000;
  z-index: 6;
}

.pui-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 24px 2px;
  font-size: 11.5px;
  font-weight: 600;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

.pui-status svg { height: 10px; display: block; }

.pui-toprow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 0;
  flex-shrink: 0;
}

.pui-circle {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 5px rgba(0,0,0,0.09);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  .pui-circle { background: var(--chip); box-shadow: none; }
}

.pui-circle svg { width: 15px; height: 15px; color: var(--text); }

.pui-avatar { border-radius: 50%; object-fit: cover; }

.pui-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 8px 16px 6px;
  flex-shrink: 0;
}

.pui-chips {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 2px 16px 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.pui-chip {
  position: relative;
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.pui-chip.on {
  background: var(--btn);
  color: var(--btn-text);
  border-color: var(--btn);
}

.pui-chip.add {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}

.pui-chip .cnt {
  position: absolute;
  top: -5px;
  right: -3px;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--btn);
  color: var(--btn-text);
  border: 1.5px solid var(--bg);
  font-size: 8.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pui-scroll {
  flex: 1;
  overflow: hidden;
  padding: 0 16px;
  position: relative;
}

/* --- Plans screen --- */

.pui-inviterow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}

.pui-inviterow .who { flex: 1; }
.pui-inviterow .who .nm { font-size: 12px; font-weight: 650; }
.pui-inviterow .who .sb { font-size: 10.5px; color: var(--text-3); }

.pui-new {
  background: var(--btn);
  color: var(--btn-text);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
}

.pui-cover {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

.pui-cardtitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0 4px;
}

.pui-cardtitle .t { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.pui-dots {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--text);
  letter-spacing: 0.05em;
}

.pui-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 11.5px;
}

.pui-info svg { width: 12px; height: 12px; color: var(--text); flex-shrink: 0; }

.pui-going {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.pui-going .avs { display: flex; }
.pui-going .avs img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--bg);
}
.pui-going .avs img + img { margin-left: -7px; }
.pui-going span { font-size: 11px; color: var(--text-2); }

.pui-peek {
  border-top: 1px solid var(--stroke);
  margin-top: 6px;
  padding-top: 8px;
}

/* --- Messages screen --- */

.pui-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--chip);
  border-radius: 999px;
  padding: 7px 12px;
  margin: 2px 16px 8px;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}

.pui-search svg { width: 11px; height: 11px; }

.pui-chatrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  position: relative;
}

.pui-chatrow > img, .pui-chatrow .grp { width: 38px; height: 38px; flex-shrink: 0; }

.pui-chatrow .grp { position: relative; }
.pui-chatrow .grp img {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--bg);
}
.pui-chatrow .grp img:first-child { top: 0; left: 0; }
.pui-chatrow .grp img:last-child { bottom: 0; right: 0; }

.pui-chatrow .mid { flex: 1; min-width: 0; }
.pui-chatrow .mid .nm { font-size: 12.5px; font-weight: 650; }
.pui-chatrow .mid .pv {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pui-chatrow .mid .pv svg { width: 10px; height: 10px; flex-shrink: 0; }

.pui-chatrow .tm { font-size: 10.5px; color: var(--text-3); align-self: flex-start; padding-top: 4px; }

.pui-chatrow .dot {
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
}

.pui-typing {
  display: inline-flex;
  gap: 3px;
  background: var(--chip);
  border-radius: 9px;
  padding: 5px 8px;
  margin-top: 2px;
}

.pui-typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-3);
}

@media (prefers-reduced-motion: no-preference) {
  .pui-typing i { animation: pui-type 1.2s ease-in-out infinite; }
  .pui-typing i:nth-child(2) { animation-delay: 0.15s; }
  .pui-typing i:nth-child(3) { animation-delay: 0.3s; }
  @keyframes pui-type {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-1.5px); }
  }
}

/* --- Map screen --- */

.pui-map { position: absolute; inset: 0; }
.pui-map img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

.pui-mapchips {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 72px;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow: hidden;
  z-index: 4;
}

.pui-mapchips .pui-chip,
.pui-mapchips .pui-circle {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-color: transparent;
  box-shadow: none;
}

/* --- Listing / global cards --- */

.pui-meta { font-size: 11px; color: var(--text-3); padding: 1px 0 3px; }

.pui-desc {
  font-size: 11px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pui-more { font-size: 11px; font-weight: 600; padding-top: 2px; }

.pui-divider {
  height: 1px;
  background: var(--stroke);
  margin: 12px 0;
}

/* --- Detail screen (plan invitation) --- */

.pui-hostrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 6px;
}

.pui-hostrow .who .nm { font-size: 12px; font-weight: 650; }
.pui-hostrow .who .sb { font-size: 10.5px; color: var(--text-3); }

.pui-about {
  font-size: 11px;
  color: var(--text-2);
  padding-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pui-actionbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 27px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 5;
}

.pui-btn {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  padding: 10px 0;
  border-radius: 999px;
}

.pui-btn.fill { background: var(--btn); color: var(--btn-text); }
.pui-btn.line { color: var(--text); box-shadow: inset 0 0 0 1.2px var(--stroke-strong); }

/* --- Tab bar --- */

.pui-tabbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 54px;
  border-radius: 27px;
  display: flex;
  align-items: stretch;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 5;
  padding: 4px;
}

.pui-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-2);
  border-radius: 23px;
}

.pui-tab svg { width: 16px; height: 16px; }
.pui-tab span { font-size: 8px; font-weight: 600; }

.pui-tab.on { color: var(--text); background: var(--chip); }

