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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Brand-green depth gradient with a soft gold aura behind the hero */
  background:
    radial-gradient(ellipse 120% 45% at 50% -5%, rgba(212,175,55,0.14), transparent 60%),
    linear-gradient(180deg, #16412D 0%, #0C2A1C 45%, #071A10 100%);
  background-attachment: fixed;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

.icon {
  width: 104px;
  height: 104px;
  border-radius: 23%;            /* Apple app-icon corner radius */
  margin: 0 auto 20px;
  display: block;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.08);
}

h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.tagline {
  font-size: 1.05rem;
  color: #D4AF37;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-bottom: 28px;
}

/* ── Invite pages (invite.html / community.html) ──
   Built for someone who won't read: whose group, then two numbered buttons.
   The marketing sections live on index.html only. */
.invite-page { justify-content: flex-start; padding: 28px 16px 48px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: #fff; text-decoration: none;
  font-size: 1.45rem; font-weight: 800; letter-spacing: -0.3px;
  margin-bottom: 18px;
}
.brand-icon { width: 46px; height: 46px; border-radius: 11px; box-shadow: 0 6px 20px rgba(0,0,0,0.4); }

.invite-banner {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,175,55,0.45);
  border-radius: 18px;
  padding: 18px 14px 16px;
  margin: 0 auto 20px;
  max-width: 400px;
  width: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 44px rgba(0,0,0,0.45);
}
.invite-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  line-height: 1;
  background: #EEFFF6;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.55), 0 6px 22px rgba(0,0,0,0.4);
  overflow: hidden;
}
.invite-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.invite-avatar img.appmark { width: 72%; height: 72%; object-fit: contain; }
/* Built-in group marks: the app draws them at 85% of the avatar with a 22%
   corner radius over the group color — same recipe here. */
.invite-avatar img.mark { width: 85%; height: 85%; object-fit: cover; border-radius: 22%; }
.invite-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #D4AF37;
  margin-bottom: 3px;
}
.invite-group-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  min-height: 1.15em;
  margin-bottom: 14px;
}

/* Loading placeholders — the card never shows a stand-in icon that could be
   mistaken for the group's own; it shows "loading" until the lookup answers. */
.skeleton { display: inline-block; background: rgba(255,255,255,0.14); animation: pulse 1.2s ease-in-out infinite; }
.skeleton-dot { width: 100%; height: 100%; border-radius: 50%; background: rgba(0,0,0,0.12); }
.skeleton-bar { width: 60%; height: 0.9em; border-radius: 8px; vertical-align: middle; }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Two numbered steps. Each is a title row then its action on its own line,
   so the App Store badge (wide) fits on a phone; the Join button is sized
   like the badge so the two actions read as siblings. */
.steps { list-style: none; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.step {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 10px 10px 12px;
}
.step-head { display: flex; align-items: center; gap: 10px; }
.step-num {
  flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.18); color: #D4AF37;
  font-size: 0.78rem; font-weight: 800;
}
.step-title { flex: 1 1 auto; font-size: 0.95rem; font-weight: 700; }
/* Actions sit centered under their title, using the step's FULL width
   (no indent under the number). The two store badges ALWAYS share one row:
   each takes half, shrinking to fit, and the text never wraps — they scale
   down on the narrowest phones instead of stacking. */
.step-action { display: flex; justify-content: center; align-items: stretch; flex-wrap: nowrap; gap: 8px; }
.step .store-badge {
  flex: 1 1 0; min-width: 0; justify-content: center;
  margin: 0; gap: 8px; padding: 8px 10px; border-radius: 11px;
}
.step .store-badge svg { width: 18px; height: 22px; }
.step .store-badge-text { min-width: 0; }
.step .store-badge-text small, .step .store-badge-text strong { white-space: nowrap; }
.step .store-badge-text small { font-size: 0.58rem; }
.step .store-badge-text strong { font-size: 0.98rem; }
@media (max-width: 360px) {
  .step .store-badge { gap: 6px; padding: 7px 8px; }
  .step .store-badge svg { width: 15px; height: 19px; }
  .step .store-badge-text small { font-size: 0.52rem; }
  .step .store-badge-text strong { font-size: 0.86rem; }
}
/* "Coming soon" placeholder: same anatomy, dimmed, dashed, not tappable */
.store-badge-soon {
  opacity: 0.55;
  border-style: dashed;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.store-badge-soon:hover { transform: none; box-shadow: none; }
.step-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 160px; max-width: 100%;
  text-align: center; overflow-wrap: anywhere;
  padding: 10px 20px;
  border-radius: 11px;
  background: #fff; color: #0C2A1C;
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 0.95rem; font-weight: 700; letter-spacing: -0.2px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
  -webkit-tap-highlight-color: transparent;
}
.step-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(0,0,0,0.55); }
.step-btn:active { transform: translateY(0); }
/* One plain line under a step's button: what to tap on the page it opens. */
.step-hint { font-size: 0.78rem; color: rgba(255,255,255,0.55); text-align: center; line-height: 1.4; }
.step-hint b { color: rgba(255,255,255,0.85); font-weight: 600; }

.invite-code-line {
  margin-top: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  -webkit-tap-highlight-color: transparent;
}
.invite-code-line:hover .invite-code-chip { border-style: solid; background: rgba(212,175,55,0.16); }
.invite-code-chip {
  display: inline-block;
  padding: 3px 9px;
  border: 1px dashed rgba(212,175,55,0.6);
  border-radius: 7px;
  background: rgba(212,175,55,0.08);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  font-variant-numeric: tabular-nums;
}
.invite-code-tap { color: #D4AF37; font-weight: 600; }
.invite-page .features { margin-top: 4px; }
.blurb {
  max-width: 340px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  margin-bottom: 22px;
}

/* ── Primary CTA: official-style App Store badge, front and center ── */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 13px;
  padding: 12px 26px 12px 20px;
  text-decoration: none;
  color: #fff;
  margin-bottom: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
}
.store-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin-bottom: 6px; }
.store-row .store-badge { margin-bottom: 0; }
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(0,0,0,0.55); }
.store-badge svg { width: 26px; height: 32px; flex-shrink: 0; }
.store-badge-text { text-align: left; line-height: 1.15; }
.store-badge-text small {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.85);
}
.store-badge-text strong {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.free-note {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 40px;
}

.description {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 400px;
  line-height: 1.65;
  margin-bottom: 36px;
}

/* ── Feature cards: frosted glass ── */
.features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
  width: 100%;
}
.feature {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 15px 17px;
  text-align: left;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.feature-icon { font-size: 24px; flex-shrink: 0; }
.feature-text { font-size: 0.88rem; color: rgba(255,255,255,0.75); line-height: 1.45; }
.feature-text strong { color: #fff; display: block; font-size: 0.95rem; margin-bottom: 1px; }

.footer {
  margin-top: 44px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.28);
}

@media (min-width: 700px) {
  /* 2×2 grid — four cards in one row gets cramped */
  .features { max-width: 720px; flex-flow: row wrap; }
  .feature { flex: 1 1 300px; flex-direction: column; text-align: center; gap: 10px; padding: 22px 16px; }
  .feature-text { text-align: center; }
}
