.subscribe-page {
  min-height: 100vh;
  background: var(--bg);
}

.subscribe-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 18px;
}

.subscribe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 52px;
}

.subscribe-header > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  line-height: 1;
  text-align: center;
}

.subscribe-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.subscribe-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
}

.subscribe-hero {
  max-width: 820px;
  margin-bottom: 24px;
}

.subscribe-hero .eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.subscribe-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.05;
}

.subscribe-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}

.plan-usage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 800;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.plan-usage span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.plan-grid {
  display: block;
}

.plan-grid-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.plan-grid-toolbar span,
.plan-audience,
.payment-label {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.plan-grid-toolbar h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.subscription-cycle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: var(--surface-sunken);
}

.subscription-cycle button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.subscription-cycle button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 24, 40, 0.08);
}

.subscription-cycle button span {
  margin-left: 4px;
  color: var(--brand);
  font-size: 10px;
}

.plan-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.plan-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 28px;
  background: #FFFFFF;
  box-shadow: var(--shadow-pop);
}

.plan-card.active {
  box-shadow: inset 0 3px 0 var(--brand);
}

.plan-card.selected {
  background: #f7faff;
}

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-card-head h2 {
  margin: 5px 0 0;
}

.current-plan-badge {
  border-radius: 4px;
  padding: 5px 8px;
  background: #e8f7ef;
  color: #16724a;
  font-size: 11px;
  font-weight: 800;
}

.plan-description {
  min-height: 48px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.plan-top h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.28;
}

.plan-price {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.plan-price > span {
  margin-right: 2px;
  font-size: 16px;
}

.plan-price small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
}

.plan-price strong {
  font-size: 24px;
}

.plan-price span {
  color: var(--muted);
  font-size: 14px;
}

.plan-quota {
  margin: 14px 0;
  color: var(--brand-dark);
  font-weight: 900;
}

.plan-credit {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 14px 0 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.plan-credit strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.plan-credit span {
  color: var(--muted);
  font-size: 12px;
}

.plan-card ul {
  flex: 1;
  margin: 0;
  padding: 14px 0 0 18px;
  color: var(--muted);
  line-height: 1.78;
}

.plan-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  text-align: center;
}

.plan-card .btn:disabled {
  opacity: 0.64;
  cursor: default;
}

.subscription-pay-card {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(211, 224, 219, 0.9);
  border-radius: 16px;
  padding: 30px;
  background: #FFFFFF;
  box-shadow: var(--shadow-pop);
  text-align: center;
}

.subscription-pay-card h2 {
  margin: 0 0 10px;
}

.subscription-loading {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 48px 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.subscription-pay-card .btn {
  margin-top: 16px;
}

.payment-success {
  border-color: #9ed7bd;
}

.payment-error {
  border-color: #e2b9b9;
}

.wallet-card {
  text-align: left;
}

.subscription-pay-card:not(.wallet-card) {
  width: min(560px, 100%);
  margin: 0 auto;
}

.wallet-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.wallet-card-head span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wallet-card-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
}

.wallet-card-head strong {
  flex: 0 0 auto;
  border: 1px solid rgba(27, 61, 130, 0.18);
  border-radius: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

.recharge-option {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px solid rgba(27, 61, 130, 0.22);
  border-radius: 12px;
  padding: 18px 14px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.recharge-option:hover {
  transform: translateY(-2px);
  border-color: rgba(27, 61, 130, 0.42);
  background: #f5fbf8;
  box-shadow: var(--shadow);
}

.recharge-option span {
  display: block;
  color: var(--brand-dark);
  font-size: 28px;
  font-weight: 950;
  line-height: 1.05;
}

.recharge-option small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1000px) {
  .plan-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .subscribe-shell {
    width: min(100% - 28px, 1220px);
  }

  .subscribe-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 34px;
  }

  .subscribe-header > .btn {
    width: 100%;
  }

  .subscribe-hero h1 {
    font-size: 34px;
  }

  .plan-card-grid {
    grid-template-columns: 1fr;
  }

  .plan-grid-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-cycle {
    width: 100%;
  }

  .recharge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-card-head {
    display: grid;
    gap: 14px;
  }

  .recharge-option {
    min-height: 96px;
  }
}
