:root {
  color-scheme: dark;
  --vh: 100dvh;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #000;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.page {
  width: 100%;
  height: 100vh;
  height: var(--vh);
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.bg-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.bg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}

.bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.35) 58%,
    rgba(0, 0, 0, 0.72) 82%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.profile-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  margin-top: auto;
  padding: 0 24px;
  padding-bottom: max(56px, env(safe-area-inset-bottom, 0px) + 40px);
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: clamp(190px, 52vw, 220px);
  height: clamp(190px, 52vw, 220px);
  border-radius: 50%;
  border: 8px solid #fff;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.25);
}

.name {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: 500;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.badge {
  flex: none;
  transform: translateY(1px);
}

.cta {
  margin-top: 26px;
  width: 100%;
  max-width: 320px;
  padding: 16px 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  background: rgba(255, 255, 255, 0.24);
}

.cta:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fallback-msg {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.4;
  max-width: 280px;
}

@media (min-width: 640px) {
  html, body {
    background: #0a0a0a;
  }

  .page {
    padding: 24px 0;
  }

  .frame {
    max-width: 480px;
    height: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
}
