:root {
  --paper: #efe6d2;
  --paper-deep: #d6c7aa;
  --ink: #101614;
  --ink-soft: #26302c;
  --forest: #0e332d;
  --forest-2: #041c1a;
  --mint: #84e6cf;
  --amber: #d7b56d;
  --amber-bright: #f3df9e;
  --rose: #ff6f83;
  --white: #fffaf0;
  --muted: rgba(16, 22, 20, 0.58);
  --shadow: rgba(22, 18, 11, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.95) 0 12%, transparent 32%),
    radial-gradient(circle at 82% 4%, rgba(132, 230, 207, 0.3) 0 10%, transparent 30%),
    radial-gradient(circle at 78% 74%, rgba(215, 181, 109, 0.38) 0 12%, transparent 34%),
    linear-gradient(145deg, #f6edda 0%, #dccaaa 52%, #bda77b 100%);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(16, 22, 20, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 22, 20, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.48), transparent 72%);
}

body::after {
  position: fixed;
  inset: auto -20% -28% -20%;
  height: 46vh;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at center, rgba(7, 46, 40, 0.32), transparent 64%);
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 44px) 18px calc(env(safe-area-inset-bottom) + 30px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  margin: 64px auto 38px;
  padding: 86px 22px 20px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.88), rgba(233, 219, 190, 0.72)),
    radial-gradient(circle at 18% 0%, rgba(132, 230, 207, 0.24), transparent 34%);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 34px;
  box-shadow:
    0 28px 60px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(90, 75, 42, 0.12);
  backdrop-filter: blur(18px);
  animation: rise-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 22%, rgba(255, 255, 255, 0.58) 34%, transparent 48%),
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.72), transparent 38%);
  opacity: 0.78;
}

.avatar-orb {
  position: absolute;
  top: -68px;
  left: 50%;
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  color: #fff8e8;
  font-family: "Copperplate", "Optima", "Avenir Next", sans-serif;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.86), transparent 0 12%, transparent 28%),
    conic-gradient(from 210deg, #0f4038, #2bd3b4, #d8b260, #111b19, #0f4038);
  box-shadow:
    0 20px 40px rgba(6, 43, 37, 0.24),
    0 0 0 10px rgba(255, 255, 255, 0.18),
    inset 0 0 28px rgba(255, 255, 255, 0.2);
}

.eyebrow {
  position: relative;
  margin: 0 auto 10px;
  color: rgba(7, 46, 40, 0.64);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.hero-card h1 {
  position: relative;
  max-width: 600px;
  margin: 0 auto 10px;
  color: var(--ink);
  font-family: "Optima", "Avenir Next", "Gill Sans", sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.subscription-line {
  position: relative;
  min-height: 28px;
  margin: 0 auto 12px;
  color: rgba(16, 22, 20, 0.58);
  font-size: clamp(16px, 3.2vw, 22px);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.subscription-line.expired {
  color: #a43b4e;
}

.days-badge {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  margin: 0 auto 20px;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  color: #0e332d;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(14, 51, 45, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.days-badge.expired {
  color: #8c283d;
  background: rgba(255, 111, 131, 0.12);
  border-color: rgba(255, 111, 131, 0.26);
}

.pay-button {
  position: relative;
  width: 100%;
  min-height: 72px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: #fff8e8;
  background:
    linear-gradient(90deg, #072c27 0%, #0e5147 46%, #0b2825 100%),
    linear-gradient(90deg, var(--amber), var(--amber-bright));
  box-shadow:
    0 18px 34px rgba(6, 43, 37, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.24);
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.pay-button::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 0 22%, rgba(255, 255, 255, 0.34) 42%, transparent 58%);
  transform: translateX(-120%);
  animation: button-shine 4.4s ease-in-out infinite;
}

.pay-button:active {
  transform: translateY(1px) scale(0.995);
  filter: brightness(0.96);
}

.club-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.64;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 18%, rgba(132, 230, 207, 0.28), transparent 18%),
    radial-gradient(circle at 82% 12%, rgba(243, 223, 158, 0.28), transparent 20%),
    radial-gradient(circle at 64% 84%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(135deg, #10221f 0%, #05100f 48%, #122b26 100%);
  box-shadow:
    0 30px 70px rgba(4, 28, 26, 0.38),
    0 10px 28px rgba(22, 18, 11, 0.24),
    inset 0 0 0 1px rgba(243, 223, 158, 0.16),
    inset 0 -36px 70px rgba(0, 0, 0, 0.36);
  animation: rise-in 760ms 90ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.card-glow {
  position: absolute;
  inset: -28%;
  pointer-events: none;
  background:
    conic-gradient(from 120deg at 54% 48%, transparent 0deg, rgba(132, 230, 207, 0.18) 62deg, rgba(243, 223, 158, 0.24) 116deg, transparent 178deg, transparent 360deg),
    linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.12) 42%, transparent 56%);
  mix-blend-mode: screen;
  opacity: 0.92;
  transform: rotate(-7deg);
}

.card-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.075), transparent 28%, rgba(255, 255, 255, 0.045) 47%, transparent 70%),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(8deg, rgba(243, 223, 158, 0.035) 0 1px, transparent 1px 22px);
  opacity: 0.78;
}

