/* Paystack kit checkout pages. Brand kit = override the tokens in :root (a site's brand.css after this file). */
:root {
  --brand: #2F5D50;        /* buttons, slider, selected states */
  --on-brand: #FFFFFF;     /* text on --brand */
  --brand-soft: #EAF1EE;   /* stock pill, success ring */
  --ground: #F2F3F5;       /* page background */
  --surface: #FFFFFF;      /* cards */
  --ink: #16181D;          /* text */
  --muted: #4A505C;        /* secondary text, 4.5:1+ on surface and ground */
  --line: #E3E5EA;         /* dividers */
  --field: #8A909B;        /* input and control borders, 3:1+ */
  --danger: #A23A22;       /* errors */
  --danger-soft: #FBEAE5;  /* error and low-stock backgrounds */
  --placeholder: #E6E8EC;  /* photo placeholders */
  --radius: 16px;          /* cards */
  --radius-sm: 12px;       /* inputs, chips */
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: var(--font);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --confetti: var(--brand), #F2C14E, #E8836B, #7FB7A4, var(--ink); /* booked burst; any CSS colours */
  --shadow: 0 1px 2px rgb(22 24 29 / .06), 0 12px 32px rgb(22 24 29 / .07);
  color-scheme: light;
}
/* Dark: follows the device; <html data-theme="light"> or "dark" pins one. A brand kit overrides these the same way. */
:root[data-theme="dark"] {
  --brand: #7CC2A9; --on-brand: #0E1012; --brand-soft: #1C3029;
  --ground: #0E1012; --surface: #181B1F; --ink: #ECEEF1; --muted: #A3AAB5; --line: #2A2F36; --field: #6B7380;
  --danger: #F2917B; --danger-soft: #3A1D17; --placeholder: #22262B;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7CC2A9; --on-brand: #0E1012; --brand-soft: #1C3029;
    --ground: #0E1012; --surface: #181B1F; --ink: #ECEEF1; --muted: #A3AAB5; --line: #2A2F36; --field: #6B7380;
    --danger: #F2917B; --danger-soft: #3A1D17; --placeholder: #22262B;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
::selection { background: var(--brand); color: var(--on-brand); }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2 { font-family: var(--font-display); text-wrap: balance; letter-spacing: -0.02em; margin: 0; }
.ck-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
[hidden] { display: none !important; }

/* top bar */
.ck-top { max-width: 1160px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ck-brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.ck-back { font-weight: 500; padding: 12px 0; }

/* product layout */
.ck-product { max-width: 1160px; margin: 0 auto; padding: 8px 24px 64px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.ck-gallery { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; }
.ck-stage { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--line); }
.ck-stage::-webkit-scrollbar { display: none; }
.ck-stage > * { flex: 0 0 100%; scroll-snap-align: start; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.ck-ph { display: grid; place-items: center; background: var(--placeholder); color: var(--muted); font-weight: 500; font-size: 15px; }
.ck-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.ck-thumbs button { aspect-ratio: 1; border: 0; padding: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--placeholder); color: var(--muted); font-weight: 600; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s var(--ease), opacity .2s var(--ease); opacity: .72; }
.ck-thumbs button[aria-current="true"] { outline-color: var(--brand); opacity: 1; }
.ck-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ck-buy { flex: 1 1 400px; min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.ck-head { display: flex; flex-direction: column; gap: 10px; }
.ck-stock { align-self: flex-start; margin: 0; font-size: 14px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; }
.ck-stock[data-low] { color: var(--danger); background: var(--danger-soft); }
.ck-buy h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.1; font-weight: 700; }
.ck-desc { margin: 0; color: var(--muted); max-width: 60ch; }
.ck-when { margin: 0; font-weight: 600; color: var(--brand); } /* the session's date, when the booking block sends ?session= */

/* price */
.ck-price { display: flex; flex-direction: column; gap: 10px; }
.ck-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ck-label { font-weight: 600; font-size: 15px; }
.ck-amount { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; display: inline-block; }
.ck-amount.tick { animation: ck-tick .32s var(--ease); }
.ck-per { font-size: 15px; font-weight: 500; color: var(--muted); }
.ck-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ck-help { margin: 0; font-size: 14px; color: var(--muted); }
.ck-range { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; margin: 0; --pct: 50%; }
.ck-range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--brand) var(--pct), var(--line) var(--pct)); }
.ck-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); box-shadow: 0 2px 8px rgb(22 24 29 / .2); transition: transform .2s var(--ease); }
.ck-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.ck-range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.ck-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--brand); }
.ck-range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); box-shadow: 0 2px 8px rgb(22 24 29 / .2); }
.ck-range:focus-visible { outline-offset: 6px; border-radius: 8px; }
.ck-chips { display: flex; gap: 8px; }
.ck-chips button { flex: 1; min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--field); background: var(--surface); font-weight: 600; font-size: 15px; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.ck-chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* quantity */
.ck-step { display: flex; align-items: center; gap: 2px; background: var(--ground); border: 1px solid var(--field); border-radius: 999px; padding: 3px; }
.ck-step button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; transition: background-color .15s ease, transform .12s var(--ease); }
.ck-step button:active:not(:disabled) { transform: scale(.92); }
.ck-step button:disabled { opacity: .35; cursor: not-allowed; }
.ck-step output { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }
.ck-note { margin: -12px 0 0; font-size: 14px; color: var(--muted); }

