:root {
  --bg0: #05060a;
  --bg1: #0b1018;
  --glass: rgba(10, 14, 22, 0.72);
  --card: rgba(16, 22, 34, 0.78);
  --line: rgba(168, 214, 226, 0.16);
  --line-strong: rgba(232, 195, 138, 0.38);
  --text: #f4f7fb;
  --muted: #9aa8bc;
  --cyan: #8ae6ef;
  --cyan-2: #4ec4d4;
  --gold: #e8c38a;
  --gold-2: #c9a05a;
  --btn: linear-gradient(180deg, #9af0f6 0%, #4db8c8 100%);
  --btn-text: #071016;
  --ok: #b7f0c8;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  --display: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  background: var(--bg0);
}

body {
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(78, 196, 212, 0.2), transparent 58%),
    radial-gradient(760px 460px at 96% 0%, rgba(232, 195, 138, 0.16), transparent 52%),
    radial-gradient(700px 380px at 50% 42%, rgba(78, 196, 212, 0.05), transparent 70%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 46%, #040508 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 64px;
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-bottom: 48px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.mark {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 8px 16px rgba(232, 195, 138, 0.22));
}

.brand span {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  background: linear-gradient(180deg, #fff8ec 0%, #e8c38a 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}

.top-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.top-nav a.nav-download {
  color: var(--btn-text);
  background: var(--btn);
  font-weight: 750;
  box-shadow: 0 6px 18px rgba(78, 196, 212, 0.28);
}

.top-nav a.nav-download:hover { filter: brightness(1.08); color: var(--btn-text); }

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 52px;
}

.hero-copy { min-width: 0; }

.kicker {
  margin: 0 0 14px;
  color: var(--cyan);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2.15rem, 5.2vw, 3.55rem);
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.028em;
  background: linear-gradient(135deg, #ffffff 0%, #e7f4f7 42%, #e8c38a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 38rem;
  color: var(--muted);
  margin: 0 0 26px;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.btn-choose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 750;
  font-size: 1rem;
  padding: 14px 22px;
  color: var(--btn-text);
  background: var(--btn);
  box-shadow: 0 8px 22px rgba(78, 196, 212, 0.24);
}

.hero-actions > .btn-choose:not(.btn-ghost) {
  min-width: 11.75rem;
  box-sizing: border-box;
}

.btn-choose:hover { filter: brightness(1.06); }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  padding: 17px 28px;
  min-width: min(100%, 300px);
  color: #1a1206;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), transparent 42%),
    linear-gradient(180deg, #ffe08a 0%, #e8c38a 48%, #c9a05a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 224, 138, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 14px 40px rgba(232, 195, 138, 0.32);
  animation: download-pulse 2.8s ease-in-out infinite;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn-download:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

@keyframes download-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 224, 138, 0.4),
      inset 0 1px 0 rgba(255,255,255,0.45),
      0 14px 40px rgba(232, 195, 138, 0.32);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 224, 138, 0.7),
      inset 0 1px 0 rgba(255,255,255,0.5),
      0 18px 52px rgba(232, 195, 138, 0.48),
      0 0 48px rgba(126, 224, 234, 0.18);
  }
}

.android-note {
  margin: 0;
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 650;
}

.hero-stage {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 28px 0 0;
}

.rings {
  position: absolute;
  top: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(232, 195, 138, 0.22), transparent 58%),
    radial-gradient(circle at 50% 50%, rgba(78, 196, 212, 0.12), transparent 70%);
  box-shadow: 0 0 90px rgba(78, 196, 212, 0.12);
  pointer-events: none;
}

.rings::before,
.rings::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(232, 195, 138, 0.2);
}

.rings::after {
  inset: 58px;
  border-color: rgba(126, 224, 234, 0.16);
}

.hero-shield {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 14px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(232, 195, 138, 0.28));
}

.hero-card {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
}

.hero-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: #d5eef4;
  background: rgba(126, 224, 234, 0.06);
}

.howto {
  scroll-margin-top: 88px;
  margin: 0 0 36px;
}

.howto-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.howto-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 14px;
}

.howto-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--btn-text);
  background: var(--btn);
}

.howto-steps h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.howto-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.plans-block {
  scroll-margin-top: 88px;
  margin: 8px 0 28px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 20px 18px;
  display: flex;
  flex-direction: column;
  min-height: 292px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.plan:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 214, 226, 0.32);
}

.plan.featured {
  border-color: var(--line-strong);
  transform: translateY(-10px);
  background:
    linear-gradient(180deg, rgba(54, 42, 24, 0.55), rgba(16, 22, 34, 0.88));
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(232, 195, 138, 0.12),
    0 18px 50px rgba(232, 195, 138, 0.12),
    inset 0 1px 0 rgba(255, 224, 180, 0.18);
}

