/* ── Paying for a save set (/saves/{slug}/buy) and its order page (/saves/orders/{id}) ──
   Loaded after saves.css and uses its tokens (--ink, --muted, --line, --surface, --field,
   --brand, --brand-fill, --focus). Motion: only the shared press feedback (data-press, .sv-buy)
   and the field focus colour. No inline styles: the CSP forbids them. */

.sc { max-width: 34rem; margin: 8px auto 48px; }

.sc-back {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
    color: var(--muted); font-size: .9375rem; font-weight: 600; text-decoration: none;
}
.sc-back:hover { color: var(--ink); }
.sc-back:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.sc-card {
    margin-top: 8px; padding: 24px;
    border: 1px solid var(--line); border-radius: 24px; background: var(--surface);
}
@media (max-width: 480px) { .sc-card { padding: 18px; border-radius: 20px; } }

.sc-head { display: flex; align-items: center; gap: 16px; }
.sc-cover { width: 96px; height: 96px; flex: none; border-radius: 16px; object-fit: cover; background: var(--seg); }
@media (max-width: 380px) { .sc-cover { width: 72px; height: 72px; border-radius: 12px; } }
.sc-head-text { min-width: 0; }
.sc-title { margin: 6px 0 0; font-size: 1.25rem; line-height: 1.25; font-weight: 700; color: var(--ink); text-wrap: balance; }
.sc-price { margin: 10px 0 0; display: flex; flex-direction: column; gap: 2px; }
.sc-price-tag { font-size: .75rem; font-weight: 700; color: var(--brand); }
.sc-price-now { font-size: 1.5rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.sc-form { margin-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.sc-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.sc-label { display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 700; color: var(--ink); }
.sc-optional { font-weight: 500; color: var(--muted); }
.sc-input {
    width: 100%; min-height: 48px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field);
    color: var(--ink); font-size: 1rem;
    transition: border-color 150ms ease;
}
.sc-input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }
.sc-hint { margin: 6px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--muted); }

.sc-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--seg); }
.sc-seg-item { position: relative; }
.sc-seg-item input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sc-seg-item span {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
    font-size: .9375rem; font-weight: 700; color: var(--muted);
    transition: background-color 150ms ease, color 150ms ease;
}
.sc-seg-item input:checked + span { background: var(--seg-on); color: var(--ink); }
.sc-seg-item input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.sc-contact { margin-top: 10px; }
.sc-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sc-submit { width: 100%; min-height: 52px; font-size: 1rem; border: 0; cursor: pointer; }

.sc-error {
    margin: 0; padding: 12px 14px; border-radius: 12px;
    border: 1px solid color-mix(in srgb, #ef4444 45%, transparent);
    background: color-mix(in srgb, #ef4444 10%, transparent);
    color: var(--ink); font-size: .9375rem; line-height: 1.45;
}

.sc-notes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sc-notes li { position: relative; padding-inline-start: 18px; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.sc-notes li::before {
    content: ""; position: absolute; inset-inline-start: 4px; top: .55em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
}
.sc-alt { margin: 0; font-size: .875rem; }
.sc-alt a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }

/* The order page */
.sc-status { margin: 22px 0 0; display: flex; align-items: flex-start; gap: 12px; }
.sc-status-icon {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand);
}
.sc-status-icon svg { width: 20px; height: 20px; }
.sc-status-title { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.sc-status-text { margin: 4px 0 0; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.sc-facts { margin: 20px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .9375rem; }
.sc-facts dt { color: var(--muted); }
.sc-facts dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.sc-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.sc-secondary {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
    border: 1px solid var(--line-strong); color: var(--ink); font-size: .9375rem; font-weight: 600; text-decoration: none;
}
.sc-secondary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .sc-input, .sc-seg-item span { transition: none; }
}

/* The set's label (start of game, custom save…) under its title. */
.sc-kind { margin: 8px 0 0; }