.card-top,
.card-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.brand-block {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: clamp(42px, 8vw, 58px);
  height: clamp(42px, 8vw, 58px);
  place-items: center;
  color: #11312b;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, #fff4be 0%, #d2aa55 44%, #8be8d3 100%);
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  font-family: "Copperplate", "Optima", "Avenir Next", sans-serif;
  font-size: clamp(10px, 2vw, 14px);
  font-weight: 950;
  letter-spacing: 0.06em;
}

.brand-title,
.brand-subtitle,
.tier,
.card-bottom p,
.card-label {
  margin: 0;
  text-transform: uppercase;
}

.brand-title {
  max-width: 250px;
  color: #fff5d0;
  font-size: clamp(12px, 2.25vw, 17px);
  font-weight: 950;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin-top: 7px;
  color: rgba(255, 245, 208, 0.62);
  font-size: clamp(8px, 1.7vw, 12px);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.tier {
  color: transparent;
  background: linear-gradient(180deg, #fff4be 0%, #b58d42 48%, #6ce6cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.24));
  font-family: "Copperplate", "Optima", "Avenir Next", sans-serif;
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.card-chip {
  position: absolute;
  top: 42%;
  left: clamp(24px, 5vw, 42px);
  z-index: 2;
  display: grid;
  width: clamp(46px, 9vw, 68px);
  height: clamp(34px, 6vw, 48px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 12px;
  background:
    linear-gradient(135deg, #f6df92 0%, #9b7736 52%, #f4e2a3 100%);
  box-shadow: inset 0 0 0 1px rgba(63, 44, 13, 0.22), 0 12px 24px rgba(0, 0, 0, 0.22);
}

.card-chip span {
  display: block;
  border-bottom: 1px solid rgba(65, 45, 14, 0.36);
}

.card-chip span:last-child {
  border-bottom: 0;
}

.card-bottom {
  position: absolute;
  right: clamp(24px, 5vw, 42px);
  bottom: clamp(24px, 5vw, 40px);
  left: clamp(24px, 5vw, 42px);
  align-items: flex-end;
}

.card-bottom > div:last-child {
  text-align: right;
}

.card-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 245, 208, 0.52);
  font-size: clamp(8px, 1.7vw, 11px);
  font-weight: 850;
  letter-spacing: 0.18em;
}

.card-bottom p {
  color: #fff1bd;
  font-size: clamp(14px, 2.8vw, 21px);
  font-weight: 760;
  letter-spacing: 0.02em;
}

.card-bottom p:last-child {
  color: #b7f2e5;
  letter-spacing: 0.08em;
}

.signature-line {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border: solid rgba(132, 230, 207, 0.34);
  filter: drop-shadow(0 0 12px rgba(132, 230, 207, 0.18));
}

.signature-line-a {
  top: 34%;
  right: -7%;
  width: 58%;
  height: 36%;
  border-width: 2px 0 0 2px;
  border-radius: 70% 0 0 0;
  transform: rotate(-14deg);
}

.signature-line-b {
  top: 20%;
  left: 44%;
  width: 28%;
  height: 60%;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 90%;
  transform: rotate(18deg);
  border-color: rgba(243, 223, 158, 0.28);
}

.signature-line-c {
  right: 16%;
  bottom: 18%;
  width: 34%;
  height: 18%;
  border-width: 2px 0 0;
  border-radius: 90% 0 0;
  transform: rotate(-10deg);
}

.legal-text {
  max-width: 650px;
  margin: 28px auto 0;
  color: rgba(16, 22, 20, 0.58);
  text-align: center;
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 760;
  line-height: 1.28;
  letter-spacing: -0.035em;
  animation: rise-in 820ms 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.state-box {
  margin: 22px auto 0;
  padding: 16px 18px;
  color: #5f1f30;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(164, 59, 78, 0.22);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.36;
}

.hidden {
  display: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes button-shine {
  0%,
  48% {
    transform: translateX(-120%);
  }
  68%,
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding-top: calc(env(safe-area-inset-top) + 34px);
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-card {
    margin-top: 52px;
    margin-bottom: 30px;
    padding: 70px 18px 18px;
    border-radius: 28px;
  }

  .avatar-orb {
    top: -54px;
    width: 108px;
    height: 108px;
    font-size: 42px;
  }

  .pay-button {
    min-height: 60px;
  }

  .club-card {
    border-radius: 22px;
  }

  .brand-block {
    gap: 9px;
  }

  .brand-title {
    max-width: 170px;
  }
}
