/* GG checkout — compact presentation only; payment state remains server-owned. */
.checkout-page {
  --checkout-accent: #6840dc;
  --checkout-ink: #202b42;
  --checkout-muted: #667085;
  --checkout-border: #e4e7ee;
  background: #f6f7fb;
  color: var(--checkout-ink);
}

.checkout-page::before { content: none; }
.checkout-page .gg-top-shell {
  padding-top: env(safe-area-inset-top, 0px);
  background: #fff;
  border-bottom: 1px solid var(--checkout-border);
  box-shadow: none;
}
.checkout-page .gg-nav {
  max-width: 720px;
  min-height: 72px;
  padding: 10px 24px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.checkout-page .brand { gap: 10px; text-decoration: none; }
.checkout-page .brand-icon { width: 42px; height: 42px; border-radius: 12px; box-shadow: none; border: 1px solid #eeeaf8; }
.checkout-page .brand-name .brand-wordmark { width: 68px; }
.checkout-page .brand-online { margin-top: 3px; color: var(--checkout-muted); font-size: 10px; font-weight: 600; }
.checkout-page .brand-online::before { width: 6px; height: 6px; }
.checkout-page .online-dot { width: 10px; height: 10px; border-width: 2px; box-shadow: none; }
.checkout-page .checkout-brand-poster { display: none; }
.checkout-page .checkout-home {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--checkout-border);
  border-radius: 10px;
  color: #475467;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s, color .15s, background-color .15s;
}
.checkout-page #root main {
  padding: 26px 24px 32px !important;
  padding-left: max(24px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(24px, env(safe-area-inset-right, 0px)) !important;
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px)) !important;
}
.checkout-page .checkout-intro { max-width: 600px; margin: 0 auto 18px; text-align: left; }
.checkout-page .checkout-intro h1 {
  margin: 0 0 6px;
  color: var(--checkout-ink);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -.035em;
  font-weight: 800;
}
.checkout-page .checkout-intro > p { margin: 0; color: var(--checkout-muted); font-size: 14px; line-height: 1.6; }
.checkout-page #root main > .checkout-layout { max-width: 600px !important; }
.checkout-page :is(.checkout-layout, #checkoutMount) { min-width: 0; width: 100%; }
.checkout-page .checkout-loading,
.checkout-page .buy-key-panel {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--checkout-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px -22px rgba(22, 34, 59, .22);
  text-align: left;
  overflow-wrap: anywhere;
  scroll-margin-top: 20px;
}
.checkout-page .checkout-loading h2 { margin: 0; color: var(--checkout-ink); font-size: 18px; line-height: 1.4; font-weight: 750; }
.checkout-page .checkout-loading p,
.checkout-page .checkout-noscript { color: var(--checkout-muted); font-size: 13px; line-height: 1.6; }
.checkout-page .checkout-noscript a { display: inline-flex; align-items: center; min-height: 44px; color: var(--checkout-accent); text-decoration: underline; }
/* The page title replaces duplicate form titles, never payment notices or instructions. */
.checkout-page .buy-key-panel > .buy-key-eyebrow,
.checkout-page .buy-key-panel > h2,
.checkout-page .buy-key-panel > h2 + p { display: none; }
.checkout-page .buy-key-panel p { color: var(--checkout-muted); font-size: 13px; line-height: 1.6; }
.checkout-page .buy-key-panel .buy-key-availability {
  margin-top: 0;
  padding: 11px 12px;
  border: 1px solid #e5e1f2;
  border-left: 3px solid var(--checkout-accent);
  border-radius: 9px;
  background: #f8f7fc;
}
.checkout-page .buy-key-panel .buy-key-availability b { margin-bottom: 3px; color: #5136a2; font-size: 13px; font-weight: 750; }
.checkout-page .buy-key-panel .buy-key-availability p { font-size: 12px; line-height: 1.6; }
.checkout-page .buy-key-panel .buy-key-notice-warning { border-color: #f0d8af; border-left-color: #c98c28; background: #fffbf4; }
.checkout-page .buy-key-panel .buy-key-notice-warning b { color: #895910; }
.checkout-page .buy-key-panel .buy-key-notice-success { border-color: #cee7da; border-left-color: #26825a; background: #f3fbf6; }
.checkout-page .buy-key-panel .buy-key-notice-success b { color: #1d6948; }
.checkout-page .buy-key-panel .buy-key-catalog,
.checkout-page .buy-key-panel .buy-key-order { margin-top: 16px; }
.checkout-page .buy-key-panel .buy-key-product { color: var(--checkout-ink); font-size: 14px; font-weight: 650; }
.checkout-page .buy-key-panel .buy-key-methods-fieldset { margin: 14px 0; }
.checkout-page .buy-key-panel .buy-key-methods-fieldset legend { margin-bottom: 8px; font-size: 13px; color: var(--checkout-ink); font-weight: 700; }
.checkout-page .buy-key-panel .buy-key-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checkout-page .buy-key-panel .buy-key-method {
  position: relative;
  min-height: 88px;
  justify-content: center;
  gap: 5px;
  padding: 12px 34px 12px 14px;
  border: 1px solid #dce0e8;
  border-radius: 10px;
  background: #fff;
  color: var(--checkout-ink);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.checkout-page .buy-key-panel .buy-key-method:only-child { grid-column: 1 / -1; }
.checkout-page .buy-key-panel .buy-key-method span { min-width: 0; font-size: 13px; line-height: 1.5; font-weight: 700; }
.checkout-page .buy-key-panel .buy-key-method b { min-width: 0; font-size: 22px; line-height: 1.3; letter-spacing: -.03em; overflow-wrap: anywhere; }
.checkout-page .buy-key-panel .buy-key-method::after { content: ''; position: absolute; top: 15px; right: 12px; width: 16px; height: 16px; border: 1.5px solid #c8cdd8; border-radius: 50%; background: #fff; }
.checkout-page .buy-key-panel .buy-key-method[aria-pressed="true"] { border-color: var(--checkout-accent); background: #f8f5ff; color: #4d2ca7; box-shadow: 0 0 0 1px var(--checkout-accent); }
.checkout-page .buy-key-panel .buy-key-method[aria-pressed="true"]::after { border: 5px solid var(--checkout-accent); }
.checkout-page .buy-key-panel :is(button, input, select, textarea) { min-height: 44px; max-width: 100%; }
.checkout-page .buy-key-panel :is(input, select, textarea) { font-size: 16px; }
.checkout-page .buy-key-panel .buy-key-primary {
  min-height: 48px;
  padding: 12px 16px;
  border-color: var(--checkout-accent);
  border-radius: 10px;
  color: #fff;
  background: var(--checkout-accent);
  box-shadow: 0 4px 8px -4px rgba(87, 48, 190, .3);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 750;
  transition: background-color .15s, box-shadow .15s;
}
.checkout-page .buy-key-panel .buy-key-small { margin-top: 8px; font-size: 12px; line-height: 1.6; }
.checkout-page .buy-key-panel .buy-key-catalog > .buy-key-small { text-align: center; }
.checkout-page .buy-key-panel .buy-key-actions { margin-top: 14px; gap: 8px; }
.checkout-page .buy-key-panel .buy-key-help { margin-top: 14px; padding: 0 12px; border: 1px solid var(--checkout-border); border-radius: 10px; background: #fff; }
.checkout-page .buy-key-panel .buy-key-help > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 10px 0; color: #475467; font-size: 12px; font-weight: 700; line-height: 1.5; list-style: none; cursor: pointer; }
.checkout-page .buy-key-panel .buy-key-help > summary::-webkit-details-marker { display: none; }
.checkout-page .buy-key-panel .buy-key-help > summary::after { content: '+'; flex-shrink: 0; color: var(--checkout-accent); font-size: 18px; font-weight: 500; }
.checkout-page .buy-key-panel .buy-key-help[open] > summary { border-bottom: 1px solid #edf0f5; }
.checkout-page .buy-key-panel .buy-key-help[open] > summary::after { content: '−'; }
.checkout-page .buy-key-panel .buy-key-help > p { padding-top: 10px; }
.checkout-page .buy-key-panel .buy-key-help > p:last-child { padding-bottom: 12px; }
.checkout-page .buy-key-panel .buy-key-help > .buy-key-actions { margin-top: 12px; }
.checkout-page .buy-key-panel .buy-key-help > .buy-key-reload { margin-bottom: 8px; }
.checkout-page .buy-key-panel .buy-key-contact,
.checkout-page .buy-key-panel .buy-key-return { min-height: 44px; padding: 10px 12px; border: 1px solid #e0e4ec; border-radius: 9px; color: #475467; background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; line-height: 1.5; }
.checkout-page .buy-key-panel .buy-key-reload { display: block; margin: 6px auto 0; min-height: 44px; color: #5d5279; font-size: 12px; text-underline-offset: 3px; }
.checkout-page .buy-key-panel > .buy-key-small:last-child { margin-top: 6px; padding-top: 10px; border-top: 1px solid #edf0f5; color: var(--checkout-muted); font-size: 11px; }
.checkout-page .buy-key-panel .buy-key-order-heading { align-items: center; gap: 8px; margin-bottom: 6px; }
.checkout-page .buy-key-panel h3 { color: var(--checkout-ink); font-size: 16px; font-weight: 750; }
.checkout-page .buy-key-panel .buy-key-badge { padding: 5px 8px; font-size: 11px; font-weight: 700; }
.checkout-page .buy-key-panel .buy-key-details { gap: 0; margin: 12px 0; border: 1px solid var(--checkout-border); border-radius: 10px; overflow: hidden; }
.checkout-page .buy-key-panel .buy-key-details > div { padding: 10px 12px; border: 0; border-bottom: 1px solid #edf0f5; border-radius: 0; background: #fff; }
.checkout-page .buy-key-panel .buy-key-details > div:last-child { border-bottom: 0; }
.checkout-page .buy-key-panel .buy-key-details dt { margin-bottom: 3px; color: var(--checkout-muted); font-size: 12px; }
.checkout-page .buy-key-panel .buy-key-details dd { flex-wrap: wrap; gap: 6px; color: var(--checkout-ink); font-size: 14px; }
.checkout-page .buy-key-panel .buy-key-details dd > :first-child { min-width: 0; overflow-wrap: anywhere; }
.checkout-page .buy-key-panel .buy-key-details code { font-size: 13px; line-height: 1.6; }
.checkout-page .buy-key-panel .buy-key-detail-emphasis { border-color: #e6e1f2 !important; background: #faf8ff !important; }
.checkout-page .buy-key-panel .buy-key-detail-emphasis strong { color: var(--checkout-accent); font-size: 22px; font-variant-numeric: tabular-nums; }
.checkout-page .buy-key-panel .buy-key-copy { margin-left: auto; padding: 8px 10px; border-color: #e3dcef; border-radius: 8px; background: #fff; color: #6143a9; font-size: 11px; }
.checkout-page .buy-key-panel .buy-key-qr { margin: 12px 0; padding: 16px; border: 1px solid var(--checkout-border); border-radius: 12px; background: #fff; text-align: center; }
.checkout-page .buy-key-panel .buy-key-qr h4 { margin-bottom: 12px; color: var(--checkout-ink); font-size: 14px; }
.checkout-page .buy-key-panel .buy-key-qr canvas { display: block; width: min(100%, 280px); max-width: 100%; height: auto; margin: 0 auto; background: #fff; border-radius: 0; }
.checkout-page .buy-key-panel .buy-key-qr .buy-key-return { margin-top: 12px; }
.checkout-page .buy-key-panel .buy-key-instructions { padding: 11px 12px; border-left: 3px solid #a58ccf; border-radius: 0 8px 8px 0; background: #f6f3fb; color: #5e5175; font-size: 13px; }
.checkout-page .buy-key-panel .buy-key-paid { padding: 16px; border-color: #cbe5d6; border-radius: 12px; background: #f5fbf7; }
.checkout-page .buy-key-panel .buy-key-value { border: 1px solid #e0ece5; line-height: 1.7; }
.checkout-page .buy-key-panel button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.checkout-page :focus-visible,
.payment-return-card :focus-visible { outline: 3px solid #946dff; outline-offset: 3px; }
.checkout-page [hidden],
.payment-return-card[hidden],
.payment-return-card [hidden] { display: none !important; }


@media (hover: hover) {
  .checkout-page .checkout-home:hover,
  .checkout-page .buy-key-panel .buy-key-return:hover,
  .checkout-page .buy-key-panel .buy-key-contact:hover { border-color: #b7a9d4; color: var(--checkout-accent); background: #fcfaff; }
  .checkout-page .buy-key-panel .buy-key-primary:hover:not(:disabled) { background: #5932c5; box-shadow: 0 5px 14px -6px rgba(87, 48, 190, .5); }
  .checkout-page .buy-key-panel .buy-key-method:hover:not(:disabled) { border-color: var(--checkout-accent); }
}
@media (max-width: 540px) {
  .checkout-page .gg-nav { min-height: 66px; gap: 8px; padding: 8px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .checkout-page .brand { gap: 8px; }
  .checkout-page .brand-icon { width: 38px; height: 38px; }
  .checkout-page .brand-name .brand-wordmark { width: 60px; }
  .checkout-page .checkout-home { padding: 8px 10px; font-size: 11px; }
  .checkout-page #root main { padding: 20px 16px 24px !important; padding-left: max(16px, env(safe-area-inset-left, 0px)) !important; padding-right: max(16px, env(safe-area-inset-right, 0px)) !important; padding-bottom: max(24px, env(safe-area-inset-bottom, 0px)) !important; }
  .checkout-page .checkout-intro { margin-bottom: 14px; }
  .checkout-page .checkout-intro h1 { font-size: 26px; }
  .checkout-page .checkout-intro > p { font-size: 12px; }
  .checkout-page .checkout-loading,
  .checkout-page .buy-key-panel { padding: 16px; border-radius: 14px; }
  .checkout-page .buy-key-panel .buy-key-methods { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .checkout-page .buy-key-panel .buy-key-method { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 10px; min-height: 64px; padding: 12px 36px 12px 12px; }
  .checkout-page .buy-key-panel .buy-key-method b { font-size: 20px; text-align: right; }
  .checkout-page .buy-key-panel .buy-key-method::after { top: 50%; transform: translateY(-50%); }
  .checkout-page .buy-key-panel .buy-key-actions > * { flex-basis: 100%; }
  .checkout-page .buy-key-panel .buy-key-details > div { padding: 10px; }
  .checkout-page .buy-key-panel .buy-key-paid { padding: 14px; }
}

/* Home's server-confirmed payment result is the only non-checkout surface here. */
.payment-return-card {
  min-width: 0;
  margin: 0 0 24px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #dcd3f7;
  border-radius: 20px;
  color: var(--ink);
  background: #fbfaff;
  text-align: left;
  overflow-wrap: anywhere;
  scroll-margin-top: 24px;
}

.payment-return-card h2 {
  margin: 0 0 10px;
  color: #583ac0;
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 800;
  line-height: 1.35;
}

.payment-return-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.payment-return-card[data-state="success"] {
  border-color: #b4ddc9;
  background: #f5fff9;
}

.payment-return-card[data-state="success"] h2 {
  color: #176845;
}

.payment-return-card[data-state="pending"] {
  border-color: #f0d5a9;
  background: #fffaf0;
}

.payment-return-card[data-state="pending"] h2 {
  color: #875517;
}

.payment-return-card[data-state="error"] {
  border-color: #efc8ce;
  background: #fff7f8;
}

.payment-return-card[data-state="error"] h2 {
  color: #a5384b;
}

.payment-return-card #paymentResultKey {
  display: block;
  max-width: 100%;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid #dcece3;
  border-radius: 12px;
  color: #195738;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.payment-return-card .payment-return-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.payment-return-card .payment-return-primary,
.payment-return-card .payment-return-secondary {
  display: inline-flex;
  flex: 1 1 190px;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #7049f5;
  border-radius: 12px;
  color: #fff;
  background: #7049f5;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.payment-return-card .payment-return-secondary {
  border-color: #d8d0f6;
  color: #5236b0;
  background: #fff;
}

.payment-return-card button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.payment-return-card #paymentResultCopyStatus:not(:empty) {
  margin-top: 12px;
  color: #195738;
  font-size: 14px;
}

@media (max-width: 480px) {
  .payment-return-card .payment-return-actions > * { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-page .checkout-brand-motion {
    display: none;
  }

  .checkout-page .checkout-brand-poster {
    display: block;
  }

  html:has(> body.checkout-page) {
    scroll-behavior: auto !important;
  }

  .checkout-page *,
  .checkout-page *::before,
  .checkout-page *::after,
  .payment-return-card,
  .payment-return-card *,
  .payment-return-card *::before,
  .payment-return-card *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
