/*
 * Echoo · Link Up
 *
 * Styles for the "I'm here" check-in affordance, the match pop-up, and the
 * ephemeral chat sheet. Follows docs/ui-ux-design-system.md: single accent
 * (--peach), glass surfaces, Inter, radius 24px for the modal / 14px for cards,
 * 180ms motion, reduced-motion respected. No new color tokens.
 *
 * Loaded by events.html alongside echoo-linkup.js.
 */

:root {
  /* Link Up reuses the page tokens; these are local-only conveniences. */
  --linkup-glass: rgba(21, 21, 20, 0.92);
  --linkup-scrim: rgba(0, 0, 0, 0.64);
}

/* ───────────────────────────────────────────────────────────────────────
   Check-in affordance — three quiet states, no dots, no labels.
   Sits in the place-detail action row next to Directions / Uber.
     is-locked : blurred + dimmed, not tappable (default / far / location off)
     is-ready  : crisp, full opacity, peach (within proximity, tappable)
     is-here   : text becomes "You're here" (checked in)
   ─────────────────────────────────────────────────────────────────────── */
.echoo-linkup-checkin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  color: var(--soft);
  font:
    540 13px/1 "Inter",
    sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 220ms ease,
    filter 320ms ease,
    opacity 320ms ease;
}

/* Locked — blurred, dimmed, inert. The blur is the whole signal. */
.echoo-linkup-checkin.is-locked {
  filter: blur(3.5px);
  opacity: 0.32;
  color: var(--muted);
  cursor: default;
  pointer-events: none;
  user-select: none;
}

/* Why it's locked — one quiet, un-blurred line under the button. */
.echoo-linkup-checkin-hint {
  display: block;
  color: var(--muted);
  font:
    430 11px/1.35 "Inter",
    sans-serif;
  letter-spacing: 0.01em;
}

/* Ready — within proximity. Crisp, peach, tappable. */
.echoo-linkup-checkin.is-ready {
  filter: none;
  opacity: 1;
  color: var(--peach);
}
.echoo-linkup-checkin.is-ready:active {
  opacity: 0.7;
  transition-duration: 80ms;
}

/* Here — checked in. Same quiet weight, ink not peach, to feel settled. */
.echoo-linkup-checkin.is-here {
  filter: none;
  opacity: 1;
  color: var(--ink);
}

/* ───────────────────────────────────────────────────────────────────────
   Match pop-up — center modal, scale-in (mirrors .location-modal).
   ─────────────────────────────────────────────────────────────────────── */
#echoo-linkup-modal[hidden] {
  display: none;
}

.echoo-linkup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--linkup-scrim);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 27px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.echoo-linkup-backdrop.is-open {
  opacity: 1;
}

.echoo-linkup-card {
  width: 100%;
  max-width: 360px;
  background: var(--linkup-glass);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 22px 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: scale(0.97);
  opacity: 0;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}
.echoo-linkup-backdrop.is-open .echoo-linkup-card {
  transform: scale(1);
  opacity: 1;
}

.echoo-linkup-eyebrow {
  margin: 4px 0 6px;
  font:
    650 11px/1 "Inter",
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--peach);
}

/* Single hero avatar — the peer's photo (or initials fallback). */
.echoo-linkup-hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: rgba(248, 245, 239, 0.06);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    680 28px/1 "Inter",
    sans-serif;
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(247, 213, 178, 0.1);
  transition: box-shadow 220ms ease;
}
.echoo-linkup-hero-avatar.has-photo {
  border-color: transparent;
  color: transparent;
  box-shadow: 0 0 0 3px rgba(247, 213, 178, 0.2);
}

.echoo-linkup-name {
  margin: 0 0 4px;
  font:
    680 22px/1.1 "Inter",
    sans-serif;
  color: var(--ink);
}
.echoo-linkup-bio {
  margin: 0 0 10px;
  font:
    520 13px/1.4 "Inter",
    sans-serif;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.echoo-linkup-place {
  margin: 0 0 18px;
  font:
    520 12px/1 "Inter",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 245, 239, 0.5);
}

/* Incomplete-profile notice — quiet toast, dismisses itself. */
.echoo-linkup-notice {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 54px);
  padding: 12px 14px 12px 18px;
  background: var(--linkup-glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}