/* people and fields */
.ck-people { display: flex; flex-direction: column; gap: 12px; }
.ck-person { margin: 0; min-width: 0; border: 0; border-top: 1px solid var(--line); padding: 16px 0 0; animation: ck-in .45s var(--ease) backwards; }
.ck-person legend { float: left; width: 100%; padding: 0 0 10px; font-weight: 600; font-size: 15px; }
.ck-pair { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ck-person.out { animation: ck-out .22s var(--ease) forwards; }
.ck-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-field label { font-size: 14px; font-weight: 500; color: var(--muted); }
.ck-field :is(input, select, textarea) { height: 48px; min-width: 0; border: 1px solid var(--field); border-radius: var(--radius-sm); padding: 0 14px; font-size: 16px; background: var(--surface); caret-color: var(--brand); transition: border-color .15s, box-shadow .15s; }
.ck-field :is(input, select, textarea):focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.ck-field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); }
.ck-field .ck-err { font-size: 13px; color: var(--danger); margin: 0; }
.ck-alert { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 15px; font-weight: 500; }

/* K6 to K9: questions, per-person amounts, add-ons, the code box, consents */
.ck-field textarea { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.ck-field select { -webkit-appearance: none; appearance: none; padding-right: 42px; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 21px, calc(100% - 16px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.ck-opt { font-weight: 400; }
.ck-hint { margin: 0; font-size: 13px; color: var(--muted); }
.ck-pair > .ck-wide { grid-column: 1 / -1; }
.ck-qs { clear: both; display: flex; flex-direction: column; gap: 12px; }
.ck-pair + .ck-qs { margin-top: 12px; }
.ck-pp { clear: both; margin-top: 14px; padding: 12px 14px 8px; border-radius: var(--radius-sm); background: var(--ground); display: flex; flex-direction: column; gap: 2px; }
.ck-pp .ck-row { align-items: center; }
.ck-pp-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.ck-pp-amt { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.ck-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ck-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; font-size: 15px; cursor: pointer; }
.ck-check input { -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--field); border-radius: 6px; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.ck-check input::after { content: ""; width: 11px; height: 6px; border: solid var(--on-brand); border-width: 0 0 2.2px 2.2px; transform: translateY(-1px) rotate(-45deg) scale(.5); opacity: 0; transition: opacity .15s var(--ease), transform .25s var(--spring); }
.ck-check input:checked { background: var(--brand); border-color: var(--brand); }
.ck-check input:checked::after { opacity: 1; transform: translateY(-1px) rotate(-45deg); }
.ck-check input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.ck-check > span { padding-top: 1px; line-height: 1.4; }

.ck-addons { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-addons legend { float: left; width: 100%; padding: 0 0 2px; }
.ck-addon { clear: both; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.ck-addon:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ck-addon > span { padding: 0; }
.ck-addon-name { flex: 1; font-weight: 500; }
.ck-addon-price { font-weight: 600; font-size: 14px; color: var(--muted); }
.ck-addon:has(input:checked) .ck-addon-price { color: var(--ink); }

.ck-code { margin-top: -12px; }
.ck-code summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--brand); cursor: pointer; list-style: none; border-radius: 6px; }
.ck-code summary::-webkit-details-marker { display: none; }
.ck-code summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.ck-code[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.ck-code-row { display: flex; gap: 8px; align-items: flex-end; padding-top: 4px; }
.ck-code-row .ck-field { flex: 1; }
#ck-code { text-transform: uppercase; letter-spacing: .06em; }
#ck-code:read-only { background: var(--ground); }
#ck-code::placeholder { text-transform: none; letter-spacing: 0; }
.ck-apply { flex: 0 0 auto; min-width: 96px; height: 48px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--field); background: var(--surface); font-weight: 600; font-size: 15px; transition: border-color .2s var(--ease), opacity .2s var(--ease); }
.ck-apply:disabled { opacity: .6; cursor: progress; }
.ck-code-msg { margin: 8px 0 0; font-size: 14px; font-weight: 500; }
.ck-code-msg:empty { display: none; }
.ck-code-msg[data-tone="ok"] { color: var(--brand); }
.ck-code-msg[data-tone="err"] { color: var(--danger); }

.ck-consents { display: flex; flex-direction: column; }
.ck-consents > .ck-help { margin: 2px 0 2px; }
.ck-consent { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 12px; }
.ck-consent .ck-check { flex: 1 1 220px; }
.ck-read { font-size: 14px; font-weight: 600; padding: 11px 0; }
.ck-consent .ck-err { flex-basis: 100%; margin: -6px 0 6px 34px; font-size: 13px; color: var(--danger); }

/* accepted-payment strip: monochrome marks drifting past, edges faded */
.ck-marks { overflow: hidden; margin: -6px 0 -4px; -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); }
.ck-marks-track { display: flex; width: max-content; animation: ck-marquee 32s linear infinite; }
.ck-marks-set { display: flex; align-items: center; gap: 36px; margin: 0; padding: 4px 18px; list-style: none; color: color-mix(in srgb, var(--ink) 52%, transparent); }
.ck-marks-set li { display: flex; align-items: center; height: 40px; }
.ck-mark-icon { width: 44px; height: 44px; fill: currentColor; }
.ck-word { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .ck-marks:hover .ck-marks-track { animation-play-state: paused; } }
@keyframes ck-marquee { to { transform: translateX(-50%); } }

/* pay bar */
.ck-paybar { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.ck-sum { color: var(--muted); font-size: 15px; }
.ck-total { font-size: 22px; font-weight: 700; }
.ck-pay { height: 56px; border: 0; border-radius: var(--radius); background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .16s var(--ease), box-shadow .2s var(--ease), opacity .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .ck-pay:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 30%, transparent); }
  .ck-chips button:hover { border-color: var(--brand); }
  .ck-apply:hover:not(:disabled), .ck-check:hover input:not(:checked) { border-color: var(--brand); }
  .ck-addon:hover { border-color: var(--field); }
  .ck-code summary:hover { text-decoration: underline; text-underline-offset: 3px; }
  .ck-step button:hover:not(:disabled) { background: var(--line); }
}
.ck-pay:active:not(:disabled) { transform: scale(.98); }
.ck-pay:disabled { opacity: .55; cursor: not-allowed; }
.ck-pay[aria-busy="true"] { opacity: .85; cursor: progress; }
.ck-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ck-rot .7s linear infinite; }
.ck-trust { margin: 0; display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.ck-trust svg { flex-shrink: 0; margin-top: 3px; }

/* result pages */
[data-state] { display: flex; flex-direction: column; gap: 20px; }
.ck-result { max-width: 520px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 20px; }
.ck-mark { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 24px auto 0; background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 10px var(--brand-soft); animation: ck-pop .6s var(--ease) backwards; }
.ck-mark path { stroke-dasharray: 24; stroke-dashoffset: 0; animation: ck-draw .5s .25s var(--ease) backwards; }
.ck-mark.warn { background: var(--surface); color: var(--danger); box-shadow: 0 0 0 10px var(--line); }
.ck-mark.wait { background: var(--surface); color: var(--brand); box-shadow: 0 0 0 10px var(--line); }
.ck-mark.wait .ck-spin { width: 30px; height: 30px; border-width: 3px; }
.ck-result h1 { font-size: 30px; line-height: 1.15; text-align: center; }
.ck-lead { margin: -8px 0 0; text-align: center; color: var(--muted); }
.ck-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; animation: ck-in .5s .1s var(--ease) backwards; }
.ck-card + .ck-card { animation-delay: .18s; }
.ck-card h2 { font-size: 16px; letter-spacing: 0; }
.ck-card p { margin: 0; color: var(--muted); font-size: 15px; }
.ck-line { display: flex; justify-content: space-between; gap: 12px; }
.ck-who { color: var(--muted); font-size: 14px; }
.ck-paid { border-top: 1px dashed var(--field); padding-top: 12px; font-size: 18px; font-weight: 700; }
.ck-ref { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.ck-ref > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-ref code { font: 500 13px ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); overflow-wrap: anywhere; }
.ck-copy { border: 1px solid var(--field); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; min-height: 32px; }
.ck-tips { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.ck-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ck-btn { min-height: 56px; border-radius: var(--radius); background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: transform .16s var(--ease); }
.ck-btn.dark { background: var(--ink); color: var(--surface); }
.ck-btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--field); }
.ck-btn:active { transform: scale(.98); }
.ck-cal + .ck-cal { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ck-cal p { margin: 0 0 10px; }
.ck-calbtns { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ck-calbtns .ck-btn { min-height: 48px; font-size: 15px; }
.ck-link { min-height: 48px; display: flex; align-items: center; justify-content: center; font-weight: 600; }

/* booked: spring pop, two ripples, check draws, heading sharpens, receipt prints (confetti in result.js) */
.ck-mark.celebrate { animation: ck-spring .7s var(--spring) backwards; }
.ck-mark.celebrate::before, .ck-mark.celebrate::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: ck-ripple 1.2s .25s var(--ease) both; pointer-events: none; }
.ck-mark.celebrate::after { animation-delay: .5s; }
.ck-mark.celebrate path { animation-delay: .35s; animation-duration: .45s; }
.ck-celebrate-h { animation: ck-focus .7s .4s var(--ease) backwards; }
[data-state="paid"] .ck-lead { animation: ck-in .6s .55s var(--ease) backwards; }
[data-slot="lines"] { animation: ck-print .9s .7s var(--ease) backwards; }
[data-slot="lines"] > * { animation: ck-in .45s var(--ease) backwards; }
[data-slot="lines"] > :nth-child(1) { animation-delay: .9s; }
[data-slot="lines"] > :nth-child(2) { animation-delay: .98s; }
[data-slot="lines"] > :nth-child(3) { animation-delay: 1.06s; }
[data-slot="lines"] > :nth-child(n+4) { animation-delay: 1.14s; }
[data-state="paid"] .ck-card + .ck-card { animation-delay: 1.15s; }
[data-state="paid"] .ck-actions { animation: ck-in .5s 1.3s var(--ease) backwards; }
.ck-confetti { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 10; }
.ck-confetti i { position: absolute; left: -4px; top: -6px; width: 8px; height: 12px; border-radius: 2px; will-change: transform, opacity; }
.ck-confetti i:nth-child(3n) { width: 8px; height: 8px; border-radius: 50%; }

/* not completed: drop in, a small "nope" shake, ring deflates, the ! draws, Try again nudges once */
.ck-mark.warn { animation: ck-drop .55s var(--spring) backwards, ck-nope .5s .6s ease-in-out; }
.ck-mark.warn::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--danger); opacity: 0; animation: ck-deflate .8s .5s var(--ease) both; pointer-events: none; }
.ck-mark.warn path:first-child { stroke-dasharray: 8; animation: ck-bang .35s .35s var(--ease) backwards; }
.ck-mark.warn path:last-child { animation: ck-dot .25s .65s var(--spring) backwards; transform-origin: 12px 17px; }
[data-page="failed"] h1 { animation: ck-in .5s .3s var(--ease) backwards; }
[data-page="failed"] .ck-lead { animation: ck-in .5s .4s var(--ease) backwards; }
[data-page="failed"] .ck-card { animation-delay: .55s; }
[data-page="failed"] .ck-card + .ck-card { animation-delay: .65s; }
[data-page="failed"] .ck-actions { animation: ck-in .5s .75s var(--ease) backwards; }
[data-page="failed"] .ck-actions .ck-btn { animation: ck-nudge .6s 1.6s var(--ease); }

