
.nav-buy {
  min-width: 84px;
  min-height: 42px;
  border: 1px solid rgba(242, 189, 78, 0.62);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe08a, #c7831e);
  color: #150f08;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}
.buy-modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 24px; }
.buy-modal.is-open { display: flex; }
.buy-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.74); }
.buy-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 22px;
  width: min(980px, 100%);
  max-height: min(760px, calc(100svh - 48px));
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: #101318;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  overflow: auto;
}
.buy-close {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}
.buy-close::before {
  content: "×";
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--ink, #f6f0e5);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}
.buy-summary, .buy-form { padding: clamp(1rem, 3vw, 1.5rem); }
.buy-dialog:not(.checkout-success-dialog) .buy-form { padding-right: clamp(3.6rem, 5vw, 4.8rem); }
.buy-summary img { width: 64px; height: 64px; object-fit: contain; border-radius: 18px; margin-bottom: 1rem; }
.buy-summary h2 { margin: 0 0 0.8rem; font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 0.98; }
.buy-summary p, .buy-form label, .buy-account-card, .buy-note { color: var(--muted, #aeb5c3); line-height: 1.55; }
.buy-price {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(242, 189, 78, 0.28);
  border-radius: 12px;
  background: rgba(242, 189, 78, 0.08);
}
.buy-price.compact { margin-top: 0.75rem; border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); }
.buy-price strong { color: var(--gold, #f2bd4e); }
.buy-refund, .buy-note { margin-top: 0.9rem; color: var(--muted, #aeb5c3); font-size: 0.84rem; line-height: 1.35; }
.buy-form { display: grid; gap: 0.72rem; }
.buy-form label { display: grid; gap: 0.24rem; font-size: 0.92rem; font-weight: 800; }
.buy-form input {
  width: 100%;
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #090b0f;
  color: var(--ink, #f6f0e5);
  font: inherit;
}
.buy-account-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink, #f6f0e5);
  font-weight: 850;
}
.buy-account-mode a { color: var(--ink, #f6f0e5); text-decoration: none; }
.buy-account-card {
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.buy-account-card strong { display: block; color: var(--ink, #f6f0e5); }
.buy-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.74rem 0.9rem;
  border: 1px solid rgba(78, 161, 255, 0.35);
  border-radius: 10px;
  background: rgba(78, 161, 255, 0.09);
}
.buy-total span { color: var(--muted, #aeb5c3); }
.buy-total strong { color: var(--ink, #f6f0e5); }
.buy-error {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 92, 92, 0.45);
  border-radius: 10px;
  background: rgba(255, 92, 92, 0.1);
  color: #ffb7b7;
  line-height: 1.45;
}
.buy-submit {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe08a, #d49127);
  color: #171009;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.buy-submit:disabled { cursor: wait; opacity: 0.68; }
.checkout-success-dialog {
  grid-template-columns: 1fr;
  gap: 18px;
  box-sizing: border-box;
  width: min(620px, 100%);
  padding: 28px;
  overflow: visible;
}
.checkout-success-close {
  top: 0;
  right: 0;
}
.checkout-success-header {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
  min-width: 0;
  margin-right: 58px;
}
.checkout-success-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
}
.checkout-success-heading { min-width: 0; }
.checkout-success-heading .eyebrow { margin: 0 0 6px; }
.checkout-success-heading h2 {
  margin: 0;
  color: var(--ink, #f6f0e5);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}
.checkout-success-message {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted, #aeb5c3);
  line-height: 1.45;
}
.checkout-success-message strong {
  color: var(--ink, #f6f0e5);
  font-size: 1.05rem;
}
.checkout-success-message small {
  color: color-mix(in srgb, var(--muted, #aeb5c3) 82%, transparent);
  font-size: 0.9rem;
}
.checkout-success-keys {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.checkout-success-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.checkout-success-key-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.checkout-success-key-row code {
  overflow: hidden;
  color: var(--ink, #f6f0e5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkout-icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #191d24;
  color: var(--ink, #f6f0e5);
}
.checkout-icon-button.copied {
  border-color: rgba(141, 240, 181, 0.72);
  background: rgba(20, 125, 69, 0.72);
}
.checkout-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
body.buy-open { overflow: hidden; }
@media (max-width: 780px) {
  .buy-dialog, .buy-account-mode { grid-template-columns: 1fr; }
  .buy-dialog { padding-top: 3.2rem; }
  .buy-dialog:not(.checkout-success-dialog) .buy-form { padding-right: clamp(1rem, 3vw, 1.5rem); }
  .checkout-success-dialog { width: min(420px, 100%); padding: 22px; }
  .checkout-success-header { grid-template-columns: 58px 1fr; gap: 14px; margin-right: 46px; }
  .checkout-success-icon { width: 56px; height: 56px; border-radius: 14px; }
  .checkout-success-heading h2 { font-size: 2rem; }
}