.echoo-linkup-notice.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}
.echoo-linkup-notice-copy {
  font:
    520 13px/1.35 "Inter",
    sans-serif;
  color: var(--ink);
}
.echoo-linkup-notice-link {
  flex-shrink: 0;
  font:
    680 12px/1 "Inter",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--peach);
  text-decoration: none;
  white-space: nowrap;
}

.echoo-linkup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.echoo-linkup-btn {
  min-height: 48px;
  border-radius: 999px;
  border: 0;
  font:
    680 14px/1 "Inter",
    sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}
.echoo-linkup-btn:active {
  transform: scale(0.98);
}
.echoo-linkup-btn--primary {
  background: var(--peach);
  color: #111;
}
.echoo-linkup-btn--secondary {
  background: rgba(248, 245, 239, 0.06);
  border: 1px solid var(--line);
  color: var(--ink);
}
.echoo-linkup-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.echoo-linkup-footer {
  margin: 14px 0 0;
  font:
    520 11px/1.3 "Inter",
    sans-serif;
  color: rgba(248, 245, 239, 0.42);
}

/* ───────────────────────────────────────────────────────────────────────
   Chat sheet — bottom-anchored, slides up (mirrors .sheet motion).
   ─────────────────────────────────────────────────────────────────────── */
#echoo-linkup-chat[hidden] {
  display: none;
}

.echoo-linkup-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--linkup-scrim);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.echoo-linkup-chat-backdrop.is-open {
  opacity: 1;
}

.echoo-linkup-chat-sheet {
  width: 100%;
  max-width: 430px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--linkup-glass);
  border-top: 1px solid var(--line-strong);
  border-radius: 24px 24px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(18px);
  transition: transform 220ms ease;
}
.echoo-linkup-chat-backdrop.is-open .echoo-linkup-chat-sheet {
  transform: translateY(0);
}

.echoo-linkup-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.echoo-linkup-chat-title {
  font:
    650 15px/1.2 "Inter",
    sans-serif;
  color: var(--ink);
}
.echoo-linkup-chat-sub {
  font:
    520 11px/1 "Inter",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 245, 239, 0.5);
  margin-top: 4px;
}
.echoo-linkup-chat-actions {
  display: flex;
  gap: 6px;
}
.echoo-linkup-chat-action {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(248, 245, 239, 0.04);
  color: var(--muted);
  font:
    520 11px/1 "Inter",
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.echoo-linkup-chat-action:active {
  transform: scale(0.97);
}

.echoo-linkup-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.echoo-linkup-bubble {
  max-width: 76%;
  padding: 9px 13px;
  border-radius: 16px;
  font:
    520 14px/1.35 "Inter",
    sans-serif;
  word-break: break-word;
}
.echoo-linkup-bubble--mine {
  align-self: flex-end;
  background: var(--peach);
  color: #111;
  border-bottom-right-radius: 5px;
}
.echoo-linkup-bubble--theirs {
  align-self: flex-start;
  background: rgba(248, 245, 239, 0.06);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.echoo-linkup-system {
  align-self: center;
  font:
    520 11px/1.3 "Inter",
    sans-serif;
  color: rgba(248, 245, 239, 0.42);
  text-align: center;
  padding: 8px 14px;
}

.echoo-linkup-composer {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--line);
}
.echoo-linkup-composer input {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(248, 245, 239, 0.04);
  color: var(--ink);
  padding: 0 16px;
  font:
    520 14px/1 "Inter",
    sans-serif;
  outline: none;
}
.echoo-linkup-composer input:focus {
  border-color: var(--peach);
}
.echoo-linkup-composer button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--peach);
  color: #111;
  font-size: 16px;
  cursor: pointer;
}
.echoo-linkup-composer button[disabled] {
  opacity: 0.4;
}

/* ───────────────────────────────────────────────────────────────────────
   Link Up Module UI Screen & Feature Cards (1:1 with app design)
   ─────────────────────────────────────────────────────────────────────── */
.echoo-linkup-module {
  display: flex;
  flex-direction: column;
  padding: 8px 18px 40px;
  gap: 18px;
}

body.linkup-welcome-open .app-shell,
body.linkup-find-open .app-shell {
  pointer-events: none;
}

