:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6f8f6;
  background: #101914;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(130, 238, 137, 0.19), transparent 38rem),
    linear-gradient(145deg, #101914 0%, #08100c 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.page-shell {
  position: relative;
  display: grid;
  width: min(100% - 32px, 500px);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 32px 0 24px;
  place-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #f6f8f6;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  color: #101914;
  background: #82ee89;
  border-radius: 9px 5px 9px 5px;
  font-size: 1rem;
  letter-spacing: 0;
  place-items: center;
  transform: skew(-6deg);
}

.content-card {
  width: 100%;
  padding: 36px 30px 32px;
  overflow: hidden;
  text-align: center;
  background: rgba(27, 40, 32, 0.84);
  border: 1px solid rgba(167, 203, 174, 0.16);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

[hidden] {
  display: none !important;
}

.avatar-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 25px;
}

.avatar-wrap::after {
  position: absolute;
  inset: -7px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(130, 238, 137, 0.44);
  border-radius: 50%;
}

.avatar {
  width: 148px;
  height: 148px;
  object-fit: contain;
  background: linear-gradient(145deg, #293c30, #18251d);
  border-radius: 50%;
}

.avatar-fallback::before {
  display: grid;
  width: 100%;
  height: 100%;
  content: "🚴";
  font-size: 3.6rem;
  place-items: center;
  filter: grayscale(1);
}

.eyebrow {
  margin: 0 0 10px;
  color: #82ee89;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.invite-card h1 {
  max-width: 12ch;
  margin-inline: auto;
  font-size: clamp(2rem, 7vw, 2.55rem);
}

.profile-location {
  margin: 12px 0 0;
  color: #c2cec5;
  font-size: 0.92rem;
}

.supporting-copy,
.state-card p {
  max-width: 34ch;
  margin: 23px auto 0;
  color: #b5c1b8;
  line-height: 1.55;
}

.participant-avatars {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  margin: 26px 0 22px;
  padding-left: 12px;
}

.participant-avatar {
  position: relative;
  width: 68px;
  height: 68px;
  margin-left: -12px;
  overflow: hidden;
  background: linear-gradient(145deg, #304638, #1b2b21);
  border: 3px solid #1b2820;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.participant-avatar:first-child {
  margin-left: 0;
  border-color: #82ee89;
}

.participant-avatar img,
.participant-avatar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.participant-avatar img {
  z-index: 1;
  object-fit: contain;
}

.participant-avatar-fallback {
  display: grid;
  color: #d9e2db;
  font-size: 1.35rem;
  font-weight: 800;
  place-items: center;
}

.competition-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.competition-facts > div {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 7px;
  padding: 12px;
  text-align: left;
  background: rgba(6, 14, 9, 0.35);
  border: 1px solid rgba(167, 203, 174, 0.11);
  border-radius: 14px;
}

.fact-label {
  color: #8e9b91;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.competition-facts strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.expiry {
  margin: 14px 0 0;
  color: #93a097;
  font-size: 0.78rem;
}

.invite-prompt {
  margin-top: 20px;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.auth-actions {
  margin-top: 18px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  color: #f6f8f6;
  background: transparent;
  border: 1px solid rgba(198, 216, 201, 0.26);
  border-radius: 14px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: #0f1913;
  background: #82ee89;
  border-color: #82ee89;
}

.button-link {
  min-height: 38px;
  padding: 4px;
  color: #a8d9ad;
  border: 0;
  font-size: 0.87rem;
}

.provider-button {
  position: relative;
  color: #172019;
  background: #fff;
  border-color: #fff;
}

.provider-button.provider-apple {
  color: #fff;
  background: #050706;
  border-color: #56615a;
}

.provider-button .provider-mark {
  position: absolute;
  left: 18px;
  display: grid;
  width: 24px;
  height: 24px;
  font-size: 1.05rem;
  font-weight: 800;
  place-items: center;
}

.google-mark {
  color: #4285f4;
}

.apple-mark {
  font-size: 0.85rem;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid rgba(130, 238, 137, 0.45);
  outline-offset: 3px;
}

.legal-copy {
  max-width: 42ch;
  margin: 18px auto 0;
  color: #738078;
  font-size: 0.68rem;
  line-height: 1.45;
}

.inline-error {
  margin: 14px 0 0;
  padding: 11px 13px;
  color: #ffd3cb;
  background: rgba(160, 47, 30, 0.18);
  border: 1px solid rgba(255, 139, 120, 0.25);
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.state-card {
  padding-block: 46px;
}

.state-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 24px;
  color: #82ee89;
  background: rgba(130, 238, 137, 0.1);
  border-radius: 50%;
  font-size: 2rem;
  place-items: center;
}

.success-icon {
  color: #102017;
  background: #82ee89;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(130, 238, 137, 0.16);
  border-top-color: #82ee89;
  animation: spin 0.9s linear infinite;
}

.state-card .button {
  width: 100%;
  margin-top: 28px;
}

.state-card .actions .button {
  margin-top: 0;
}

#loading p {
  margin-top: 26px;
  font-size: 0.9rem;
}

.avatar-placeholder {
  margin: 0 auto 28px;
}

.loading-line {
  width: 42%;
  height: 14px;
  margin: 10px auto;
  border-radius: 7px;
}

.loading-line-wide {
  width: 68%;
  height: 28px;
}

.shimmer {
  background: linear-gradient(100deg, #213128 20%, #33483a 45%, #213128 70%);
  background-size: 250% 100%;
  animation: shimmer 1.4s infinite linear;
}

footer {
  position: relative;
  height: 72px;
  color: #758079;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

@keyframes shimmer {
  to { background-position-x: -250%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 20px, 500px);
    padding-top: 20px;
  }

  .content-card {
    padding: 30px 22px 26px;
    border-radius: 22px;
  }

  .competition-facts {
    grid-template-columns: 1fr;
  }

  .competition-facts > div {
    min-height: 68px;
  }

  .participant-avatar {
    width: 62px;
    height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shimmer,
  .spinner {
    animation: none;
  }

  .button:hover {
    transform: none;
  }
}

/* Pruvi route surfaces */
body.landing-active {
  background: #111;
}

body.landing-active::before,
body.landing-active #route-root {
  display: none;
}

body.route-active {
  color: #fff;
  background: #2a1b1b url("/landing/assets/landing/app-gradient.svg") center / cover fixed no-repeat;
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

body.route-active::before {
  opacity: 0.2;
  background-image: radial-gradient(circle at center, transparent 0, rgba(12, 10, 10, 0.62) 100%);
  mask-image: none;
}

.route-active .page-shell {
  width: min(100% - 32px, 540px);
  min-height: calc(100svh - 68px);
  padding-block: 28px;
}

.route-active .brand {
  margin-bottom: 22px;
}

.route-active .brand img {
  display: block;
  width: 118px;
  height: auto;
}

.route-active .content-card {
  padding: 40px 34px 34px;
  background: rgba(16, 15, 15, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(24px) saturate(125%);
}

.route-active .eyebrow {
  color: #ff5f67;
}

.route-active h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2.5rem, 10vw, 3.6rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.route-active .supporting-copy,
.route-active .state-card p,
.route-active .profile-location {
  color: rgba(255, 255, 255, 0.66);
}

.route-active .profile-stage {
  position: relative;
  width: 210px;
  height: 180px;
  margin: -12px auto 20px;
  background: radial-gradient(circle at 50% 70%, rgba(255, 95, 103, 0.3), transparent 65%);
}

.route-active .profile-stage::before,
.route-active .profile-stage::after {
  position: absolute;
  inset: auto 10px 10px;
  height: 72px;
  content: "";
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  transform: rotate(-5deg);
}

.route-active .profile-stage::after {
  inset: auto 0 0 20px;
  transform: rotate(6deg);
}

.route-active .avatar-wrap {
  z-index: 2;
  width: 168px;
  height: 168px;
  margin-bottom: 0;
}

.route-active .avatar-wrap::after {
  border-color: rgba(255, 95, 103, 0.7);
}

.route-active .avatar {
  width: 168px;
  height: 168px;
  background: linear-gradient(145deg, #3a2929, #171515);
}

.route-active .participant-avatar {
  background: linear-gradient(145deg, #473132, #20191a);
  border-color: #171515;
}

.route-active .participant-avatar:first-child {
  border-color: #ff5f67;
}

.route-active .competition-facts > div {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
}

.route-active .fact-label,
.route-active .expiry {
  color: rgba(255, 255, 255, 0.48);
}

.route-active .button-primary {
  color: #171313;
  background: #ff5f67;
  border-color: #ff5f67;
}

.route-active .button-link {
  color: #ff9ca1;
}

.route-active .button:focus-visible {
  outline-color: rgba(255, 95, 103, 0.55);
}

.route-active .state-icon {
  color: #ff5f67;
  background: rgba(255, 95, 103, 0.12);
}

.route-active .success-icon {
  color: #171313;
  background: #ff5f67;
}

.route-active .spinner {
  border-color: rgba(255, 95, 103, 0.18);
  border-top-color: #ff5f67;
}

.route-active .shimmer {
  background: linear-gradient(100deg, #2a2323 20%, #453536 45%, #2a2323 70%);
  background-size: 250% 100%;
}

.club-emblem {
  display: grid;
  width: 112px;
  height: 112px;
  margin: 28px auto;
  color: #171313;
  background: linear-gradient(145deg, #ff7a81, #ff4d57);
  border: 8px solid rgba(255, 255, 255, 0.08);
  border-radius: 36px 22px 36px 22px;
  box-shadow: 0 20px 48px rgba(255, 64, 74, 0.2);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 4rem;
  font-weight: 800;
  place-items: center;
  transform: rotate(-5deg);
}

.club-emblem span {
  transform: rotate(5deg);
}

.route-footer {
  height: 68px;
  color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 420px) {
  .route-active .page-shell {
    width: min(100% - 20px, 540px);
  }

  .route-active .content-card {
    padding: 32px 22px 28px;
    border-radius: 24px;
  }
}
