.margin-checkout { padding-block: clamp(22px,4vw,54px) 72px; }
.checkout-shell {
  display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);
  border:1px solid #ffffff22; border-radius:22px; background:#111216; overflow:clip;
}
.checkout-work { min-width:0; padding:clamp(26px,4vw,56px); }
.checkout-heading { display:flex; align-items:center; gap:10px; color:#e9eaf0; font-weight:540; letter-spacing:-.035em; }
.checkout-heading h1 { margin:0; font:inherit; }
.checkout-steps { display:flex; align-items:center; flex-wrap:wrap; margin:clamp(32px,4vw,56px) 0 18px; gap:7px; scroll-margin-top:66px; }
.checkout-steps button { border:0; padding:8px 0; background:none; color:#bbc2d4; font:500 14px Geist,sans-serif; }
.checkout-steps button:not(:last-child)::after { content:''; display:inline-block; width:5px; height:5px; margin:0 3px 2px 10px; border:solid #75829d; border-width:1px 1px 0 0; transform:rotate(45deg); }
.checkout-steps button[aria-current] { color:#fff; }
.checkout-steps button:disabled { opacity:1; color:#929bad; cursor:default; }
.checkout-work h2 { margin:0 0 24px; font:550 clamp(29px,3.1vw,45px)/1.05 Geist,sans-serif; letter-spacing:-.06em; }
.checkout-field { display:grid; align-content:start; gap:8px; min-width:0; margin:0 0 17px; color:#e1e2e9; font-size:14px; }
.checkout-field :is(input,select) { width:100%; height:48px; min-width:0; padding:0 13px; background:#0b0d12; color:#f4f4f6; border:1px solid #383e4f; border-radius:8px; font:400 16px Geist,sans-serif; }
.checkout-field :is(input,select):focus-visible { outline:2px solid #a6bbff; outline-offset:2px; }
.checkout-field input:read-only { color:#bfc9db; }
.field-hint, .checkout-policy, [data-panel="3"] > p { color:#bdc4d2; font-size:14px; line-height:1.55; }
.field-hint { margin:-9px 0 16px; }
.checkout-text-link { display:inline-flex; min-height:42px; align-items:center; background:transparent; border:0; padding:0; color:#d7e2ff; font:inherit; font-size:14px; text-decoration:underline; text-underline-offset:4px; }
.address-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:14px; }
.address-fields .wide { grid-column:1/-1; }
.order-total { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:18px 0 25px; }
.order-total strong { font-size:26px; font-weight:550; letter-spacing:-.06em; }
.checkout-agreement { display:flex; align-items:flex-start; gap:10px; padding-block:16px 3px; font-size:14px; }
.checkout-agreement input { width:18px; height:18px; flex:none; accent-color:#98b2ff; }
.checkout-agreement a { text-decoration:underline; text-underline-offset:3px; }
.checkout-display {
  isolation:isolate; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:20px;
  padding:clamp(24px,3vw,46px); border-left:1px solid #ffffff12;
  background:radial-gradient(ellipse at 55% 31%,#2c3758 0,#1b2235 42%,#151923 75%);
  padding-top:clamp(36px,4.5vw,64px);
}
.ticket-stage {
  width:min(100%,310px); position:relative; container-type:inline-size; isolation:isolate;
  --stub-height:68px;
}
.ticket-shadow {
  position:absolute; inset:5% 2% 1%; border-radius:14px; pointer-events:none;
  background:#040917; opacity:.67; filter:blur(12px); transform:translate(3px,11px);
}
.ticket-stage[data-detached] .ticket-shadow { bottom:calc(var(--coupon-size,var(--stub-height)) + 1%); }
.ticket-rotor { position:relative; display:grid; pointer-events:none; }
.ticket-side { grid-area:1/1; display:grid; grid-template-rows:1fr auto; min-width:0; }
.ticket-reverse, .ticket-stage[data-face="back"] .ticket-obverse { visibility:hidden; }
.ticket-stage[data-face="back"] .ticket-reverse { visibility:visible; }
.ticket-stage[data-moving] { z-index:2; }
.ticket-stage[data-printed] .ticket-rotor { opacity:0; }
.ticket-grip {
  position:absolute; z-index:2; inset:0; width:100%; height:100%; margin:0; padding:0;
  border:0; border-radius:13px; background:transparent; cursor:grab;
  touch-action:pan-y pinch-zoom; user-select:none; -webkit-user-select:none; -webkit-tap-highlight-color:transparent;
}
.ticket-grip:focus-visible { outline:2px solid #c4d6ff; outline-offset:6px; }
.ticket-stage[data-grabbing] .ticket-grip { cursor:grabbing; }
.ticket-stage[data-detached] .ticket-grip { height:calc(100% - var(--coupon-size,var(--stub-height))); }
.paper-canvas {
  position:absolute; left:-24%; top:-22%; width:189%; height:162%;
  pointer-events:none; visibility:hidden; max-width:none;
}
.ticket-stage[data-printed] .paper-canvas { visibility:visible; }
.margin-checkout .ticket-front, .ticket-back {
  grid-area:1/1; min-height:max(332px,115cqi); border-radius:13px 13px 2px 2px; box-shadow:inset 0 1px #c5ccd58c,inset 1px 0 #e8dbc55c,inset -1px 0 #08143073;
  /* The top half of the perforation stays with the pass. */
  mask:radial-gradient(circle 5px at 0 100%,transparent 94%,black) left / 50.2% 100% no-repeat,
       radial-gradient(circle 5px at 100% 100%,transparent 94%,black) right / 50.2% 100% no-repeat;
}
.margin-checkout .ticket-front { padding-block:19px 20px; grid-template-rows:auto minmax(98px,1fr) auto auto; gap:12px; }
.margin-checkout .ticket-front h2 { font:610 clamp(43px,18cqi,60px)/.93 Geist,sans-serif; letter-spacing:-.075em; }
.margin-checkout .ticket-front h2 em { display:block; font:450 .52em/1.12 Geist,sans-serif; letter-spacing:-.04em; margin:.08em 0 0; }
.margin-checkout .ticket-front .ticket-lot { z-index:1; display:flex; align-items:baseline; gap:6px; color:#dbe5fb; }
.margin-checkout .ticket-front .ticket-lot::before { content:none; }
.ticket-lot b { color:#fff; font-size:1.3em; }
.ticket-front .holder-plate b { font-size:clamp(16px,5.5cqi,23px); }
.ticket-front .holder-plate b.long-name { font-size:14px; }
.ticket-back {
  position:relative; display:flex; flex-direction:column; justify-content:space-between; gap:12px; padding:19px 22px;
  color:#ecf0fd; isolation:isolate; background:linear-gradient(128deg,#233e84,#182d64 50%,#112552);
  border:1px solid #9cafd23d;
}
.back-brand { display:flex; align-items:center; gap:9px; color:#d3def7; font:10px/1.4 var(--mono); letter-spacing:.07em; text-transform:uppercase; }
.back-brand img { width:31px; height:31px; }
.reverse-title { font:520 25px/1.05 Geist,sans-serif; letter-spacing:-.05em; }
.reverse-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 10px; margin:0; }
.reverse-details > div { min-width:0; padding-block:3px; }
.reverse-details > div:nth-child(-n+2) { grid-column:1/-1; }
.reverse-details dt, .ticket-coupon span:first-child { color:#c3d0ed; font:10px/1.35 var(--mono); }
.reverse-details dd { margin:3px 0 0; font-size:14px; line-height:1.18; overflow-wrap:anywhere; }
.ticket-coupon {
  grid-area:2/1; position:relative; isolation:isolate; display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:var(--stub-height);
  padding:12px 20px; transform-origin:4% 0; border-radius:0 0 10px 10px; color:#1c2943;
  background:linear-gradient(105deg,#d6d4cb,#ece9df 65%,#deded5);
  mask:radial-gradient(circle 5px at 0 0,transparent 94%,black) left / 50.2% 100% no-repeat,
       radial-gradient(circle 5px at 100% 0,transparent 94%,black) right / 50.2% 100% no-repeat;
}
.ticket-coupon::before { content:''; position:absolute; inset:0 5px auto; height:1px; background:repeating-linear-gradient(90deg,#48526b 0 4px,transparent 4px 8px); }
.ticket-perforation {
  position:absolute; z-index:2; inset:auto 0 0; height:2px; pointer-events:none;
  background:repeating-linear-gradient(90deg,#d1d1c2 0 1px,#c8c3b0 1px 1.8px,transparent 2px 5px);
}
.ticket-stage[data-cutting] .ticket-perforation { clip-path:inset(0 0 0 var(--cut-point,100%)); }
.ticket-stage[data-cutting] .ticket-perforation, .ticket-stage[data-detached] .ticket-perforation {
  height:3px; background:#d3cfba;
  mask:url('/art/torn-edge.svg') bottom / 51px 3px repeat-x;
}
.ticket-coupon span:first-child { color:#48536a; }
.ticket-coupon strong { display:block; margin-top:3px; font:560 28px/1 Geist,sans-serif; letter-spacing:-.065em; }
.coupon-countermark { width:31%; display:grid; gap:4px; }
.coupon-serial { color:#424d59; font:8px/1 var(--mono); letter-spacing:.12em; white-space:nowrap; }
.coupon-etch { display:block; width:100%; height:34px; opacity:.44; background:repeating-radial-gradient(ellipse at 40% 110%,transparent 0 3px,#3e5278 3.3px 4px,transparent 4.4px 6px); }
/* The ink is matte. Only the stamped metal and its engraving catch directional light. */
.margin-checkout .ticket-front {
  background:linear-gradient(90deg,#c5c8c5,#e1e0d8 8%,#c8cbc9 13.5%,#17284d 13.8%,transparent 14%),
    linear-gradient(145deg,#23459b,#142f76 52%,#0c2054);
}
.ticket-stage :is(.ticket-front,.ticket-back,.ticket-coupon)::after {
  content:''; position:absolute; inset:0; z-index:1; border-radius:inherit; pointer-events:none;
  opacity:.41; mix-blend-mode:soft-light;
  background:url('/art/cardstock-grain.png') 0 0 / 176px 176px repeat;
}
.ticket-stage .ticket-coupon::after { opacity:.64; }
.ticket-stage .pass-crest::after {
  animation:none; opacity:var(--foil-gain,.57);
  background:linear-gradient(118deg,transparent 33%,#e1eaff88 43%,#fff8df 49%,#95aed1 53%,transparent 62%);
  background-size:200% 100%; background-position:var(--foil-x,46%) 50%;
}
.ticket-stage .pass-crest img { filter:drop-shadow(.8px 2px 1.3px #060e2cc9); }
.ticket-stage .holder-plate b {
  position:relative; z-index:2; color:#cdd5e1;
  text-shadow:0 -.7px #fff4d7,.5px 1px #697fa4,1px 2px #091b3d,1.5px 2.6px 1.2px #101d39;
}
.checkout-continue { width:min(100%,330px); min-height:49px; display:flex; justify-content:center; align-items:center; gap:14px; padding:10px 16px; border:1px solid #ced8f1; border-radius:999px; background:#e9edf8; color:#121c36; font:550 15px/1.25 Geist,sans-serif; }
.checkout-continue:hover { background:white; }
.checkout-continue i { font:normal 21px/1 Geist,sans-serif; }
.checkout-shell [hidden] { display:none !important; }
@media (scripting:enabled) {
  .margin-checkout:not([data-step="1"]) [data-panel="1"],
  .margin-checkout:not([data-step="2"]) [data-panel="2"],
  .margin-checkout:not([data-step="3"]) [data-panel="3"] { display:none; }
}
.ticket-stage[data-detached] :is(.ticket-front,.ticket-back) {
  mask:linear-gradient(#000 0 0) top / 100% calc(100% - 2px) no-repeat,
    url('/art/torn-edge.svg') bottom / 51px 3px repeat-x;
}
.ticket-stage[data-detached]:not([data-printed]) .ticket-coupon {
  transform-origin:center; transform:translate(5%,28px) rotate(-4deg);
  box-shadow:0 4px 7px #040b2066;
}
.margin-checkout .ticket-stage { transition:margin-bottom .32s cubic-bezier(.22,.65,.28,1); }
.checkout-continue { position:relative; z-index:1; }
@media (prefers-reduced-motion:reduce) { .ticket-grip { cursor:pointer; } }
@media (prefers-reduced-motion:reduce) {
  .margin-checkout *, .margin-checkout *::after { animation:none !important; transition:none !important; }
}
@media(max-width:730px) {
  .margin-checkout { padding-block:14px 44px; }
  .checkout-shell { grid-template-columns:minmax(0,1fr); grid-template-areas:'head' 'steps' 'ticket' 'fields' 'continue'; gap:15px; padding:18px; border-radius:14px; }
  .checkout-shell:not(.is-ready) { display:flex; flex-direction:column; }
  .checkout-work,.checkout-display { display:contents; }
  .checkout-heading { grid-area:head; }
  .checkout-steps { grid-area:steps; margin:0; }
  .checkout-shell.is-ready [data-panel] { grid-area:fields; }
  .ticket-stage { grid-area:ticket; width:min(100%,256px); justify-self:center; --stub-height:54px; }
  .checkout-continue { grid-area:continue; justify-self:center; }
  .margin-checkout .ticket-front,.ticket-back { min-height:262px; }
  .margin-checkout .ticket-front { padding:16px 6% 16px 21%; gap:9px; grid-template-rows:auto minmax(65px,1fr) auto auto; }
  .margin-checkout .ticket-back { padding:14px 16px; gap:8px; }
  .reverse-title { font-size:21px; }
  .reverse-details {gap:5px 9px;}
  .reverse-details > div {padding-top:3px;}
  .reverse-details dd {font-size:13px;}
  .ticket-coupon {min-height:54px; padding:8px 15px;}
  .ticket-coupon strong {font-size:23px;}
  .checkout-work h2 { font-size:28px; margin-bottom:16px; }
}

.receipt-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,.85fr); align-items:start; gap:clamp(20px,4vw,56px); padding:0; }
.receipt-layout .resource-copy { max-width:none; }
.receipt-layout .message { min-height:0; }
.receipt-pass { min-width:0; display:grid; place-items:center; padding:clamp(24px,3vw,44px) 20px 64px; border-radius:18px; overflow:clip; background:radial-gradient(ellipse at 48% 40%,#273855,#141b2b 72%); }
@media(max-width:730px) {
  .receipt-layout { grid-template-columns:minmax(0,1fr); }
  .receipt-pass { grid-row:1; }
  .receipt-pass .ticket-stage { grid-area:auto; }
}

.stock-thread {
  position:absolute; inset:0 auto 0 12.9%; width:1.9%; pointer-events:none;
  background:repeating-linear-gradient(38deg,transparent 0 1.5px,#716d7280 1.5px 2px),
    linear-gradient(100deg,#a79d7e,#ddd5b5 24%,#92b1a6 46%,#c8b5ce 72%,#b0ac91);
}
.ticket-stage .pass-crest img { border-radius:50%; box-shadow:0 0 0 2px #1d3154,0 0 0 2.8px #bbab87,0 2px 4px 2px #071329; }

.ticket-stage .resting-stub { position:absolute; inset:auto 0 0; pointer-events:none; }
.ticket-stage:has(.resting-stub) .ticket-side .ticket-coupon { opacity:0; }

.margin-checkout .ticket-front .ticket-wordmark {
  align-self:end; width:100%; line-height:0; margin:0;
}
.ticket-wordmark img { display:block; width:100%; height:auto; }
.payment-feedback { margin:8px 0; line-height:1.5; }
.payment-feedback:empty { display:none; }
.payment-divider { display:flex; align-items:center; gap:12px; margin:16px 0; color:#bdc4d2; font-size:13px; }
.payment-divider::before,.payment-divider::after { content:''; flex:1; height:1px; background:#ffffff28; }
.checkout-continue:disabled { cursor:wait; opacity:.65; }

.payment-access { margin-right:18px; }
.checkout-shell .ticket-stage[data-approved-order] { margin-bottom:32px; }