@keyframes ck-spring { from { transform: scale(.4); opacity: 0; } 60% { opacity: 1; } }
@keyframes ck-ripple { from { transform: scale(1); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }
@keyframes ck-focus { from { opacity: 0; transform: translateY(8px) scale(.98); filter: blur(8px); } }
@keyframes ck-print { from { clip-path: inset(0 0 100% 0 round var(--radius)); transform: translateY(-6px); } to { clip-path: inset(0 0 0 0 round var(--radius)); } }
@keyframes ck-drop { from { transform: translateY(-28px) scale(.9); opacity: 0; } }
@keyframes ck-nope { 20% { transform: translateX(-7px) rotate(-4deg); } 40% { transform: translateX(6px) rotate(3deg); } 60% { transform: translateX(-4px) rotate(-2deg); } 80% { transform: translateX(2px); } }
@keyframes ck-deflate { from { transform: scale(1.45); opacity: .5; } to { transform: scale(1); opacity: 0; } }
@keyframes ck-bang { from { stroke-dashoffset: 8; } }
@keyframes ck-dot { from { transform: scale(0); } }
@keyframes ck-nudge { 40% { transform: scale(1.035); } 70% { transform: scale(.995); } }
@keyframes ck-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ck-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes ck-tick { 40% { transform: scale(1.06); } }
@keyframes ck-pop { from { transform: scale(.6); opacity: 0; box-shadow: 0 0 0 0 var(--brand-soft); } }
@keyframes ck-draw { from { stroke-dashoffset: 24; } }
@keyframes ck-rot { to { transform: rotate(360deg); } }
.ck-buy > * { animation: ck-in .5s var(--ease) backwards; }
.ck-buy > :nth-child(2) { animation-delay: .05s; } .ck-buy > :nth-child(3) { animation-delay: .1s; }
.ck-buy > :nth-child(4) { animation-delay: .15s; } .ck-buy > :nth-child(n+5) { animation-delay: .2s; }

@media (max-width: 720px) {
  .ck-top { padding: 14px 16px; }
  .ck-product { padding: 0 0 0; gap: 0; }
  .ck-gallery { position: static; flex-basis: 100%; gap: 0; }
  .ck-stage { border-radius: 0; aspect-ratio: 5 / 4; }
  .ck-thumbs { display: none; }
  .ck-dots { display: flex; }
  .ck-buy { border-radius: 24px 24px 0 0; margin-top: -24px; position: relative; padding: 24px 16px 0; box-shadow: none; gap: 20px; }
  .ck-pair { grid-template-columns: 1fr; }
  html { scroll-padding-bottom: 104px; }
  .ck-paybar { position: sticky; bottom: 0; background: var(--surface); margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-direction: row; align-items: center; z-index: 2; }
  .ck-paybar .ck-row { flex-direction: column; align-items: flex-start; gap: 0; }
  .ck-paybar .ck-pay { flex: 1; }
}
.ck-dots { display: none; justify-content: center; gap: 6px; position: relative; margin-top: -48px; height: 48px; align-items: center; pointer-events: none; z-index: 1; }
.ck-dots span { width: 6px; height: 6px; border-radius: 3px; background: rgb(255 255 255 / .7); box-shadow: 0 0 0 1px rgb(0 0 0 / .15); transition: width .3s var(--ease), background-color .3s; }
.ck-dots span[aria-current="true"] { width: 20px; background: #fff; }

/* reduced motion: no movement, keep fades and the spinners (they say "working") */
@keyframes ck-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ck-buy > *, .ck-person, .ck-card, .ck-mark, .ck-celebrate-h, .ck-lead, .ck-actions, .ck-result h1 { animation: ck-fade .3s ease both !important; }
  .ck-mark::before, .ck-mark::after, .ck-actions .ck-btn, .ck-mark path { animation: none !important; }
  [data-slot="lines"] > * { animation: none !important; }
  .ck-person.out { animation: ck-fade .15s reverse forwards; }
  .ck-mark path { animation: none; }
  .ck-marks-track { animation: none; width: auto; }
  .ck-marks-set { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
  .ck-marks-set[aria-hidden] { display: none; }
  .ck-marks { -webkit-mask-image: none; mask-image: none; }
  .ck-amount.tick { animation: none; }
  .ck-check input::after { transition-property: opacity; transform: translateY(-1px) rotate(-45deg); }
  .ck-code summary::after { transition: none; }
  .ck-pay, .ck-btn, .ck-step button, .ck-range::-webkit-slider-thumb { transition-property: opacity, background-color, border-color, color; }
  .ck-pay:active:not(:disabled), .ck-btn:active, .ck-step button:active:not(:disabled), .ck-range:active::-webkit-slider-thumb { transform: none; }
}

/* a payment result shown here instead of on its own page (decision "popup") */
.ck-popup { width: min(560px, calc(100vw - 32px)); height: min(720px, calc(100dvh - 32px)); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); grid-template-rows: 1fr auto; }
.ck-popup[open] { display: grid; } /* only while open: a plain display would show the dialog closed */
.ck-popup::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.ck-popup iframe { width: 100%; height: 100%; border: 0; }
.ck-popup .ck-btn { margin: 12px; justify-self: end; }
