/* Multi-pack buying + back-to-back openings (Trevor, Nov 30 2026). public/site/js/cardbit-site-multi.js */
#cardbit-store{--cbm-cy:var(--cb-accent,#00e6e1);--cbm-line:var(--cb-border,#344145);--cbm-panel:var(--cb-panel,#161e21);--cbm-muted:var(--cb-muted,#b6c4c5)}

/* Quantity picker: spans the pack page's button grid, Buy Pack (full width) right under it. */
#cardbit-store .cb-detail-copy > .cb-actions > .cbm-qty{grid-column:1 / -1;min-height:0;white-space:normal;text-align:left;justify-content:stretch}
#cardbit-store .cb-detail-copy > .cb-actions > .cbm-qty + *{grid-column:1 / -1}
#cardbit-store .cbm-qty{display:grid;gap:8px;padding:12px;border:1px solid var(--cbm-line);border-radius:14px;background:var(--cbm-panel)}
#cardbit-store .cbm-qty-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#cardbit-store .cbm-qty-label{font-weight:800;margin-right:auto}
#cardbit-store .cbm-quicks{display:flex;gap:6px}
#cardbit-store .cbm-quick,#cardbit-store .cbm-step button{appearance:none;cursor:pointer;min-width:48px;min-height:44px;padding:0 12px;border-radius:10px;border:1px solid var(--cbm-line);background:transparent;color:inherit;font-weight:800;font-size:15px;line-height:1;font-family:inherit;font-variant-numeric:tabular-nums}
#cardbit-store .cbm-quick[aria-pressed="true"]{border-color:var(--cbm-cy);background:color-mix(in srgb,var(--cbm-cy) 18%,transparent);color:var(--cbm-cy)}
#cardbit-store .cbm-quick:disabled,#cardbit-store .cbm-step button:disabled{opacity:.4;cursor:default}
#cardbit-store .cbm-quick:focus-visible,#cardbit-store .cbm-step button:focus-visible,#cardbit-store .cbm-step input:focus-visible{outline:2px solid var(--cbm-cy);outline-offset:2px}
#cardbit-store .cbm-step{display:flex;align-items:center;border:1px solid var(--cbm-line);border-radius:10px}
#cardbit-store .cbm-step button{border:0;min-width:44px;font-size:20px}
#cardbit-store .cbm-step input{width:52px;min-height:44px;border:0;background:transparent;color:inherit;text-align:center;font-weight:800;font-size:17px;line-height:1;font-family:inherit;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}
#cardbit-store .cbm-step input::-webkit-outer-spin-button,#cardbit-store .cbm-step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
#cardbit-store .cbm-total{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 8px;margin:0;font-weight:800}
#cardbit-store .cbm-total > span:first-child{color:var(--cbm-muted);font-weight:700}
#cardbit-store .cbm-total small{flex-basis:100%;color:var(--cbm-muted);font-weight:600}
#cardbit-store .cbm-bits{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums}
#cardbit-store .cbm-bits img{width:18px;height:18px}
#cardbit-store .cbm-unit{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Confirm dialog: Rip Now / Rip Later */
.cbm-when{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 4px;padding:0;border:0}
.cbm-when legend{font-weight:800;margin-bottom:8px;padding:0}
.cbm-when label{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid var(--cb-border,#344145);border-radius:12px;cursor:pointer}
.cbm-when label:has(input:checked){border-color:var(--cb-accent,#00e6e1);background:color-mix(in srgb,var(--cb-accent,#00e6e1) 12%,transparent)}
.cbm-when label{position:relative}
#cardbit-store .cbm-when input[type=radio],.cbm-when input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.cbm-when label::before{content:"";flex:none;width:18px;height:18px;margin-top:2px;border-radius:50%;border:2px solid var(--cb-border,#344145);box-sizing:border-box}
.cbm-when label:has(input:checked)::before{border-color:var(--cb-accent,#00e6e1);background:radial-gradient(circle,var(--cb-accent,#00e6e1) 0 4px,transparent 5px)}
.cbm-when label:has(input:focus-visible){outline:2px solid var(--cb-accent,#00e6e1);outline-offset:2px}
.cbm-when span{display:grid;gap:2px}
.cbm-when small{color:var(--cb-muted,#b6c4c5)}
.cbm-note{padding:8px 12px;border-radius:10px;background:color-mix(in srgb,var(--cb-accent,#00e6e1) 10%,transparent)}
@media (max-width:480px){.cbm-when{grid-template-columns:1fr}}

/* Back-to-back */
#cardbit-store .cbm-page{padding-top:8px}
#cardbit-store .cbm-summary{padding-top:18px}
#cardbit-store .cbm-wait{display:grid;place-items:center;gap:10px;min-height:50vh;text-align:center}
#cardbit-store .cbm-alert{color:#ffb4a8;font-weight:700}
.cbd-btn.cbd-skipall{border-style:dashed}

/* Combined summary */
#cardbit-store .cbm-summary h1{margin:4px 0 14px}
#cardbit-store .cbm-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:14px}
#cardbit-store .cbm-stats > div{display:grid;gap:4px;padding:12px;border:1px solid var(--cbm-line);border-radius:12px;background:var(--cbm-panel)}
#cardbit-store .cbm-stats small{color:var(--cbm-muted)}
#cardbit-store .cbm-stats b{font-size:1.25rem;font-variant-numeric:tabular-nums}
#cardbit-store .cbm-sellrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px}
#cardbit-store .cbm-sellall{display:inline-flex;align-items:center;gap:8px}
#cardbit-store .cbm-sellall[hidden]{display:none}
#cardbit-store .cbm-price{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums}
#cardbit-store .cbm-price img,#cardbit-store .cbm-sell img{width:15px;height:15px}
#cardbit-store .cbm-sellnote{margin:0;color:var(--cbm-muted)}
#cardbit-store .cbm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
#cardbit-store .cbm-cell{display:grid;gap:6px;align-content:start}
#cardbit-store .cbm-card{appearance:none;cursor:pointer;display:grid;gap:8px;padding:8px;border:1px solid var(--cbm-line);border-radius:12px;background:var(--cbm-panel);color:inherit;text-align:left;font:inherit}
#cardbit-store .cbm-card:focus-visible{outline:2px solid var(--cbm-cy);outline-offset:2px}
#cardbit-store .cbm-art{display:block;aspect-ratio:5/7;border-radius:8px;overflow:hidden;background:#0b1418}
#cardbit-store .cbm-art img{width:100%;height:100%;object-fit:contain;display:block}
#cardbit-store .cbm-info{display:grid;gap:3px;min-width:0}
#cardbit-store .cbm-info b{font-size:.92rem;line-height:1.2}
#cardbit-store .cbm-info small{color:var(--cbm-muted);font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cardbit-store .cbm-sell{appearance:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:36px;padding:5px 9px;border-radius:999px;border:1px solid var(--cbm-cy);background:color-mix(in srgb,var(--cbm-cy) 10%,transparent);color:var(--cbm-cy);font-weight:800;font-size:13px;line-height:1;font-family:inherit;white-space:nowrap}
#cardbit-store .cbm-sell:disabled{cursor:default;border-color:var(--cbm-line);background:none;color:var(--cbm-muted)}
#cardbit-store .cbm-sell.is-sold{color:#9ff3b0;border-color:rgba(159,243,176,.4)}
#cardbit-store .cbm-acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
#cardbit-store .cbm-openall{margin:0 0 12px}
@media (max-width:520px){
  /* Phones: three across so 10 packs of pulls stay a short scroll. */
  #cardbit-store .cbm-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  #cardbit-store .cbm-card{padding:5px;gap:5px}
  #cardbit-store .cbm-info b{font-size:.8rem}
  #cardbit-store .cbm-info small{display:none}
  #cardbit-store .cbm-info .cbm-bits{font-size:.82rem}
  #cardbit-store .cbm-sell{min-height:34px;padding:4px 6px;font-size:12px}
  #cardbit-store .cbm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  #cardbit-store .cbm-stats > div:nth-child(3){grid-column:1 / -1}
  #cardbit-store .cbm-acts > *{flex:1 1 100%;justify-content:center}
  #cardbit-store .cbm-qty-label{flex-basis:100%}
  #cardbit-store .cbm-step{margin-left:auto}
}

/* Back-to-back: Next Pack / Skip All stay on screen while the pulls scroll inside the results (phones especially). */
.cbd.cbd-seq .cbd-summary > .cbd-acts{position:sticky;bottom:-18px;z-index:3;width:calc(100% + 28px);margin:0 -14px -18px;padding:10px 14px 14px;background:linear-gradient(to top,rgba(2,8,10,.98) 70%,rgba(2,8,10,0));justify-content:center}

/* Combined summary on the shared product card (Trevor, Nov 30): tier-outlined tiles of equal height, Sell Back pinned to
   the bottom, and a card width (--cbm-cw, set by fitGrid) that keeps the buttons on screen when the cards can fit. */
#cardbit-store .cbm-summary h1{font-size:clamp(28px,4.4vh,52px);margin:2px 0 10px}
#cardbit-store .cbm-summary .cbm-stats{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin-bottom:12px}
#cardbit-store .cbm-summary .cbm-stats>div{padding:8px 12px;gap:2px}
#cardbit-store .cbm-summary .cbm-stats b{font-size:1.1rem}
#cardbit-store .cbm-pgrid{grid-template-columns:repeat(auto-fill,minmax(min(var(--cbm-cw,200px),100%),var(--cbm-cw,200px)));align-items:stretch;gap:12px}
#cardbit-store .sv-tile.cbm-tile{border:2px solid var(--pc-tier,var(--pc-line));box-shadow:0 0 0 1px color-mix(in srgb,var(--pc-tier,transparent) 20%,transparent),0 8px 24px color-mix(in srgb,var(--pc-tier,transparent) 14%,transparent)}
#cardbit-store .sv-tile.cbm-tile>.cb-pcard{padding-bottom:6px}
#cardbit-store .sv-tile.cbm-tile>.cbm-sell{margin:auto 10px 10px;width:calc(100% - 20px);border-radius:10px;font-size:13px;min-height:38px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:6px;row-gap:2px}
#cardbit-store .sv-tile.cbm-tile>.cbm-sell>span{white-space:nowrap}
#cardbit-store .sv-tile.cbm-tile>.cbm-sell>b{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
#cardbit-store .sv-tile.cbm-tile>.cbm-sell img{width:15px;height:15px}
#cardbit-store .cbm-summary .cbm-acts{margin-top:14px}
@media (max-width:520px){
  #cardbit-store .cbm-pgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #cardbit-store .sv-tile.cbm-tile>.cbm-sell{margin:auto 7px 7px;width:calc(100% - 14px);font-size:12.5px}
}
@media (max-width:520px){
  #cardbit-store .cbm-summary h1{font-size:26px;margin-bottom:8px}
  #cardbit-store .cbm-summary .cbm-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #cardbit-store .cbm-summary .cbm-stats>div{padding:6px 8px}
  #cardbit-store .cbm-summary .cbm-stats small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #cardbit-store .cbm-summary .cbm-stats b{font-size:.98rem}
}
/* First Pack Guarantee line under the pack total (Dec 5 2026) */
#cardbit-store .cbm-guarantee { margin:8px 0 0; padding:8px 10px; border-radius:10px; background:#0d2324; border:1px solid #1f6f73; color:#bfd6d7; font-size:13px; line-height:1.4; }
#cardbit-store .cbm-guarantee b { color:#5ff0f2; margin-right:4px; }
#cardbit-store .cbm-guarantee a { color:#bfd6d7; }
/* Free Welcome Pack banner (Dec 5 2026, preview) */
#cardbit-store .cbw-pack { position:relative; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 20px; max-width:1180px; margin:16px auto 0; padding:16px 20px; border-radius:16px; background:linear-gradient(120deg,#0d2a2c,#122437); border:1px solid #1f6f73; }
#cardbit-store .cbw-pack-copy { flex:1 1 320px; }
#cardbit-store .cbw-pack-kicker { margin:0 0 4px; color:#5ff0f2; font:800 12px/1 'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; letter-spacing:.08em; text-transform:uppercase; }
#cardbit-store .cbw-pack h2 { margin:0 0 6px; font:800 22px/1.15 'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; }
#cardbit-store .cbw-pack p { margin:0; color:#bfd6d7; font-size:14px; line-height:1.45; }
#cardbit-store .cbw-pack-err:empty { display:none; }
#cardbit-store .cbw-pack-err { margin-top:6px !important; color:#ff9aa5 !important; }
@media (max-width:700px) { #cardbit-store .cbw-pack { margin:12px 12px 0; padding:14px; } #cardbit-store .cbw-pack .cb-primary { width:100%; } }
/* Spin For Your Free Pack (Dec 5 2026): same look as the free pack ad (reel, cyan frame and pointers, gold FREE PACK). */
html.cbws-lock { overflow:hidden; }
dialog.cbws { --cbws-c:#00e6e1; position:fixed; inset:0; width:min(920px,100vw); max-width:100vw; height:min(760px,100dvh); max-height:100dvh; margin:auto; padding:22px 20px 18px; border:0; border-radius:22px; color:#fff; overflow:hidden; display:flex; flex-direction:column; align-items:center; text-align:center;
  background:radial-gradient(ellipse 70% 48% at 50% 52%,color-mix(in srgb,var(--cbws-c) 42%,transparent),color-mix(in srgb,var(--cbws-c) 10%,transparent) 55%,transparent 80%),linear-gradient(180deg,#0b1316,#070b0e 50%,#05080a); transition:background .5s; box-shadow:0 30px 120px rgba(0,0,0,.7); }
dialog.cbws::backdrop { background:rgba(2,6,8,.82); backdrop-filter:blur(4px); }
.cbws-x { position:absolute; top:10px; right:12px; z-index:5; width:40px; height:40px; border:0; border-radius:50%; background:rgba(255,255,255,.08); color:#cfe3e4; font-size:26px; line-height:1; cursor:pointer; }
.cbws-x:focus-visible, .cbws .cb-primary:focus-visible, .cbws .cb-secondary:focus-visible { outline:3px solid #00e6e1; outline-offset:3px; }
.cbws-kicker { margin:4px 0 0; color:#5ff0f2; font:800 12px/1 'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; letter-spacing:.14em; text-transform:uppercase; }
.cbws-h { margin:6px 0 0; display:flex; flex-direction:column; align-items:center; font-family:'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; font-weight:800; line-height:.95; letter-spacing:-.02em; }
.cbws-h span { font-size:clamp(24px,4.4vw,40px); color:#fff; text-shadow:0 6px 30px rgba(0,0,0,.7); }
.cbws-h b { font-size:clamp(46px,9vw,84px); text-transform:uppercase; background:linear-gradient(180deg,#fff2c9 0%,#ffcf6e 45%,#ff9f2e 100%); -webkit-background-clip:text; background-clip:text; color:transparent; filter:drop-shadow(0 4px 0 #7a3f00) drop-shadow(0 12px 30px rgba(255,150,40,.55)); }
.cbws-stage { position:relative; flex:1 1 auto; width:100%; min-height:220px; margin:4px 0 0; }
.cbws-grid { position:absolute; inset:-10%; background-image:linear-gradient(rgba(120,240,235,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(120,240,235,.07) 1px,transparent 1px); background-size:44px 44px; -webkit-mask-image:radial-gradient(ellipse 60% 50% at 50% 55%,#000 25%,transparent 78%); mask-image:radial-gradient(ellipse 60% 50% at 50% 55%,#000 25%,transparent 78%); }
.cbws-rays { position:absolute; left:50%; top:50%; width:1400px; height:1400px; margin:-700px 0 0 -700px; opacity:0; background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--cbws-c) 60%,#ffdc82) 0deg 6deg,transparent 6deg 18deg); -webkit-mask-image:radial-gradient(circle,#000 6%,transparent 42%); mask-image:radial-gradient(circle,#000 6%,transparent 42%); transition:opacity .5s; }
.cbws.is-land .cbws-rays { opacity:.4; animation:cbwsRays 12s linear infinite; }
@keyframes cbwsRays { to { transform:rotate(360deg); } }
.cbws-win { position:absolute; inset:0; overflow:hidden; -webkit-mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent); mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent); }
.cbws-strip { position:absolute; inset:0; }
.cbws-it { position:absolute; left:0; top:0; transform-origin:50% 50%; will-change:transform,opacity,filter; }
.cbws-it img { width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 18px 28px rgba(0,0,0,.6)); }
.cbws.is-land .cbws-it.is-win { animation:cbwsPop .55s cubic-bezier(.3,1.7,.5,1); }
.cbws.is-land .cbws-it.is-win img { filter:drop-shadow(0 18px 28px rgba(0,0,0,.6)) drop-shadow(0 0 26px var(--cbws-c)); }
@keyframes cbwsPop { 0% { scale:1; } 45% { scale:1.1; } 100% { scale:1.06; } }
.cbws.is-land .cbws-it.is-win { scale:1.06; }
.cbws-frame { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); border-radius:20px; border:5px solid #00e6e1; box-shadow:0 0 34px #00e6e1,inset 0 0 26px rgba(0,230,225,.4); pointer-events:none; transition:border-color .25s,box-shadow .25s,opacity .3s; }
.cbws-tri { position:absolute; left:50%; width:0; height:0; margin-left:-18px; border-left:18px solid transparent; border-right:18px solid transparent; pointer-events:none; }
.cbws-tri-t { top:calc(50% - var(--cbws-ph,300px) / 2 - 40px); border-top:22px solid #00e6e1; }
.cbws-tri-b { top:calc(50% + var(--cbws-ph,300px) / 2 + 18px); border-bottom:22px solid #00e6e1; }
.cbws.is-land .cbws-frame { border-color:var(--cbws-c); box-shadow:0 0 44px var(--cbws-c),inset 0 0 30px color-mix(in srgb,var(--cbws-c) 45%,transparent); animation:cbwsPulse .6s ease-out; }
.cbws.is-land .cbws-tri-t { border-top-color:var(--cbws-c); }
.cbws.is-land .cbws-tri-b { border-bottom-color:var(--cbws-c); }
@keyframes cbwsPulse { 0% { transform:translate(-50%,-50%) scale(1); } 30% { transform:translate(-50%,-50%) scale(1.07); } 100% { transform:translate(-50%,-50%) scale(1); } }
.cbws-fx { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.cbws-name { margin:2px 0 0; min-height:38px; }
.cbws-name span { display:inline-block; font:800 clamp(15px,2.4vw,20px)/1 'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; letter-spacing:.1em; text-transform:uppercase; padding:8px 18px; border-radius:999px; border:3px solid currentColor; background:rgba(0,0,0,.5); color:#00e6e1; }
.cbws-name span:empty { visibility:hidden; }
.cbws.is-land .cbws-name span { animation:cbwsPop .5s cubic-bezier(.3,1.7,.5,1); }
.cbws-got { margin:8px 0 0; min-height:1.3em; font:800 clamp(18px,3vw,24px)/1.2 'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; }
.cbws-got:empty { display:none; }
.cbws-err { margin:6px 0 0; color:#ff9aa5; font-size:14px; }
.cbws-err:empty { display:none; }
.cbws-acts { display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:10px; width:min(360px,100%); }
.cbws-acts .cb-primary { width:100%; font-size:20px; padding:16px 24px; border-radius:999px; background:linear-gradient(180deg,#ffd27e,#ffb65c); color:#2a1600; border:0; box-shadow:0 0 34px rgba(255,182,92,.55),0 6px 0 #a55f10; }
.cbws-acts .cb-primary:disabled { opacity:.75; }
.cbws-acts .cb-secondary { width:100%; }
.cbws-acts [hidden] { display:none !important; }
.cbws-fine { margin:10px 0 0; max-width:620px; color:#8ea2a5; font-size:11.5px; line-height:1.35; }
@media (max-width:700px) { dialog.cbws { width:100vw; height:100dvh; border-radius:0; padding:18px 14px 14px; } .cbws-stage { min-height:200px; } }
@media (prefers-reduced-motion:reduce) { .cbws.is-land .cbws-rays, .cbws.is-land .cbws-it.is-win, .cbws.is-land .cbws-frame, .cbws.is-land .cbws-name span { animation:none; } }
.cbws-ts { margin-top:6px; min-height:0; } .cbws-ts:empty { display:none; }
/* Dec 5 2026 fix: the big light rays and grid behind the reel spread past the stage and sat on top of the Spin
   button, so taps hit them instead. Decorations never take taps; text and buttons sit above them. */
.cbws-grid, .cbws-rays, .cbws-win, .cbws-it { pointer-events:none; }
.cbws-name, .cbws-got, .cbws-err, .cbws-ts, .cbws-acts, .cbws-fine { position:relative; z-index:3; }
/* Dec 5 2026 spacing pass (Trevor: nothing may touch or overlap). The window grows to fit its content up to the
   screen height and scrolls if it must; every block keeps a clear gap; the reel stage has a set height with room
   for the pointers above and below the frame. */
dialog.cbws { height:auto; max-height:100dvh; overflow-x:hidden; overflow-y:auto; gap:0; }
.cbws-stage { flex:0 0 auto; height:clamp(250px,44vh,400px); min-height:0; margin:22px 0 0; }
.cbws-name { margin:26px 0 0; min-height:44px; }
.cbws-got { margin:14px 0 0; }
.cbws-err { margin:12px 0 0; }
.cbws-ts { margin:12px 0 0; }
.cbws-ts:empty { display:none; }
.cbws-acts { margin-top:20px; gap:12px; }
.cbws-fine { margin:22px 0 4px; line-height:1.5; }
@media (max-width:700px) { dialog.cbws { height:100dvh; } .cbws-stage { height:clamp(210px,38vh,340px); margin-top:18px; } .cbws-name { margin-top:22px; } }
@media (max-height:700px) { .cbws-stage { height:clamp(200px,36vh,300px); } }
dialog.cbws { overflow:hidden; }
dialog.cbws { box-sizing:border-box; }
@media (max-height:700px) {
  .cbws-h b { font-size:clamp(40px,7.5vh,64px); }
  .cbws-h span { font-size:clamp(20px,4vh,30px); }
  .cbws-stage { height:clamp(190px,34vh,280px); margin-top:16px; }
  .cbws-name { margin-top:18px; }
  .cbws-acts { margin-top:14px; }
  .cbws-acts .cb-primary { padding:13px 24px; font-size:18px; }
  .cbws-fine { margin-top:14px; }
}
/* Landing pop goes on the picture, not the slot: a scale on the slot also scaled its position and pushed the
   winning pack off the frame's center (Trevor's "off center"). */
.cbws.is-land .cbws-it.is-win { scale:none; animation:none; }
.cbws-it img { transform-origin:50% 50%; }
.cbws.is-land .cbws-it.is-win img { scale:1.06; animation:cbwsPop .55s cubic-bezier(.3,1.7,.5,1); }
/* Room around the main button's glow ring so nothing touches it. */
.cbws-acts { padding-bottom:6px; }
.cbws-fine { margin-top:28px; }
@media (max-height:700px) { .cbws-fine { margin-top:20px; } }
/* Same spacing with the store's own text and button rules in play (they carry an id, so restate with it). */
#cardbit-store dialog.cbws .cbws-name { margin:26px 0 0; }
#cardbit-store dialog.cbws .cbws-got { margin:18px 0 0; }
#cardbit-store dialog.cbws .cbws-err { margin:12px 0 0; }
#cardbit-store dialog.cbws .cbws-acts { margin:22px 0 0; padding:6px 0; gap:14px; }
#cardbit-store dialog.cbws .cbws-acts > button { margin:0; }
#cardbit-store dialog.cbws .cbws-fine { margin:26px 0 4px; }
@media (max-height:700px) {
  #cardbit-store dialog.cbws .cbws-name { margin-top:18px; }
  #cardbit-store dialog.cbws .cbws-got { margin-top:12px; }
  #cardbit-store dialog.cbws .cbws-acts { margin-top:14px; }
  #cardbit-store dialog.cbws .cbws-fine { margin-top:18px; }
}
/* Final layout (Dec 5 2026): the window has a fixed height (screen height on phones) and the reel stage takes
   whatever room is left, so text and buttons keep their gaps and never overlap at any screen size. */
dialog.cbws { height:min(800px,100dvh); }
#cardbit-store dialog.cbws .cbws-stage, dialog.cbws .cbws-stage { flex:1 1 0; height:auto; min-height:170px; margin:18px 0 0; }
@media (max-width:700px) { dialog.cbws { height:100dvh; } }
/* Pack cards: the Cardbits price pill is the Buy button (Trevor, Dec 5 2026): "Buy" on the left, cyan, same spot and
   size class as the old pill so the card doesn't grow. The title link keeps the old row's layout. */
#cardbit-store .cb-edition-buy { display:flex; align-items:center; gap:10px; min-width:0; }
#cardbit-store .cb-edition-buy .cb-edition-link { display:block; flex:1 1 auto; min-width:0; color:inherit; text-decoration:none; }
#cardbit-store .cb-edition-buy .cb-tile-head { margin:0; }
#cardbit-store .cb-edition-buy .cb-tile-head h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price { flex:none; margin:0 0 0 auto; display:inline-flex; align-items:center; gap:7px; padding:6px 12px 6px 13px; border-radius:999px; border:1px solid #00e6e1; background:#00e6e1; color:#04201f; font:800 15px/1 'Cardbit Outfit','Cardbit Outfit Fallback',system-ui,sans-serif; cursor:pointer; white-space:nowrap; box-shadow:0 0 14px rgba(0,230,225,.35); transition:filter .15s, transform .15s; }
#cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price .cb-reference, #cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price * { color:inherit; }
#cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price .cb-tile-buy-word { font-weight:800; letter-spacing:.01em; padding-right:7px; border-right:1px solid rgba(4,32,31,.35); }
#cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price:hover:not(:disabled) { filter:brightness(1.08); transform:translateY(-1px); }
#cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price:focus-visible { outline:3px solid #fff; outline-offset:2px; }
#cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price:disabled { background:#1b2a2d; border-color:#33474b; color:#8ea2a5; box-shadow:none; cursor:not-allowed; }
@media (max-width:600px) {
  #cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price { padding:5px 10px 5px 11px; font-size:14px; gap:6px; }
  #cardbit-store .cb-edition-name button.cb-tile-buy.cb-tile-price .cb-tile-buy-word { padding-right:6px; }
}
/* One row everywhere (Trevor, Dec 5 2026): pack name, then the Buy pill on the right. The arrow goes, and on narrow
   cards the word "Edition" drops so the name fits beside the pill. */
#cardbit-store .cb-pack-tile:has(.cb-edition-buy) { container-type:inline-size; }
#cardbit-store .cb-pack-tile .cb-edition-name.cb-edition-buy { flex-wrap:nowrap !important; }
#cardbit-store .cb-edition-buy .cb-edition-link { flex:1 1 auto; min-width:0; }
#cardbit-store .cb-edition-buy .cb-tile-head svg { display:none; }
@container (max-width:420px) { #cardbit-store .cb-edition-buy .cb-ed-word { display:none; } }
@media (max-width:600px) { #cardbit-store .cb-edition-buy .cb-ed-word { display:none; } }
/* Results: the Free Welcome Pack note is a compact chip, not a full-width banner (Trevor, Dec 5 2026). */
.cbpr-welcome { flex:0 1 auto !important; grid-column:auto !important; padding:8px 14px !important; gap:8px 12px !important; }
.cbpr-welcome > div { flex:0 1 auto !important; display:flex; align-items:baseline; gap:8px; }
.cbpr-welcome b { font-size:16px !important; white-space:nowrap; }
.cbpr-welcome small { margin:0 !important; white-space:nowrap; }
.cbpr-welcome .cbpr-welcome-note { white-space:normal; }
/* iPhone Safari (Dec 5 2026: the first spin crashed the tab): no permanent GPU layers on every pack in the strip
   (only the few on screen are drawn), smaller light rays, no blurred backdrop, lighter pack shadows on phones. */
.cbws-it { will-change:auto; }
.cbws-rays { width:1000px; height:1000px; margin:-500px 0 0 -500px; will-change:transform; }
@media (pointer:coarse), (max-width:700px) {
  .cbws-rays { width:640px; height:640px; margin:-320px 0 0 -320px; }
  dialog.cbws::backdrop { backdrop-filter:none; background:rgba(2,6,8,.92); }
  .cbws-it img { filter:drop-shadow(0 10px 14px rgba(0,0,0,.55)); }
  .cbws.is-land .cbws-it.is-win img { filter:drop-shadow(0 10px 14px rgba(0,0,0,.55)) drop-shadow(0 0 16px var(--cbws-c)); }
}

/* Layout-shift pass, round 2 (Dec 5 2026): "You Got A …" (or an error) appearing, and Not Now hiding while it spins,
   changed the window's height, so the reel and buttons jumped the moment it landed. Both lines share one reserved
   slot, and hidden buttons keep their space. */
.cbws-msg { display:grid; width:100%; margin:14px 0 0; position:relative; z-index:3; }
.cbws-msg > .cbws-got, .cbws-msg > .cbws-err { grid-area:1/1; margin:0; align-self:center; }
.cbws-msg > .cbws-got { min-height:1.2em; }
.cbws-msg > .cbws-got:empty, .cbws-msg > .cbws-err:empty { display:block; visibility:hidden; }
.cbws-acts [hidden] { display:block !important; visibility:hidden; pointer-events:none; }
/* Free pack sign-up step (Dec 5 2026): email news + text alerts before the spin. */
dialog.cbws.is-gate { overflow-y:auto; }
.cbws.is-gate .cbws-stage { height:clamp(150px,24vh,230px); margin-top:12px; }
.cbws.is-gate .cbws-name { margin-top:12px; }
.cbws-gate { position:relative; z-index:3; width:min(520px,100%); margin:12px 0 0; padding:14px 14px 12px; border:1px solid rgba(95,240,242,.28); border-radius:16px; background:rgba(4,20,24,.72); text-align:left; }
.cbws-gate-h { margin:0 0 16px; text-align:center; font:800 17px/1.2 'Cardbit Outfit',system-ui,sans-serif; color:#fff; }
.cbws-opt { display:block; margin:0 0 10px; }
.cbws-opt label, label.cbws-opt { display:flex; gap:10px; align-items:flex-start; cursor:pointer; color:#d7e6e7; font-size:14px; line-height:1.35; }
.cbws-opt input[type=checkbox] { flex:0 0 auto; width:22px; height:22px; margin:1px 0 0; accent-color:#00e6e1; }
.cbws-opt b { display:block; color:#fff; font:800 15px/1.2 'Cardbit Outfit',system-ui,sans-serif; margin-bottom:2px; }
.cbws-opt input[type=tel] { display:block; box-sizing:border-box; width:100%; margin:8px 0 0; padding:12px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.22); background:rgba(0,0,0,.4); color:#fff; font-size:16px; }
.cbws-opt input:focus-visible { outline:3px solid #00e6e1; outline-offset:2px; }
.cbws-legal { margin:8px 0 0; color:#8ea2a5; font-size:11.5px; line-height:1.4; }
.cbws-legal a { color:#9fdfe0; }
.cbws-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
@media (max-width:700px) { .cbws.is-gate .cbws-stage { height:clamp(120px,20vh,190px); } .cbws.is-gate .cbws-h b { font-size:clamp(40px,12vw,60px); } }
/* Free pack banner X (Dec 5 2026) */
#cardbit-store .cbw-pack { padding-right:52px; }
#cardbit-store .cbw-pack-x { position:absolute; top:8px; right:8px; width:36px; height:36px; border:0; border-radius:50%; background:rgba(255,255,255,.07); color:#9fb8ba; font-size:22px; line-height:1; cursor:pointer; }
#cardbit-store .cbw-pack-x:hover { background:rgba(255,255,255,.14); color:#fff; }
#cardbit-store .cbw-pack-x:focus-visible { outline:3px solid #00e6e1; outline-offset:2px; }
#cardbit-store .cbw-pack-gone { margin:0; color:#d7e6e7; font-size:14px; }
@media (max-width:700px) { #cardbit-store .cbw-pack { padding-right:14px; } #cardbit-store .cbw-pack-copy { padding-right:34px; } }

/* Trevor, Dec 5 2026 8:11 PM CT: the Cloudflare check floats over the packs instead of taking a row in the window, so
   nothing moves when it appears or goes away. It sits on the reel's centre (--cbws-mid, set by placeReel). The error
   line has room for two lines, so a refusal doesn't grow the window either. */
.cbws-ts, .cbws.is-gate .cbws-ts { position:absolute; left:50%; top:var(--cbws-mid,45%); transform:translate(-50%,-50%); z-index:8; margin:0; max-width:calc(100% - 24px); }
.cbws-msg { min-height:2.9em; align-items:center; }
.cbws-msg > .cbws-err { font-size:15px; line-height:1.4; }