body.linkup-welcome-open .app-shell {
  filter: blur(6px);
  transform: scale(0.992);
  transition: filter 0.25s ease, transform 0.25s ease;
}

.echoo-linkup-module-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-top: 8px;
}

.echoo-linkup-module-title-wrap {
  flex: 1;
}

.echoo-linkup-module-title {
  margin: 0 0 6px;
  font:
    800 40px/1.05 "Inter",
    sans-serif;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.echoo-linkup-module-subtitle {
  margin: 0;
  font:
    540 16px/1.35 "Inter",
    sans-serif;
  color: rgba(248, 245, 239, 0.65);
}

.echoo-linkup-module-subtitle .gold-accent {
  color: #e7c98e;
  font-weight: 650;
}

/* Concentric ring gold chain icon badge */
.echoo-linkup-ring-badge {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 50%;
  border: 1px solid rgba(231, 201, 142, 0.22);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(231, 201, 142, 0.12) 0%,
    rgba(18, 18, 18, 0.4) 70%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(231, 201, 142, 0.12);
}

.echoo-linkup-ring-badge-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(231, 201, 142, 0.38);
  background: rgba(20, 19, 17, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.echoo-linkup-ring-badge svg {
  width: 26px;
  height: 26px;
  stroke: #e7c98e;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Smart Match Card ── */
.echoo-linkup-smart-card {
  background: #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
  border-radius: 24px;
  padding: 22px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.echoo-linkup-smart-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.echoo-linkup-smart-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(248, 245, 239, 0.06);
  border: 1px solid rgba(248, 245, 239, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--peach);
  flex: 0 0 42px;
}

.echoo-linkup-smart-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.echoo-linkup-smart-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.echoo-linkup-smart-title {
  margin: 0;
  font:
    700 17px/1.2 "Inter",
    sans-serif;
  color: var(--ink);
}

.echoo-linkup-smart-sub {
  margin: 0;
  font:
    480 13px/1.35 "Inter",
    sans-serif;
  color: var(--muted);
}

/* Dual Avatars Visual */
.echoo-linkup-dual-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 0 6px;
}

.echoo-linkup-avatar-wrap {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(248, 245, 239, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: rgba(248, 245, 239, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    700 24px/1 "Inter",
    sans-serif;
  color: var(--peach);
}

.echoo-linkup-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Connector Badge */
.echoo-linkup-connector-track {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 -12px;
  z-index: 2;
}

.echoo-linkup-connector-line {
  width: 24px;
  height: 1px;
  border-top: 1.5px dashed rgba(231, 201, 142, 0.45);
}

.echoo-linkup-connector-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(231, 201, 142, 0.4);
  background: #181614;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(231, 201, 142, 0.2);
}

.echoo-linkup-connector-node svg {
  width: 18px;
  height: 18px;
  stroke: #e7c98e;
  stroke-width: 2;
  fill: none;
}

/* Match Cue & Badge */
.echoo-linkup-match-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.echoo-linkup-match-cue {
  margin: 0;
  font:
    500 15px/1.4 "Inter",
    sans-serif;
  color: var(--soft);
  max-width: 310px;
}

.echoo-linkup-match-cue strong {
  color: var(--ink);
  font-weight: 650;
}

.echoo-linkup-match-cue .venue-highlight {
  color: #e7c98e;
  font-weight: 700;
}

.echoo-linkup-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(231, 201, 142, 0.08);
  border: 1px solid rgba(231, 201, 142, 0.28);
  color: #e7c98e;
  font:
    600 12px/1 "Inter",
    sans-serif;
  letter-spacing: 0.01em;
}

.echoo-linkup-status-badge svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Action Buttons */
.echoo-linkup-cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.echoo-linkup-btn--hero {
  width: 100%;
  min-height: 52px;
  border-radius: 9999px;
  border: 0;
  background: linear-gradient(135deg, #e4c48d 0%, #f7d5b2 100%);
  color: #12100c;
  font:
    700 15px/1 "Inter",
    sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(231, 201, 142, 0.22);
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}

.echoo-linkup-btn--hero:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

.echoo-linkup-btn--hero svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.echoo-linkup-btn--outline {
  width: 100%;
  min-height: 48px;
  border-radius: 9999px;
  border: 1px solid rgba(248, 245, 239, 0.14);
  background: transparent;
  color: var(--ink);
  font:
    600 14px/1 "Inter",
    sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
}

.echoo-linkup-btn--outline:active {
  background: rgba(248, 245, 239, 0.06);
  transform: scale(0.98);
}

/* ── Other Ways to Connect Card ── */
.echoo-linkup-connect-card {
  background: #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
  border-radius: 24px;
  padding: 20px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.echoo-linkup-connect-title {
  margin: 0;
  font:
    700 17px/1.2 "Inter",
    sans-serif;
  color: var(--ink);
}

.echoo-linkup-ways-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.echoo-linkup-way-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(248, 245, 239, 0.035);
  border: 1px solid rgba(248, 245, 239, 0.07);
  border-radius: 16px;
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.14s ease;
  user-select: none;
}

.echoo-linkup-way-row:active {
  background: rgba(248, 245, 239, 0.08);
  border-color: rgba(231, 201, 142, 0.3);
  transform: scale(0.99);
}

.echoo-linkup-way-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.echoo-linkup-way-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(248, 245, 239, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: 0 0 32px;
}

.echoo-linkup-way-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.echoo-linkup-way-text {
  font:
    520 14px/1.3 "Inter",
    sans-serif;
  color: var(--ink);
}

.echoo-linkup-way-arrow {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.echoo-linkup-way-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Floating Action Chat Button */
.echoo-linkup-fab {
  position: fixed;
  bottom: 86px;
  right: max(20px, calc((100vw - 430px) / 2 + 20px));
  z-index: 45;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e4c48d 0%, #f7d5b2 100%);
  color: #12100c;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(231, 201, 142, 0.3);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.echoo-linkup-fab:active {
  transform: scale(0.92);
}

.echoo-linkup-fab svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.echoo-linkup-fab-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #f7d5b2;
}

/* ───────────────────────────────────────────────────────────────────────
   Hub (linkup.html) — live, state-driven module home. Reuses the gold
   accent (#E7C98E), glass cards (#111), and Inter type already in the file.
   ─────────────────────────────────────────────────────────────────────── */
.echoo-linkup-viewport {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.echoo-linkup-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 34px 22px 28px;
  background: #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
  border-radius: 24px;
}

.echoo-linkup-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(231, 201, 142, 0.14) 0%,
    rgba(18, 18, 18, 0.5) 72%
  );
  border: 1px solid rgba(231, 201, 142, 0.22);
  color: #e7c98e;
}
.echoo-linkup-state-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.echoo-linkup-state-title {
  margin: 2px 0 0;
  font:
    700 19px/1.2 "Inter",
    sans-serif;
  color: var(--ink);
}
.echoo-linkup-state-copy {
  margin: 0 0 6px;
  max-width: 320px;
  font:
    520 14px/1.45 "Inter",
    sans-serif;
  color: var(--muted);
}
.echoo-linkup-state .echoo-linkup-btn--hero,
.echoo-linkup-state .echoo-linkup-btn--outline {
  width: 100%;
  max-width: 280px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.echoo-linkup-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(231, 201, 142, 0.25);
  border-top-color: #e7c98e;
  animation: echoo-linkup-spin 0.8s linear infinite;
}
@keyframes echoo-linkup-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Presence card — standby vs active share one shell. */
.echoo-linkup-presence-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
}
.echoo-linkup-presence-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(248, 245, 239, 0.28);
}
.echoo-linkup-presence-dot--live {
  background: #e7c98e;
  box-shadow: 0 0 0 4px rgba(231, 201, 142, 0.18);
  animation: echoo-linkup-pulse 2.4s ease-in-out infinite;
}
@keyframes echoo-linkup-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(231, 201, 142, 0.16);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(231, 201, 142, 0.06);
  }
}
.echoo-linkup-presence-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.echoo-linkup-presence-title {
  font:
    650 14px/1.25 "Inter",
    sans-serif;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.echoo-linkup-presence-sub {
  font:
    520 12px/1.2 "Inter",
    sans-serif;
  color: var(--muted);
}
.echoo-linkup-presence-cta {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 9999px;
  font:
    680 12px/1 "Inter",
    sans-serif;
  text-decoration: none;
  background: rgba(231, 201, 142, 0.12);
  border: 1px solid rgba(231, 201, 142, 0.3);
  color: #e7c98e;
  cursor: pointer;
}
.echoo-linkup-presence-cta--ghost {
  background: transparent;
  border-color: rgba(248, 245, 239, 0.16);
  color: var(--ink);
}

.echoo-linkup-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.echoo-linkup-section-title {
  margin: 4px 2px 0;
  font:
    700 12px/1 "Inter",
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 245, 239, 0.55);
}
.echoo-linkup-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.echoo-linkup-peer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
  border-radius: 18px;
}
.echoo-linkup-peer-card--chat {
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    transform 0.14s ease;
}
.echoo-linkup-peer-card--chat:active {
  transform: scale(0.99);
  border-color: rgba(231, 201, 142, 0.3);
}
.echoo-linkup-peer-avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(248, 245, 239, 0.06);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(248, 245, 239, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    680 17px/1 "Inter",
    sans-serif;
  color: #e7c98e;
}
.echoo-linkup-peer-avatar.has-photo {
  color: transparent;
  border-color: transparent;
}
.echoo-linkup-peer-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.echoo-linkup-peer-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.echoo-linkup-peer-name {
  font:
    680 15px/1.2 "Inter",
    sans-serif;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.echoo-linkup-peer-reason {
  font:
    600 10px/1 "Inter",
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e7c98e;
}
.echoo-linkup-peer-bio {
  margin: 0;
  font:
    520 13px/1.35 "Inter",
    sans-serif;
  color: var(--soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.echoo-linkup-peer-meta {
  font:
    520 11px/1.2 "Inter",
    sans-serif;
  color: var(--muted);
}
.echoo-linkup-peer-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 104px;
}
.echoo-linkup-btn--sm {
  min-height: 38px;
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.echoo-linkup-empty {
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(248, 245, 239, 0.12);
  text-align: center;
}
.echoo-linkup-empty-copy {
  margin: 0;
  font:
    520 13px/1.45 "Inter",
    sans-serif;
  color: var(--muted);
}

/* Settings gear in the topbar */
.echoo-linkup-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(248, 245, 239, 0.1);
  background: rgba(248, 245, 239, 0.04);
  color: var(--ink);
  text-decoration: none;
}
.echoo-linkup-settings-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Toggle switch (settings page) */
.echoo-linkup-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 9999px;
  background: rgba(248, 245, 239, 0.12);
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.echoo-linkup-toggle.is-on {
  background: linear-gradient(135deg, #e4c48d 0%, #f7d5b2 100%);
}
.echoo-linkup-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.echoo-linkup-toggle.is-on::after {
  transform: translateX(20px);
}
.echoo-linkup-toggle[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* Settings rows */
.echoo-linkup-settings-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
  border-radius: 18px;
  padding: 6px 16px;
}
.echoo-linkup-settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(248, 245, 239, 0.06);
}
.echoo-linkup-settings-row:last-child {
  border-bottom: 0;
}
.echoo-linkup-settings-text {
  flex: 1;
  min-width: 0;
}
.echoo-linkup-settings-label {
  font:
    650 15px/1.2 "Inter",
    sans-serif;
  color: var(--ink);
}
.echoo-linkup-settings-hint {
  margin-top: 3px;
  font:
    520 12px/1.35 "Inter",
    sans-serif;
  color: var(--muted);
}
.echoo-linkup-settings-link-row {
  text-decoration: none;
  color: var(--ink);
}

/* ───────────────────────────────────────────────────────────────────────
   First-time welcome overlay — full-screen card, blurred rest of app
   ─────────────────────────────────────────────────────────────────────── */
.linkup-welcome[hidden] {
  display: none !important;
}

.linkup-welcome {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px
    max(20px, env(safe-area-inset-bottom));
}

.linkup-welcome-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border: 0;
  cursor: default;
}

.linkup-welcome-card {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  height: min(72svh, 640px);
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(248, 245, 239, 0.12);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: #0c0c0c;
  display: flex;
  flex-direction: column;
}

.linkup-welcome-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.linkup-welcome-dots {
  display: flex;
  gap: 5px;
  flex: 1;
  max-width: 120px;
}

.linkup-welcome-dot {
  height: 3px;
  flex: 1;
  border-radius: 999px;
  background: rgba(248, 245, 239, 0.22);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.linkup-welcome-dot.is-on {
  background: #e7c98e;
  box-shadow: 0 0 10px rgba(231, 201, 142, 0.55);
}

.linkup-welcome-skip {
  border: 0;
  background: rgba(5, 5, 5, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(248, 245, 239, 0.78);
  font: 560 11px/1 "Inter", sans-serif;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 245, 239, 0.1);
  cursor: pointer;
}

.linkup-welcome-skip:active {
  color: #e7c98e;
}

.linkup-welcome-slides {
  position: relative;
  flex: 1;
  min-height: 0;
}

.linkup-welcome-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition:
    opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.3s;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 22px 78px;
}

.linkup-welcome-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.linkup-welcome-copy h1 {
  margin: 0 0 8px;
  font: 800 clamp(30px, 8vw, 38px)/1.05 "Inter", sans-serif;
  letter-spacing: -0.035em;
  color: #f8f5ef;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.linkup-welcome-tag {
  margin: 0 0 8px;
  font: 540 15px/1.35 "Inter", sans-serif;
  color: rgba(248, 245, 239, 0.94);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.linkup-welcome-tag span {
  color: #e7c98e;
  font-weight: 650;
}

.linkup-welcome-desc {
  margin: 0;
  max-width: 280px;
  font: 480 13px/1.4 "Inter", sans-serif;
  color: rgba(248, 245, 239, 0.7);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.linkup-welcome-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.linkup-welcome-next {
  border: 0;
  min-width: 88px;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(248, 245, 239, 0.94);
  color: #0c0c0c;
  font: 680 13px/1 "Inter", sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.linkup-welcome-next:active {
  transform: scale(0.97);
  opacity: 0.92;
}

/* ───────────────────────────────────────────────────────────────────────
   Find a place — minimal aesthetic bottom sheet
   ─────────────────────────────────────────────────────────────────────── */
.linkup-find[hidden] {
  display: none !important;
}

.linkup-find {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.linkup-find-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.linkup-find-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(86svh, 720px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #141412 0%, #0b0b0b 100%);
  border: 1px solid rgba(248, 245, 239, 0.1);
  border-bottom: 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(12px);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease;
}

.linkup-find.is-open .linkup-find-sheet {
  transform: translateY(0);
  opacity: 1;
}

.linkup-find-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(248, 245, 239, 0.18);
  margin: 2px auto 4px;
}

.linkup-find-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.linkup-find-eyebrow {
  margin: 0 0 4px;
  font: 620 11px/1 "Inter", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(231, 201, 142, 0.85);
}

.linkup-find-head h2 {
  margin: 0;
  font: 750 24px/1.1 "Inter", sans-serif;
  letter-spacing: -0.03em;
  color: var(--ink, #f8f5ef);
}

.linkup-find-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(248, 245, 239, 0.1);
  background: rgba(248, 245, 239, 0.05);
  color: rgba(248, 245, 239, 0.7);
  font-size: 13px;
  cursor: pointer;
}

.linkup-find-sub {
  margin: -2px 0 0;
  font: 480 13px/1.4 "Inter", sans-serif;
  color: var(--muted, #9e978e);
  max-width: 34ch;
}

.linkup-find-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  border-radius: 14px;
  background: rgba(248, 245, 239, 0.05);
  border: 1px solid rgba(248, 245, 239, 0.1);
}

.linkup-find-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: rgba(248, 245, 239, 0.45);
  stroke-width: 1.8;
  fill: none;
}

.linkup-find-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink, #f8f5ef);
  font: 520 14px/1.2 "Inter", sans-serif;
}

.linkup-find-search input::placeholder {
  color: rgba(248, 245, 239, 0.38);
}

.linkup-find-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.linkup-find-chips::-webkit-scrollbar {
  display: none;
}

.linkup-find-chip {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(248, 245, 239, 0.1);
  background: transparent;
  color: rgba(248, 245, 239, 0.72);
  font: 560 12px/1 "Inter", sans-serif;
  cursor: pointer;
}

.linkup-find-chip.is-on {
  background: rgba(231, 201, 142, 0.14);
  border-color: rgba(231, 201, 142, 0.35);
  color: #e7c98e;
}

.linkup-find-results {
  flex: 1;
  min-height: 180px;
  max-height: 42svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
}

.linkup-find-loading,
.linkup-find-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  text-align: center;
  color: var(--muted, #9e978e);
  font: 500 13px/1.4 "Inter", sans-serif;
  padding: 20px;
}

.linkup-find-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(248, 245, 239, 0.07);
  background: rgba(248, 245, 239, 0.03);
  color: inherit;
  cursor: pointer;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    transform 0.12s ease;
}

.linkup-find-row:active {
  transform: scale(0.99);
  background: rgba(248, 245, 239, 0.06);
  border-color: rgba(231, 201, 142, 0.28);
}

.linkup-find-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, rgba(231, 201, 142, 0.18), rgba(248, 245, 239, 0.04)),
    #1a1917;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(248, 245, 239, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e7c98e;
  font: 700 14px/1 "Inter", sans-serif;
}

