:root {
  --paper: #efe6d2;
  --paper-deep: #d6c7aa;
  --ink: #171110;
  --ink-soft: #382721;
  --amber: #c58a42;
  --amber-bright: #f0d28a;
  --rose: #d85d6c;
  --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(216, 93, 108, 0.22) 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: Verdana, Tahoma, 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(76, 22, 32, 0.3), 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) + 6px) 18px calc(env(safe-area-inset-bottom) + 30px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  margin: 8px auto 28px;
  padding: 18px 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(216, 93, 108, 0.16), 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: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  place-items: center;
  color: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  transform: none;
  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, #4b151e, #d85d6c, #d8a24f, #211112, #4b151e);
  box-shadow:
    0 12px 26px rgba(78, 22, 33, 0.22),
    0 0 0 6px 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(92, 50, 29, 0.72);
  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: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.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: #4b2119;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(75, 33, 25, 0.14);
  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, #251112 0%, #5a1b25 46%, #241112 100%),
    linear-gradient(90deg, var(--amber), var(--amber-bright));
  box-shadow:
    0 18px 34px rgba(84, 27, 36, 0.24),
    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(216, 155, 80, 0.22), 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, #261616 0%, #100b0b 48%, #3a1520 100%);
  box-shadow:
    0 30px 70px rgba(58, 18, 24, 0.34),
    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(216, 155, 80, 0.2) 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: #351713;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, #fff4be 0%, #d2aa55 46%, #d85d6c 100%);
  box-shadow:
    0 14px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  font-family: Georgia, "Times New Roman", 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 50%, #f3a0aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.24));
  font-family: Georgia, "Times New Roman", 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;
}

.cashback-panel {
  position: absolute;
  right: clamp(24px, 5vw, 42px);
  bottom: 32%;
  z-index: 2;
  min-width: min(46%, 260px);
  padding: clamp(12px, 2.8vw, 18px);
  text-align: right;
  border: 1px solid rgba(255, 245, 208, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 241, 189, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(18, 10, 10, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.cashback-panel p {
  margin: 4px 0 2px;
  color: #ffe3ab;
  font-size: clamp(22px, 5vw, 38px);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.cashback-panel small {
  display: block;
  color: rgba(255, 245, 208, 0.62);
  font-size: clamp(8px, 1.8vw, 12px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.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: #ffe3ab;
  letter-spacing: 0.08em;
}

.signature-line {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border: solid rgba(216, 155, 80, 0.34);
  filter: drop-shadow(0 0 12px rgba(216, 155, 80, 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) + 4px);
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .avatar-orb {
    width: 68px;
    height: 68px;
    margin-bottom: 10px;
    font-size: 28px;
  }

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

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

  .cashback-panel {
    right: 18px;
    bottom: 31%;
    min-width: 44%;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .brand-block {
    gap: 9px;
  }

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