.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 14, 26, 0.56);
  backdrop-filter: blur(10px);
}

.busy-overlay__card {
  width: min(100%, 360px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 21, 35, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  padding: 1.25rem 1.2rem;
  text-align: center;
}

.busy-overlay__spinner {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0 auto 0.9rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-right-color: transparent;
  animation: billing-spin 0.75s linear infinite;
}

.busy-overlay__text {
  color: #eef5ff;
  font-weight: 800;
  font-size: 0.98rem;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 49px;
  border-radius: 14px;
  padding: 0.64rem 1.08rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.91rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  position: relative;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.28);
}

.primary-btn.is-loading,
.secondary-btn.is-loading,
.ghost-btn.is-loading,
.danger-btn.is-loading,
.social-btn.is-loading {
  pointer-events: none;
  opacity: 0.84;
}

.primary-btn.is-loading::after,
.secondary-btn.is-loading::after,
.ghost-btn.is-loading::after,
.danger-btn.is-loading::after,
.social-btn.is-loading::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  display: inline-block;
  animation: billing-spin 0.75s linear infinite;
}

.primary-btn {
  color: #0b1626;
  background: linear-gradient(130deg, rgba(247, 201, 90, 0.97), rgba(255, 182, 39, 0.95));
  border-color: rgba(255, 220, 128, 0.38);
}

.secondary-btn {
  color: #edf8f2;
  background: linear-gradient(130deg, rgba(14, 119, 69, 0.94), rgba(19, 149, 84, 0.92));
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.danger-btn {
  background: rgba(255, 109, 109, 0.12);
  color: #ffd9d9;
  border-color: rgba(255, 109, 109, 0.28);
}

button:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.danger-btn:disabled,
.social-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  background: rgba(9, 19, 34, 0.92);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.field-row {
  display: grid;
  gap: 0.95rem;
}

.field-row.split {
  grid-template-columns: 1fr 1fr;
}

.page-main {
  padding-top: 1.9rem;
}

.checkout-shell {
  max-width: 980px;
  margin: 0 auto;
}

.checkout-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 64px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 18, 31, 0.44);
  color: var(--text);
  cursor: default;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.checkout-step:disabled {
  opacity: 0.55;
  cursor: default;
}

.checkout-step.active {
  border-color: rgba(247, 201, 90, 0.42);
  background: linear-gradient(180deg, rgba(31, 68, 45, 0.36), rgba(7, 18, 31, 0.6));
}

.checkout-step__number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: rgba(247, 201, 90, 0.12);
  border: 1px solid rgba(247, 201, 90, 0.2);
  color: #ffe39c;
  flex: 0 0 auto;
}

.checkout-step__label {
  font-weight: 800;
  line-height: 1.2;
}

.checkout-step-panel + .checkout-step-panel {
  margin-top: 1rem;
}

.checkout-step-panel {
  scroll-margin-top: 7rem;
}

.checkout-title {
  max-width: 760px;
}

.checkout-how-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.checkout-how-list li {
  display: grid;
  gap: 0.15rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(247, 201, 90, 0.28);
}

.checkout-how-list strong {
  display: block;
  font-size: 1rem;
}

.checkout-how-list span {
  color: var(--muted);
}

.social-auth-grid {
  display: grid;
  gap: 0.85rem;
}

.social-btn {
  width: 100%;
  justify-content: center;
}

.social-btn-google {
  background: #ffffff;
  color: #162338;
}

.social-btn-apple {
  background: #0b1220;
  color: #f5f8fc;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-fallback {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
}

.auth-fallback summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.checkout-overview {
  display: grid;
  gap: 0.35rem;
}

.checkout-status-title {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.02;
}

.checkout-status-copy {
  max-width: 760px;
}

.checkout-status-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.inline-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  margin-top: 0.9rem;
  padding: 0.72rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 21, 35, 0.42);
  color: #eef5ff;
  font-weight: 700;
}

.inline-loading__spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-right-color: transparent;
  display: inline-block;
  animation: billing-spin 0.75s linear infinite;
  flex: 0 0 auto;
}

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 21, 35, 0.5);
}

.account-bar__meta {
  display: grid;
  gap: 0.2rem;
}

.account-bar__label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.checkout-subsection-title {
  margin-bottom: 0.2rem;
}

.checkout-method-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.attempt-actions {
  align-items: center;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.plan-card {
  background: rgba(8, 21, 35, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  padding: 1.25rem;
}

.plan-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-family: "Sora", sans-serif;
}

.plan-card .price {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.plan-card .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.notice {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.notice.ok {
  border-color: rgba(31, 181, 111, 0.32);
  background: rgba(31, 181, 111, 0.09);
  color: #d9ffe9;
}

.notice.warn {
  border-color: rgba(246, 198, 84, 0.32);
  background: rgba(246, 198, 84, 0.11);
  color: #fff0c2;
}

.notice.error {
  border-color: rgba(255, 109, 109, 0.3);
  background: rgba(255, 109, 109, 0.08);
  color: #ffd6d6;
}

.testing-tools {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(247, 201, 90, 0.34);
  background: rgba(10, 19, 30, 0.36);
}

.testing-tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem;
}

.testing-tools__row > div:first-child {
  flex: 1 1 280px;
}

.footer-note,
.small {
  color: var(--muted);
  font-size: 0.88rem;
}

.support-inline {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.support-inline a {
  color: var(--gold);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@keyframes billing-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1040px) {
  .plans,
  .field-row.split {
    grid-template-columns: 1fr;
  }

  .checkout-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .account-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .plans {
    grid-template-columns: 1fr;
  }

  .checkout-shell {
    max-width: 100%;
  }

  .checkout-progress {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    margin-bottom: 0.8rem;
    scrollbar-width: none;
  }

  .checkout-progress::-webkit-scrollbar {
    display: none;
  }

  .checkout-step {
    min-height: 42px;
    padding: 0.46rem 0.58rem;
    border-radius: 13px;
    gap: 0.42rem;
    flex: 0 0 auto;
  }

  .checkout-step__number {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
  }

  .checkout-step__label {
    font-size: 0.76rem;
  }

  .checkout-step:not(.active) .checkout-step__label {
    display: none;
  }

  .page-main {
    padding-top: 1rem;
  }

  .checkout-title {
    max-width: none;
  }

  .checkout-how-list {
    gap: 0.7rem;
    margin-top: 1rem;
  }

  .checkout-how-list li {
    padding-left: 0.8rem;
  }

  .summary-pill,
  .meta-chip {
    white-space: normal;
  }

  .testing-tools__row {
    flex-direction: column;
    align-items: stretch;
  }

  .account-bar__actions {
    width: 100%;
  }

  .account-bar__actions .ghost-btn,
  .account-bar__actions .secondary-btn {
    flex: 1 1 0;
  }
}