.linkup-find-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.linkup-find-name {
  font: 650 14px/1.25 "Inter", sans-serif;
  color: var(--ink, #f8f5ef);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linkup-find-detail {
  font: 480 12px/1.3 "Inter", sans-serif;
  color: var(--muted, #9e978e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linkup-find-dist {
  flex-shrink: 0;
  font: 600 11px/1 "Inter", sans-serif;
  color: rgba(231, 201, 142, 0.9);
  letter-spacing: 0.02em;
}

.linkup-find-browse {
  display: block;
  text-align: center;
  padding: 10px 8px 2px;
  color: rgba(248, 245, 239, 0.55);
  font: 560 12px/1 "Inter", sans-serif;
  text-decoration: none;
}

.linkup-find-browse:active {
  color: #e7c98e;
}

/* Standby hero — stable landing when presence is off */
.echoo-linkup-standby {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 28px 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 80% 0%,
      rgba(231, 201, 142, 0.12),
      transparent 55%
    ),
    #111111;
  border: 1px solid rgba(248, 245, 239, 0.08);
  text-align: center;
}

.echoo-linkup-standby-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(231, 201, 142, 0.28);
  background: radial-gradient(
    circle at 50% 40%,
    rgba(231, 201, 142, 0.16),
    rgba(18, 18, 18, 0.5) 70%
  );
  color: #e7c98e;
  box-shadow: 0 0 28px rgba(231, 201, 142, 0.12);
}