.plan.featured:hover { transform: translateY(-12px); }

.badge {
  display: inline-block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #21170b;
  background: linear-gradient(180deg, #ffe08a, var(--gold));
  font-weight: 700;
}

.plan h2 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 650;
}

.price {
  font-family: var(--display);
  font-size: 2.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.03em;
}

.plan.featured .price { color: var(--gold); }

.period {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 12px;
}

.plan p {
  color: var(--muted);
  margin: 0 0 18px;
  flex: 1;
}

.plan-includes {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  flex: 1;
}

.plan-includes li {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 0 8px 14px;
}

.plan-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-2);
}

button.pay {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-text);
  font: inherit;
  font-weight: 750;
  padding: 12px 14px;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

button.pay:hover { filter: brightness(1.06); transform: translateY(-1px); }

.plan.featured button.pay {
  background: linear-gradient(180deg, #ffe08a 0%, var(--gold) 55%, var(--gold-2) 100%);
  color: #1a1206;
}

body.modal-open { overflow: hidden; }

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(8px);
}

.pay-modal[hidden] { display: none !important; }

.pay-modal-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 22px 20px;
  box-shadow: var(--shadow);
}

.pay-modal-card h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.25rem;
}

.pay-modal-plan {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 650;
}

.pay-modal-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.pay-label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

#pay-email,
.pay-modal-card input[type="email"],
.pay-modal-card input[type="text"],
.pay-modal-card input[type="password"] {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 8, 14, 0.65);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  margin: 0 0 10px;
  outline: none;
}

#pay-email:focus,
.pay-modal-card input:focus {
  border-color: rgba(78, 196, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(78, 196, 212, 0.16);
}

.pay-error {
  margin: 0 0 12px !important;
  color: #ffb4a8 !important;
  font-size: 0.86rem;
}

#pay-email-go,
#pay-modal-back,
#auth-reg-go,
#auth-modal-back,
.pay-modal-card button[type="submit"],
.pay-modal-card button[type="button"] {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  padding: 12px 14px;
  cursor: pointer;
}

#pay-email-go,
#auth-reg-go,
.pay-modal-card button[type="submit"] {
  background: var(--btn);
  color: var(--btn-text);
  margin-bottom: 8px;
}

#pay-modal-back,
#auth-modal-back,
.pay-modal-card button[type="button"] {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}

.nav-auth {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.nav-auth:hover { border-color: rgba(78, 196, 212, 0.45); }

.btn-ghost {
  background: transparent !important;
  color: var(--text) !important;
  border: 1px solid var(--line);
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  background: rgba(5, 8, 14, 0.35);
}

.history-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.history-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.history-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.checkout-key {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.checkout {
  scroll-margin-top: 88px;
  margin: 0 0 36px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

.checkout-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.checkout-card h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 1.2rem;
}

.checkout-meta {
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
}

.checkout-meta div {
  display: grid;
  gap: 2px;
}

.checkout-meta dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.checkout-meta dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.checkout-note,
.checkout-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.checkout-wait {
  color: var(--gold) !important;
}

.checkout-ok {
  color: #4ade80 !important;
}

#checkout-pay-link {
  display: inline-flex;
  margin-bottom: 12px;
}

#checkout-pay-link[hidden] {
  display: none !important;
}

.checkout-back {
  width: 100%;
}

@media (max-width: 1100px) {
  .howto-steps { grid-template-columns: 1fr 1fr; }
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 8px 0 28px;
}

.links a, .back {
  color: var(--cyan);
  text-decoration: none;
}

.links a:hover, .back:hover { text-decoration: underline; }

.doc { max-width: 760px; padding-top: 28px; }
.doc h1 {
  font-size: 1.85rem;
  margin-bottom: 8px;
  background: none;
  color: var(--text);
  -webkit-background-clip: unset;
  background-clip: unset;
}
.doc h2 { font-size: 1.05rem; margin: 22px 0 8px; font-family: var(--display); }
.doc p, .doc li { color: #d7e0ea; }
.doc ul { padding-left: 1.2rem; }
.back { display: inline-block; margin-bottom: 18px; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.codeword {
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .hero, .plans, .howto-steps, .checkout-grid { grid-template-columns: 1fr; }
  .plan { min-height: 0; }
  .plan.featured, .plan.featured:hover, .plan:hover { transform: none; }
  .top {
    align-items: flex-start;
    flex-direction: column;
    position: relative;
    top: 0;
  }
  .top-nav { justify-content: flex-start; }
  .btn-download { width: 100%; min-width: 0; }
  .hero-shield { width: 112px; height: 112px; }
  .rings { width: 220px; height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-download, .plan, button.pay { animation: none; transition: none; }
  .btn-download:hover, .plan:hover, button.pay:hover { transform: none; }
}
