:root {
  color-scheme: dark;
  --bg: #070b10;
  --panel: #0d151d;
  --panel-soft: #0a1118;
  --line: #263744;
  --line-strong: #344653;
  --text: #f4f6f8;
  --muted: #84919d;
  --accent: #ff4d32;
  --accent-hover: #ff6249;
  --cyan: #25c6f7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 22%, rgba(27, 42, 54, .5), transparent 34%),
    linear-gradient(180deg, #080d13, #06090d);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-head {
  height: 72px;
  border-bottom: 1px solid rgba(38, 55, 68, .72);
}

.site-head-inner {
  width: min(1120px, calc(100% - 44px));
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

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

.brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
}

.brand strong { font-size: 16px; letter-spacing: .01em; }
.head-account {
  min-width: 74px;
  max-width: min(360px, 48vw);
  height: 36px;
  padding: 0 17px;
  overflow: hidden;
  border: 1px solid #3b4c59;
  border-radius: 8px;
  background: #101923;
  color: #edf2f5;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.head-account:hover { border-color: #687783; background: #16212b; }
.head-account.is-session { color: #c6d0d8; font-weight: 500; cursor: default; }
.head-account.is-session {
  min-width: 0;
  max-width: min(330px, 48vw);
  height: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  text-align: left;
}
.head-account.is-session:hover { border-color: transparent; background: transparent; }
.head-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: block;
  object-fit: cover;
  overflow: hidden;
  border-radius: 50%;
  background: #eee4d2;
}
.head-account-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.head-account-copy small {
  max-width: 230px;
  overflow: hidden;
  color: #74818d;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.head-account-validity { color: #8e9ba6; letter-spacing: .01em; }
.head-membership { display: inline-flex; align-items: center; gap: 5px; color: #dbe2e7; font-size: 12px; font-weight: 720; }
.head-membership svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.head-membership.subscription { color: #ff8a76; }
.head-membership.subscription svg { fill: rgba(255, 138, 118, .16); }
.head-membership.permanent { color: #ffd078; }

main {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.hero {
  padding: 50px 0 34px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 3.2vw, 48px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.hero p {
  margin: 15px 0 0;
  color: #98a4ae;
  font-size: 16px;
}

.pricing { padding-bottom: 36px; }
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.plan {
  position: relative;
  min-height: 286px;
  display: flex;
  flex-direction: column;
  padding: 27px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(17, 26, 35, .96), rgba(9, 15, 21, .98));
}

.plan.recommended { border-color: rgba(255, 77, 50, .82); }
.plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 7px 14px;
  border-radius: 0 11px 0 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}

.plan h3 { margin: 2px 0 7px; font-size: 24px; }
.plan-copy { min-height: 42px; margin: 0; color: #82909b; font-size: 13px; }
.price {
  margin: 24px 0 23px;
  font-size: 46px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.045em;
}

.price sup { margin-right: 3px; font-size: 18px; vertical-align: .7em; }
.price small { color: #778590; font-size: 13px; font-weight: 500; letter-spacing: 0; }

.plan button,
.primary,
.secondary {
  height: 46px;
  border-radius: 8px;
  font: inherit;
  font-weight: 720;
  cursor: pointer;
}

.plan button,
.primary {
  margin-top: auto;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.plan button:hover,
.primary:hover { background: var(--accent-hover); }
.plan button:disabled { border-color: #34424d; background: #27323b; color: #7f8b95; cursor: default; }

.redeem-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  margin: 26px auto 0;
  padding: 0 18px;
  border: 1px solid #344653;
  border-radius: 8px;
  background: #0b1219;
  color: #d3dae0;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}
.redeem-entry:hover { border-color: #596b78; color: #fff; }
.redeem-entry span { color: var(--accent); font-size: 18px; }

.entitlements {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 34px;
  padding: 36px 0 0;
  border-top: 1px solid var(--line);
}

.entitlements header p { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 750; }
.entitlements h2 { margin: 0; font-size: 24px; }
.comparison-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 20px; border-right: 1px solid var(--line); text-align: left; }
th:last-child, td:last-child { border-right: 0; }
thead { background: rgba(17, 26, 35, .72); color: #8d99a3; font-size: 12px; }
tbody tr { border-top: 1px solid var(--line); }
tbody th { color: #b8c1c9; font-weight: 600; }
.member-column { color: #ff8c79; }
.member-column strong { color: #fff; }
.entitlement-footnote {
  grid-column: 2;
  margin: 9px 0 0;
  color: #71808c;
  font-size: 11px;
}

.eyebrow { margin: 0 0 9px; color: #73818d; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.modal {
  width: min(470px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #2b3d4b;
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .7);
}

.modal::backdrop { background: rgba(1, 4, 7, .82); backdrop-filter: blur(4px); }
.modal form, .modal > section { position: relative; display: flex; flex-direction: column; padding: 31px; }
.modal h2 { margin: 0; font-size: 25px; }
.modal h2 + p { margin: 9px 0 23px; color: var(--muted); }
.close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #71808c;
  font-size: 25px;
  cursor: pointer;
}

.close:hover { background: #17222c; color: #fff; }
.modal label { display: flex; flex-direction: column; gap: 7px; color: #b9c3cc; font-size: 11px; }
.modal input {
  height: 48px;
  padding: 0 13px;
  border: 1px solid #2d3f4d;
  border-radius: 8px;
  background: #070d13;
  color: #fff;
  outline: none;
}

.modal input:focus { border-color: var(--cyan); }
.primary { width: 100%; margin-top: 15px; }
.primary:disabled {
  border-color: #303e49;
  background: #26323b;
  color: #74818b;
  cursor: default;
}
.sent { color: #8b98a4; }
.code-label {
  display: block;
  margin: 0 0 8px;
  color: #b9c3cc;
  font-size: 11px;
}
.code-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.code-cell {
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #304351;
  border-radius: 9px;
  background: #070d13;
  color: #f7f9fa;
  font-size: 22px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.code-cell.filled { border-color: #52636f; background: #0a1219; }
.code-cell.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(37, 198, 247, .12);
}
.modal .code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 9px;
  opacity: 0;
  cursor: text;
}
.code-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 13px;
  color: #53616c;
  font-size: 11px;
}
.text-button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: #94a2ad;
  font: inherit;
  cursor: pointer;
}
.text-button:hover { color: #fff; }
.text-button:disabled { color: #4f5a63; cursor: default; }
.preview, .notice { padding: 9px 11px; border-radius: 7px; background: rgba(255, 190, 78, .08); color: #ffd078; font-size: 11px; }
.notice { background: rgba(255, 98, 98, .09); color: #ff9090; }
.qr-shell {
  width: 218px;
  height: 218px;
  display: grid;
  place-items: center;
  margin: 4px auto 0;
  padding: 12px;
  border: 1px solid #e7ded0;
  border-radius: 10px;
  background: #fff;
  color: #5c6670;
  text-align: center;
}

.qr-shell img { width: 100%; height: 100%; object-fit: contain; }
.qr-shell span { font-size: 11px; }
.scan-copy { margin: 12px 0 20px !important; color: #dbe1e6 !important; text-align: center; }
.pay-modal dl { margin: 0; padding: 13px 15px; border: 1px solid #22333f; border-radius: 9px; background: #091017; }
.pay-modal dl div { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; }
.pay-modal dt { color: #778591; }
.pay-modal dd { max-width: 260px; margin: 0; overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.pay-status { margin: 15px 0 0; padding: 10px; border-radius: 7px; background: rgba(37, 198, 247, .08); color: #7bdfff; text-align: center; }
.pay-status.paid { background: rgba(99, 211, 126, .1); color: #87e99b; }
.pay-status.failed { background: rgba(255, 98, 98, .1); color: #ff9797; }
.secondary { margin-top: 10px; border: 1px solid #314452; background: #121c25; color: #d1d8de; }
.pay-success { align-items: center; text-align: center; }
.success-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 3px 0 22px;
  border-radius: 50%;
  background: rgba(99, 211, 126, .12);
  color: #82e697;
  box-shadow: inset 0 0 0 1px rgba(99, 211, 126, .24);
}
.success-mark svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pay-success .eyebrow { margin-bottom: 8px; color: #70c982; }
.pay-success h2 { font-size: 28px; }
.pay-success h2 + p { margin-bottom: 24px; }
.success-benefit {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 10px;
  background: #091017;
  text-align: left;
  box-shadow: inset 0 0 0 1px #22333f;
}
.success-benefit-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 77, 50, .1); color: #ff806c; }
.success-benefit-icon svg { width: 21px; height: 21px; fill: rgba(255, 128, 108, .12); stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.success-benefit > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.success-benefit strong { font-size: 14px; }
.success-benefit small { color: #7f8d98; font-size: 11px; }
.success-finish { margin-top: 18px; }
.redeem-modal label { width: 100%; display: flex; flex-direction: column; gap: 8px; color: #aeb8c2; font-size: 12px; }
.redeem-modal input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #314553; border-radius: 8px; background: #080d13; color: #f1f4f6; font: 650 14px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .06em; outline: none; text-transform: uppercase; }
.redeem-modal input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(37,198,247,.08); }
.redeem-hint { margin: 14px 0 0!important; color: #65737f!important; font-size: 11px!important; text-align: center; }

@media (max-width: 920px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan { min-height: 250px; }
  .entitlements { grid-template-columns: 1fr; }
  .entitlement-footnote { grid-column: 1; }
}

@media (max-width: 520px) {
  .site-head { height: 64px; }
  .site-head-inner { width: calc(100% - 28px); gap: 14px; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; flex-basis: 32px; }
  .brand strong { font-size: 15px; }
  .head-account { min-width: 66px; max-width: 52vw; height: 34px; padding: 0 13px; }
  .head-account.is-session { max-width: 52vw; padding: 0; }
  .head-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .head-account-email { display: none; }
  main { width: min(100% - 28px, 1120px); }
  .hero { padding: 38px 0 27px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 14px; }
  .plan { min-height: 238px; padding: 23px; }
  .price { font-size: 42px; }
  .modal form, .modal > section { padding: 27px 22px; }
  .code-grid { gap: 6px; }
  .code-cell { height: 48px; font-size: 20px; }
  th, td { padding: 13px 12px; }
}