.echoo-linkup-standby-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.echoo-linkup-standby-title {
  margin: 0;
  font: 750 22px/1.15 "Inter", sans-serif;
  letter-spacing: -0.03em;
  color: var(--ink, #f8f5ef);
}

.echoo-linkup-standby-copy {
  margin: -6px 0 0;
  font: 500 14px/1.45 "Inter", sans-serif;
  color: var(--muted, #9e978e);
  max-width: 30ch;
  align-self: center;
}

.echoo-linkup-standby-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #e4c48d 0%, #f7d5b2 100%);
  color: #12100c;
  font: 720 15px/1 "Inter", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(231, 201, 142, 0.22);
}

.echoo-linkup-standby-cta:active {
  transform: scale(0.98);
}

.echoo-linkup-standby-cta svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.echoo-linkup-standby-hint {
  margin: 0;
  font: 480 12px/1.35 "Inter", sans-serif;
  color: rgba(248, 245, 239, 0.4);
}

/* Presence CTA as button (find place) */
button.echoo-linkup-presence-cta {
  appearance: none;
  font-family: inherit;
}

/* Reduced motion adjustments */
@media (prefers-reduced-motion: reduce) {
  .echoo-linkup-checkin,
  .echoo-linkup-card,
  .echoo-linkup-chat-sheet,
  .echoo-linkup-backdrop,
  .echoo-linkup-chat-backdrop,
  .echoo-linkup-btn--hero,
  .echoo-linkup-way-row,
  .echoo-linkup-fab,
  .echoo-linkup-presence-dot--live,
  .echoo-linkup-spinner,
  .fab-culture-lens,
  .linkup-welcome-slide,
  .linkup-find-sheet {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
