/* DrawPack: Soccer Packs. Loaded after arcade.css and games-*.css.

   0 Shell bridge   1 Layout   2 Pack materials   3 Pack shop   4 Stage (the stadium)   5 The rip
   6 The walkout   7 The result   8 The player card   9 The club   10 Small screens and motion

   Everything hangs off .sp (the game body), so these rules beat the base "soccer packs" block in arcade.css,
   which this file is built on (it must stay there: .flag, .sp-val, .sp-hint, the keyframes and more live in it).
   The stage is lit in --tc: the game's green at rest, the tier colour of the best player once a pack is open.
   The shop rows are flat panels of the shell and the club sits straight on the page; the stadium is the game's own night. */

/* ---------- 0. shell bridge: the few tokens this game was drawn with, mapped to the Night Arcade tokens (src/game.html).
   They are set on this game's page only. --gc is the game's colour: the first colour of its world. ---------- */
:root .view[data-view="soccer"] { --gc: var(--g1); --hair: var(--line); --hair-2: var(--line-2); --dim: color-mix(in srgb, var(--muted) 80%, var(--bg));
  --r-2: var(--r-sm); --r-3: var(--r-lg); --sh-1: var(--shadow); --spring: var(--ease-pop); --t-1: var(--t-press); --t-2: var(--t-ui); --t-3: var(--t-panel); }
@keyframes uiIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 1. layout ---------- */
.sp { display: grid; gap: var(--s6, 32px); min-width: 0;
  --fc-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath d='M50 0C56 3.5 66 6 78 5.5L93 4.5Q100 4 100 11V118Q100 126 92 128.5L57 138.5Q50 140.5 43 138.5L8 128.5Q0 126 0 118V11Q0 4 7 4.5L22 5.5C34 6 44 3.5 50 0Z'/%3E%3C/svg%3E");
  --zig-top: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 9px 100% round no-repeat;
  --zig-bot: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 9px 100% round no-repeat;
  --zig-both: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 9px 51% round no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 9px 51% round no-repeat; }
/* the stage comes first and takes the room; the pack shop is the 320px column on its right, or under it on a narrow screen */
.sp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4, 16px); align-items: start; min-width: 0; }
.sp-shop { min-width: 0; }
.sp .sp-packs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2, 8px); }
@media (min-width: 861px) {
  .sp-top { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ---------- 2. pack materials: brushed bronze, chrome, polished gold, midnight violet ---------- */
.pk-bronze { --pk1: #f8d6b3; --pk2: #cb854b; --pk3: #7d4620; --pk-ink: #331803; --pk-sh: #3b1d07e0; --pk-hi: #ffe9d2; --pk-tex: repeating-linear-gradient(90deg, #ffffff17 0 1px, transparent 1px 3px); }
.pk-silver { --pk1: #fcfdff; --pk2: #aab4c6; --pk3: #515b6e; --pk-ink: #1a2130; --pk-sh: #1f2738e0; --pk-hi: #ffffff; --pk-tex: repeating-linear-gradient(0deg, #ffffff24 0 1px, transparent 1px 4px); }
.pk-gold { --pk1: #fff5c4; --pk2: #f0b92d; --pk3: #8c5a00; --pk-ink: #3a2500; --pk-sh: #3f2900e0; --pk-hi: #fffbe3; --pk-tex: repeating-linear-gradient(45deg, #ffffff26 0 2px, transparent 2px 9px); }
.pk-champ { --pk1: #7a45e6; --pk2: #2c1070; --pk3: #0b0424; --pk-ink: #ffd772; --pk-sh: #0d0527eb; --pk-hi: #ffd772; --pk-tex: radial-gradient(#ffffff40 .8px, transparent 1.3px) 0 0 / 11px 11px; }
.pk-bronze, .pk-silver, .pk-gold, .pk-champ {
  --foil: linear-gradient(90deg, #00000038, transparent 13%, transparent 87%, #00000042), linear-gradient(104deg, transparent 16%, #ffffff5e 29%, transparent 41%, transparent 60%, #ffffff2b 68%, transparent 78%), var(--pk-tex), linear-gradient(165deg, var(--pk1), var(--pk2) 46%, var(--pk3)); }
.spk-crest { position: relative; display: block; width: 52%; height: auto; }
.spk-crest .c-sh, .spk-crest .c-in { fill: var(--pk-sh); }
.spk-crest .c-ln { fill: none; stroke: var(--pk-hi); stroke-width: 1.2; opacity: .5; }
.spk-crest .c-hi { fill: var(--pk-hi); }
.spk-crest .c-sp { fill: none; stroke: var(--pk-sh); stroke-width: 1.3; }
.spk-crest .c-st { fill: none; stroke: var(--pk-hi); stroke-width: 2.4; stroke-linecap: round; }
.sp .sp-art span, .sp .sp-tear-body span { position: relative; writing-mode: horizontal-tb; transform: none; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; line-height: 1; color: var(--pk-ink); padding-left: .1em; }
.sp-art em, .sp-tear-body em { position: relative; font-style: normal; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; line-height: 1; color: var(--pk-ink); opacity: .72; }
.spk-shine { position: absolute; inset: -10% -70%; pointer-events: none; background: linear-gradient(104deg, transparent 43%, #ffffff8c 50%, transparent 57%); }
.sp-coin { display: inline-block; width: 1em; height: 1em; flex: none; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff6cf, var(--coin) 46%, #b96a00); box-shadow: inset 0 -1px 2px #7a4300aa, inset 0 1px 1px #fffc; }

/* ---------- 3. pack shop: one control surface. A row per pack (the picked one on the accent border), one Open button, one Odds list ---------- */
.sp .sp-pack { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3, 12px); width: 100%; min-width: 0; padding: var(--s1, 4px) var(--s3, 12px) var(--s1, 4px) var(--s1, 4px); border-radius: var(--r-sm, 8px); text-align: left; color: var(--fg); font: inherit; cursor: pointer;
  background: var(--panel-2); border: 1px solid transparent; box-shadow: none; transition: border-color var(--t-2) var(--ease), opacity var(--t-2) var(--ease); }
.sp .sp-pack.on { border-color: var(--g1); }
.sp .sp-pack:disabled { cursor: default; }
.sp .sp-pack:disabled:not(.on) { opacity: .5; }
.sp .sp-art { position: relative; width: 34px; height: 48px; border-radius: 0; overflow: hidden; display: grid; place-items: center; align-content: center; background: var(--foil); box-shadow: none; -webkit-mask: var(--zig-both); mask: var(--zig-both);
  transform: perspective(520px) rotateY(calc(var(--ry, 0) * 36deg)) rotateX(calc(var(--rx, 0) * 24deg)); transition: transform .2s var(--ease); }
.sp .sp-art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #00000024 0 1.5px, #ffffff24 1.5px 3px) top / 100% 5px no-repeat, repeating-linear-gradient(90deg, #00000024 0 1.5px, #ffffff24 1.5px 3px) bottom / 100% 5px no-repeat; }
.sp .sp-art span, .sp-art em { display: none; } /* the row's label names the pack; the big pack on the stage carries the printed name */
.sp .sp-art .spk-crest { width: 64%; }
.sp-art .spk-shine { opacity: 0; transform: translateX(calc(var(--ry, 0) * 90%)); transition: opacity var(--t-2) var(--ease); }
.sp-pack:hover .spk-shine { opacity: 1; }
.sp .sp-pname { justify-self: start; min-width: 0; font: 600 var(--fs-body, 14px)/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-price { display: inline-flex; align-items: center; gap: 5px; font: 500 var(--fs-meta, 12px) var(--font-mono); color: var(--fg-2); white-space: nowrap; }
.sp #sp-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.sp-odds { min-width: 0; }
.sp .sp-odds > summary { padding: 0; font-size: var(--fs-meta, 12px); color: var(--muted); }
.sp-oddsl { list-style: none; margin: var(--s1, 4px) 0 0; padding: 0; display: grid; gap: 2px; font-size: var(--fs-meta, 12px); color: var(--fg-2); }
.sp-oddsl li { display: flex; justify-content: space-between; gap: var(--s3, 12px); }
.sp-oddsl b { font: 500 var(--fs-meta, 12px) var(--font-mono); color: var(--fg); }

/* ---------- 4. the stage: a stadium at night ---------- */
.sp .sp-board { position: relative; display: grid; padding: 0; min-width: 0; overflow: hidden; background: #05070c; border-color: color-mix(in srgb, var(--gc) 18%, var(--hair)); }
.sp-decor { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sp-decor > i { position: absolute; display: block; }
/* the stand: rows of tiny lights that fade into the dark, and a line of boards along the pitch */
.sp-stand { inset: 0 0 38% 0; z-index: 1; background: linear-gradient(180deg, #05070c, #0a0f19); }
.sp-stand::before { content: ""; position: absolute; inset: 0; background: radial-gradient(#ffffff26 1px, transparent 1.7px) 0 0 / 9px 8px, radial-gradient(#ffffff14 1px, transparent 1.7px) 4px 4px / 9px 8px, repeating-linear-gradient(180deg, transparent 0 31px, #ffffff0a 31px 32px); -webkit-mask: linear-gradient(180deg, transparent 6%, #000 86%); mask: linear-gradient(180deg, transparent 6%, #000 86%); }
.sp-stand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--gc) 20%, #0a0f19) 0 92px, #070a10 92px 96px); box-shadow: 0 -1px 0 #ffffff12; }
/* the pitch: mown stripes laid flat and seen from the touchline */
.sp-pitch { left: -45%; right: -45%; bottom: 0; height: 116%; z-index: 0; transform-origin: 50% 100%; transform: perspective(700px) rotateX(55deg); background: repeating-linear-gradient(90deg, #0f3524 0 5%, #0b2a1c 5% 10%); }
.sp-pitch::before { content: ""; position: absolute; left: 50%; top: 80%; width: 24%; aspect-ratio: 1; margin: -12% 0 0 -12%; border-radius: 50%; border: 3px solid #ffffff2b; }
.sp-pitch::after { content: ""; position: absolute; left: 0; right: 0; top: 80%; height: 3px; background: #ffffff24; }
.sp-decor::after { content: ""; position: absolute; inset: 0; z-index: 3; background: radial-gradient(74% 62% at 50% 64%, transparent, #05070ccc), linear-gradient(180deg, #05070c 2%, transparent 34%); }
.sp-rig { top: 18px; width: 74px; height: 36px; z-index: 4; border-radius: 6px; background: radial-gradient(circle, #fff 0 1.7px, #fff0 2.5px) 2px 3px / 10px 10px, #121824; box-shadow: 0 0 0 1px #ffffff24, 0 0 46px 8px #ffffff26; }
.sp-rig.l { left: 22px; transform: rotate(-11deg); }
.sp-rig.r { right: 22px; transform: rotate(11deg); }
.sp .sp-stage { --tc: var(--gc); position: relative; z-index: 1; container-type: inline-size; min-height: 600px; display: grid; place-items: center; align-content: center; gap: 14px; padding: 34px 16px 46px; overflow: hidden; background: none; text-align: center; }
.sp .sp-stage.sp-live { cursor: pointer; }
/* floodlight beams from the two rigs, a pool of light on the grass and one spotlight from above */
.sp .sp-beams { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; opacity: .55; animation: none;
  background: conic-gradient(from 116deg at 6% -4%, transparent 0 3deg, color-mix(in srgb, var(--tc) 26%, transparent) 9deg, transparent 15deg 23deg, color-mix(in srgb, var(--tc) 14%, transparent) 28deg, transparent 33deg),
    conic-gradient(from 211deg at 94% -4%, transparent 0 3deg, color-mix(in srgb, var(--tc) 14%, transparent) 8deg, transparent 13deg 21deg, color-mix(in srgb, var(--tc) 26%, transparent) 27deg, transparent 33deg); }
.sp-beams.dim { --tc: var(--gc); opacity: .34; }
.sp-beams::before { content: ""; position: absolute; left: 50%; bottom: 4%; width: min(620px, 96%); height: 30%; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 30%, transparent), transparent); }
.sp-beams::after { content: ""; position: absolute; left: 50%; top: -6%; width: min(460px, 86%); height: 92%; margin-left: max(-230px, -43%); transform-origin: 50% 0; opacity: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 44%, transparent), transparent 94%); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.sp-live .sp-beams { opacity: .8; animation: spBeamIn .9s var(--ease) both; }
.sp-live .sp-beams::after { opacity: .3; }
.sp-live.sp-b3 .sp-beams::after, .sp-live.sp-b4 .sp-beams::after, .sp-live.sp-b5 .sp-beams::after { opacity: .75; animation: spSpot .6s var(--ease) both; }
.sp-live.sp-b4 .sp-beams, .sp-live.sp-b5 .sp-beams { opacity: 1; }
.sp-result .sp-beams { opacity: .6; }
.sp-result.sp-b3 .sp-beams { opacity: .8; }
.sp-result.sp-b4 .sp-beams, .sp-result.sp-b5 .sp-beams { opacity: 1; }
.sp-result .sp-beams::after { opacity: .2; }
.sp-result.sp-b3 .sp-beams::after, .sp-result.sp-b4 .sp-beams::after, .sp-result.sp-b5 .sp-beams::after { opacity: .5; }
/* elite and legend pulls get a second pair of lights from the corners of the pitch */
.sp-stage.sp-b4::before, .sp-stage.sp-b5::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; animation: spBeamIn .9s var(--ease) both;
  background: conic-gradient(from 22deg at -2% 104%, transparent 0 3deg, color-mix(in srgb, var(--tc) 24%, transparent) 9deg, transparent 15deg), conic-gradient(from 323deg at 102% 104%, transparent 0 3deg, color-mix(in srgb, var(--tc) 24%, transparent) 9deg, transparent 15deg); }
@keyframes spBeamIn { from { opacity: .1; transform: scale(1.1); } }
@keyframes spSpot { from { opacity: 0; transform: scaleY(.3); } }
.sp .sp-stage.sp-flash::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(62% 62% at 50% 50%, #fff, var(--tc) 32%, transparent 74%); animation: spFlash .55s ease-out forwards; }
/* nothing on the stage yet: an empty spot where the pack will stand */
.sp .sp-idle { display: grid; gap: 8px; justify-items: center; max-width: 360px; color: var(--muted); }
.sp-spot { position: relative; width: 112px; height: 156px; margin-bottom: 20px; display: grid; place-items: center; border-radius: 14px; border: 1.5px dashed #ffffff40; background: linear-gradient(180deg, #ffffff0f, #ffffff03); }
.sp-spot::after { content: ""; position: absolute; left: -36%; right: -36%; bottom: -26px; height: 36px; background: radial-gradient(closest-side, color-mix(in srgb, var(--gc) 46%, transparent), transparent); }
.sp .sp-idle svg { width: 42px; height: 42px; opacity: .5; }
.sp .sp-idle b { color: var(--fg); font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }

/* ---------- 5. the rip ---------- */
.sp .sp-tear { --p: 0; --pw: 204px; --ph: 286px; --tt: 48px; --dir: 1; position: relative; width: var(--pw); height: var(--ph); margin: 4px 0 26px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; filter: none; animation: spPackIn .55s var(--spring) both, spBob 3.2s ease-in-out .6s infinite; }
.sp .sp-tear.started, .sp .sp-tear.open { animation: spPackIn .55s var(--spring) both; }
.sp .sp-tear.grab { cursor: grabbing; }
.sp .sp-tear.open { cursor: default; }
.sp .sp-tear.from-right { --dir: -1; }
.sp .sp-tear:focus-visible { outline: 2px solid var(--accent); outline-offset: 10px; border-radius: 14px; }
@keyframes spPackIn { from { transform: translateY(48px) scale(.72) rotate(-6deg); opacity: 0; } }
@keyframes spBob { 50% { translate: 0 -7px; } }
.spk-skin { position: absolute; left: 0; top: 0; width: 100%; height: var(--ph); background: var(--foil); }
.sp .sp-tear-top, .sp .sp-tear-body { position: absolute; left: 0; right: 0; overflow: hidden; border: 0; border-radius: 0; background: none; box-shadow: none; }
.sp .sp-tear-top { top: 0; height: var(--tt); z-index: 3; display: grid; place-items: center; transform-origin: 100% 100%; transform: translateY(calc(var(--p) * -5px)) rotate(calc(var(--p) * 12deg)); -webkit-mask: var(--zig-top); mask: var(--zig-top); }
.sp .sp-tear.from-right .sp-tear-top { transform-origin: 0 100%; transform: translateY(calc(var(--p) * -5px)) rotate(calc(var(--p) * -12deg)); }
.sp .sp-tear-top::before { content: ""; position: absolute; inset: 0 0 auto; height: 13px; background: repeating-linear-gradient(90deg, #00000026 0 2px, #ffffff2e 2px 4px); box-shadow: 0 1px 0 #ffffff66; }
.sp-tear-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: repeating-linear-gradient(90deg, #ffffffe6 0 6px, transparent 6px 11px); }
.sp-tear-top em { position: relative; margin-top: 11px; font-style: normal; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--pk-ink); opacity: .9; padding-left: .24em; }
.sp .sp-tear-body { top: var(--tt); bottom: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 9px; padding-bottom: 12px; -webkit-mask: var(--zig-bot); mask: var(--zig-bot); }
.sp-tear-body .spk-skin { top: calc(-1 * var(--tt)); }
.sp .sp-tear-body::before { content: ""; position: absolute; inset: auto 0 0; height: 13px; background: repeating-linear-gradient(90deg, #00000026 0 2px, #ffffff2e 2px 4px); box-shadow: 0 -1px 0 #ffffff66; }
.sp-tear-body::after { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(90% 62% at 50% 0, color-mix(in srgb, var(--tc) 85%, #fff), transparent 72%); transition: opacity .3s var(--ease); }
.sp-tear.open .sp-tear-body::after { opacity: .7; }
.sp-tear-body .spk-crest { width: 50%; }
.sp .sp-tear-body span { font-size: 21px; }
.sp-tear-body em { font-size: 9px; }
.sp-tear .spk-shine { animation: spShine 3.6s var(--ease) .5s infinite; }
@keyframes spShine { 0% { transform: translateX(-62%); } 42%, 100% { transform: translateX(62%); } }
.sp .sp-tear-cut { position: absolute; top: calc(var(--tt) - 2px); left: 0; width: 0; height: 4px; z-index: 4; border-radius: 4px; pointer-events: none; background: #fff; box-shadow: 0 0 12px 3px #fff, 0 0 28px 8px color-mix(in srgb, var(--pc) 80%, #fff); }
/* a finger dot slides along the tear line until you start, to show what to do */
.sp .sp-tear::after { content: ""; position: absolute; top: calc(var(--tt) - 13px); left: 6px; width: 24px; height: 24px; z-index: 5; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff 0 32%, #ffffff5c 35% 100%); box-shadow: 0 0 0 1.5px #ffffffb8, 0 0 18px #fff; animation: spSwipeX 1.8s var(--ease) infinite; }
.sp .sp-tear.started::after { display: none; }
@keyframes spSwipeX { 0% { transform: translateX(0) scale(.6); opacity: 0; } 14% { transform: translateX(0) scale(1); opacity: 1; } 78% { transform: translateX(calc(var(--pw) - 36px)) scale(1); opacity: 1; } 100% { transform: translateX(calc(var(--pw) - 36px)) scale(1.35); opacity: 0; } }
/* light leaks out of the gap as it opens, then the first card pushes up out of the pack */
.sp-tear-glow { position: absolute; left: -42%; right: -42%; bottom: calc(100% - var(--tt)); height: 200px; z-index: 1; pointer-events: none; transform-origin: 50% 100%; opacity: calc(var(--p) * .9); transform: scaleY(calc(.45 + var(--p) * .45)); background: linear-gradient(0deg, #fff, color-mix(in srgb, var(--tc) 72%, transparent) 48%, transparent); clip-path: polygon(30% 100%, 70% 100%, 100% 0, 0 0); }
.sp-peek { position: absolute; left: 11%; right: 11%; top: calc(var(--tt) - 1px); height: 58%; z-index: 1; opacity: 0; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #fff, #cdd6e4 70%); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--tc) 78%, #fff), inset 0 0 0 5px #00000024; }
.sp-tear-floor { position: absolute; left: -24%; right: -24%; bottom: -32px; height: 46px; z-index: 0; pointer-events: none; background: radial-gradient(closest-side, #000000b8, transparent 76%), radial-gradient(closest-side, color-mix(in srgb, var(--tc) 50%, transparent), transparent); }
.sp .sp-tear.open .sp-tear-top { animation: spRip .5s cubic-bezier(.3, 0, .8, .4) forwards; }
.sp .sp-tear.open .sp-tear-body { animation: spThud .4s var(--ease) both; }
.sp .sp-tear.open .sp-tear-cut { opacity: 0; }
.sp-tear.open .sp-tear-glow { animation: spPour .5s var(--ease) both; }
.sp-tear.open .sp-peek { animation: spPeek .5s var(--spring) .06s both; }
@keyframes spRip { to { transform: translate(calc(var(--dir) * 96px), -210px) rotate(calc(var(--dir) * 70deg)); opacity: 0; } }
@keyframes spThud { 30% { transform: translateY(7px) scale(1.03, .97); } }
@keyframes spPour { from { opacity: .55; transform: scaleY(.75); } to { opacity: 1; transform: scaleY(1.3); } }
@keyframes spPeek { from { opacity: 1; transform: translateY(4px); } to { opacity: 1; transform: translateY(-66px); } }
.sp .sp-tip { margin: 0; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 15px 8px 11px; border-radius: 14px; background: #0a0d13c2; border: 1px solid #ffffff21; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left; color: #ffffffe6; }
.sp-tip svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gc); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sp .sp-auto { min-height: 42px; padding: 0 18px; border-radius: var(--r-sm); font-family: var(--font-body); font-size: 13px; background: #0a0d13c2; animation: uiIn var(--t-3) var(--ease) both; }
.sp .sp-stage.sp-live .sp-tip, .sp .sp-stage.sp-live .sp-auto { visibility: hidden; }

/* ---------- 6. the walkout: the outline of the card in the tunnel, one clue at a time ---------- */
.sp-walk { --sw: 244px; position: relative; display: grid; justify-items: center; align-content: center; gap: 12px; width: min(100%, 520px); min-height: 390px; }
.sp-walk > * { position: relative; z-index: 1; }
.sp-walk .sp-sil { position: absolute; left: 50%; top: 50%; z-index: 0; width: var(--sw); aspect-ratio: 5 / 7; margin: calc(var(--sw) * -.7) 0 0 calc(var(--sw) * -.5); transform: scale(var(--s, 1)); animation: spSil .7s var(--ease) both;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 90%, #fff), color-mix(in srgb, var(--tc) 40%, transparent) 62%, color-mix(in srgb, var(--tc) 12%, transparent)); -webkit-mask: var(--fc-shape) center / 100% 100% no-repeat; mask: var(--fc-shape) center / 100% 100% no-repeat; }
.sp-sil::before { content: ""; position: absolute; inset: 1.6% 2.2%; background: radial-gradient(80% 50% at 50% 0, color-mix(in srgb, var(--tc) 30%, #070a10), #070a10 76%); -webkit-mask: var(--fc-shape) center / 100% 100% no-repeat; mask: var(--fc-shape) center / 100% 100% no-repeat; }
.s0 .sp-sil { --s: .86; opacity: .5; }
.s1 .sp-sil { --s: .93; opacity: .72; }
.s2 .sp-sil { --s: 1; opacity: .95; }
@keyframes spSil { from { transform: scale(calc(var(--s, 1) - .07)); opacity: .2; } }
.sp-wtag { font-size: 11px; font-weight: 800; letter-spacing: .34em; text-transform: uppercase; color: color-mix(in srgb, var(--tc) 80%, #fff); padding-left: .34em; }
.sp-trail { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 32px; }
.sp-trail span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--tc) 44%, transparent); background: #0a0d13b8; color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 800; }
.sp-trail span:empty { display: none; }
.sp .sp-clue { display: grid; gap: 12px; justify-items: center; align-content: center; min-height: 196px; color: #fff; animation: spClue .5s var(--spring) both; }
.sp .sp-clue small { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: #ffffffa6; padding-left: .26em; }
.sp .sp-clue b { font-family: var(--font-display); font-size: clamp(25px, 6cqw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-shadow: 0 0 34px color-mix(in srgb, var(--tc) 85%, transparent), 0 2px 10px #000; }
.sp .sp-clue .sp-big { font-size: clamp(66px, 18cqw, 116px); letter-spacing: -0.05em; }
@keyframes spClue { from { transform: scale(.5) translateY(16px); opacity: 0; } }
.sp .flag.big { width: 132px; height: 88px; border-radius: 10px; box-shadow: 0 0 0 2px #ffffff47, 0 18px 40px -14px #000, 0 0 64px -6px var(--tc); }
.sp-kit, .fc-badge { display: block; clip-path: polygon(50% 0, 97% 13%, 97% 50%, 83% 78%, 50% 100%, 17% 78%, 3% 50%, 3% 13%); background: linear-gradient(135deg, transparent 0 40%, var(--k2) 40% 60%, transparent 60%), linear-gradient(90deg, var(--k1) 50%, color-mix(in srgb, var(--k1) 76%, #000) 50%); }
.sp-kit { width: 82px; height: 94px; }
.sp-steps { display: flex; gap: 6px; justify-content: center; }
.sp-steps i { width: 26px; height: 4px; border-radius: 4px; background: #ffffff26; }
.sp-steps i.on { background: color-mix(in srgb, var(--tc) 85%, #fff); box-shadow: 0 0 10px var(--tc); }
.sp .sp-hint { bottom: 14px; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; color: #ffffff80; }

/* ---------- 7. the result: best player in the middle, keep or sell ---------- */
.sp .sp-result { gap: 12px; }
.sp-rhead { display: grid; justify-items: center; gap: 3px; }
.sp-rhead b { font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: color-mix(in srgb, var(--tc) 78%, #fff); text-shadow: 0 0 26px color-mix(in srgb, var(--tc) 55%, transparent); }
.sp .sp-cards { position: relative; display: flex; flex-wrap: nowrap; gap: min(20px, 2.4cqw); justify-content: center; align-items: center; padding: 8px 0 2px; }
.sp .sp-slot { position: relative; display: grid; gap: 10px; justify-items: center; min-width: 0; flex: none; }
.sp .sp-slot:nth-child(2) { order: 0; --rot: -4deg; }
.sp .sp-slot.best { order: 1; z-index: 2; flex-basis: auto; }
.sp .sp-slot:nth-child(3) { order: 2; --rot: 4deg; }
.sp .sp-slot .fc { width: min(158px, 27cqw); margin: 0; box-shadow: none; transform: perspective(700px) rotateY(calc(var(--ry, 0) * 18deg)) rotateX(calc(var(--rx, 0) * 12deg)) rotate(var(--rot, 0deg)); transition: transform .2s var(--ease); }
.sp .sp-slot.best .fc { width: min(214px, 37cqw); }
.sp-slot.best::before { content: ""; position: absolute; left: 50%; top: 42%; width: 190%; aspect-ratio: 1; margin: -95% 0 0 -95%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 44%, transparent), transparent 74%); }
.sp-b3 .sp-slot.best::after, .sp-b4 .sp-slot.best::after, .sp-b5 .sp-slot.best::after { content: ""; position: absolute; left: 50%; top: 42%; width: 260%; aspect-ratio: 1; margin: -130% 0 0 -130%; z-index: -1; pointer-events: none; background: repeating-conic-gradient(color-mix(in srgb, var(--tc) 24%, transparent) 0 5deg, transparent 5deg 15deg); -webkit-mask: radial-gradient(closest-side, #000 22%, transparent 78%); mask: radial-gradient(closest-side, #000 22%, transparent 78%); }
.sp-b4 .sp-slot.best::after, .sp-b5 .sp-slot.best::after { animation: spRays 28s linear infinite; }
@keyframes spRays { to { transform: rotate(360deg); } }
.sp .sp-slot small { display: grid; justify-items: center; gap: 4px; font-family: var(--font-body); font-size: 11.5px; color: #ffffffbf; }
.sp .sp-slot small.new { height: auto; padding: 0; border-radius: 0; background: none; font-weight: 400; letter-spacing: 0; text-transform: none; } /* .new is also the shell's gold NEW badge: only the small pill inside is a badge here */
.sp-slot small b { padding: 3px 8px; border-radius: 99px; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sp-slot small.new b { color: var(--accent-ink); background: var(--accent); }
.sp-slot small.dup b { color: #ffffffb8; background: #ffffff1f; }
.sp-slot small span { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 5px; font-family: var(--font-mono); font-weight: 700; }
.sp-slot .fc.in + small, .sp-result .sp-rhead { animation: uiIn .4s var(--ease) .5s both; }
.sp .sp-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: stretch; margin-top: 6px; }
.sp .sp-actions .big-btn { width: auto; min-height: 50px; padding: 0 28px; font-size: 16.5px; }
.sp .sp-actions .big-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sp .sp-actions .chip-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: auto; min-height: 50px; padding: 0 18px; font-family: var(--font-body); font-size: 14px; font-weight: 600; color: #fff; background: #0a0d13d9; border: 1px solid #ffffff33; }
.sp .sp-actions .chip-btn:hover { border-color: #ffffff80; }

/* ---------- 8. the player card ----------
   One shield shape for every tier. The outer layer is the metal rim, .fc-in is the face of the card.
   The card is its own size container: everything inside is measured in cqw (1% of the card's width). */
.sp .fc { --f1: #fff; --f2: #a3adbf; --f3: #586275; --p1: #f6f8fb; --p2: #cdd3de; --p3: #9aa4b6; --ink: #171c27; --acc: var(--ink); --sil: #2a3243cc; --sil2: #171c27e6; --pat: none; --gloss: #ffffff59;
  position: relative; display: block; flex: none; width: 150px; aspect-ratio: 5 / 7; padding: 0; border-radius: 0; overflow: hidden; container-type: inline-size; color: var(--ink); text-align: left; box-shadow: none;
  background: linear-gradient(150deg, var(--f1), var(--f2) 32%, var(--f3) 56%, var(--f1) 82%, var(--f2)); -webkit-mask: var(--fc-shape) center / 100% 100% no-repeat; mask: var(--fc-shape) center / 100% 100% no-repeat; }
.sp .fc::after { content: none; }
.sp .t-bronze { --f1: #f8d8b8; --f2: #b9743c; --f3: #6b3b18; --p1: #eec5a0; --p2: #c88e5c; --p3: #97592b; --ink: #2c1505; --sil: #3a1f0bcc; --sil2: #261204e6; --pat: repeating-linear-gradient(135deg, #ffffff17 0 2px, transparent 2px 7px); }
.sp .t-silver { --pat: repeating-linear-gradient(0deg, #ffffff47 0 1px, transparent 1px 4px); }
.sp .t-gold { --f1: #fff8cf; --f2: #e4ae24; --f3: #8a5a00; --p1: #fff4c2; --p2: #f4cf5c; --p3: #d09a1e; --ink: #2d1d00; --sil: #4a3305cc; --sil2: #2d1d00e6; --pat: repeating-conic-gradient(from 0deg at 66% 40%, #ffffff42 0 5deg, transparent 5deg 12deg); }
.sp .t-star { --f1: #d6f7ff; --f2: #35a4f5; --f3: #0c3f93; --p1: #2b88e8; --p2: #1150ae; --p3: #082663; --ink: #f0faff; --acc: #c4f1ff; --sil: #04122ed9; --sil2: #020a1ceb; --gloss: #9fe6ff73; --pat: repeating-conic-gradient(from 0deg at 66% 40%, #8fdcff2b 0 4deg, transparent 4deg 12deg); }
.sp .t-elite { --f1: #f8d2ff; --f2: #a742f2; --f3: #3f1189; --p1: #40197a; --p2: #1d0a43; --p3: #0c0424; --ink: #fbeeff; --acc: #f3b6ff; --sil: #070212e0; --sil2: #000000eb; --gloss: #e9a6ff73; --pat: repeating-linear-gradient(60deg, #dba4ff1c 0 1px, transparent 1px 9px), repeating-linear-gradient(-60deg, #dba4ff1c 0 1px, transparent 1px 9px); }
.sp .t-legend { --f1: #fff; --f2: #f3cf6a; --f3: #b9841a; --p1: #fff; --p2: #f4effd; --p3: #dcecfb; --ink: #1d1636; --acc: #96650a; --sil: #2b2350cc; --sil2: #15102be6; --pat: repeating-conic-gradient(from 0deg at 66% 40%, #f6c65a42 0 4deg, transparent 4deg 11deg); }
.sp .fc.t-legend { background: linear-gradient(150deg, var(--f1), var(--f2) 32%, var(--f3) 56%, var(--f1) 82%, var(--f2)); animation: none; }
.fc-in { position: absolute; inset: 2.1% 2.9%; overflow: hidden; -webkit-mask: var(--fc-shape) center / 100% 100% no-repeat; mask: var(--fc-shape) center / 100% 100% no-repeat;
  background: radial-gradient(84% 44% at 66% 42%, color-mix(in srgb, var(--k1) 36%, transparent), transparent 72%), var(--pat), linear-gradient(172deg, var(--p1), var(--p2) 50%, var(--p3)); }
.sp .fc-top { position: relative; display: block; height: 77cqw; }
.sp .fc-rt { position: absolute; left: 7cqw; top: 12cqw; z-index: 1; width: 23cqw; display: grid; justify-items: center; gap: 2.2cqw; }
.sp .fc-rt b { font-family: var(--font-display); font-size: 21cqw; font-weight: 800; line-height: .82; letter-spacing: -0.04em; color: var(--acc); }
.sp .fc-rt span { width: 15cqw; padding-bottom: 2.2cqw; border-bottom: 1px solid color-mix(in srgb, var(--ink) 32%, transparent); font-family: var(--font-display); font-size: 8.4cqw; font-weight: 800; line-height: 1; text-align: center; }
.sp .fc .flag { display: block; width: 15cqw; height: 10cqw; border-radius: 1.4cqw; box-shadow: 0 0 0 1px #00000047; }
.fc-badge { width: 12.5cqw; height: 14.5cqw; filter: drop-shadow(0 0 .5px #000b); }
.fc-face { position: absolute; right: 1cqw; bottom: 0; width: 68cqw; line-height: 0; }
.sp .fc-face svg { display: block; width: 100%; height: auto; }
.fc-face .sk { fill: var(--sil); stroke: none; } /* no outline: .sk is also a line class of the shell's tile art (arcade.css) */
.fc-face .hr { fill: var(--sil2); }
.fc-tier { position: absolute; right: 8cqw; top: 9.5cqw; z-index: 1; font-style: normal; font-size: 5.2cqw; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; line-height: 1; opacity: .6; }
.sp .fc-name { display: grid; gap: .8cqw; margin: 0 7cqw; padding: 2.6cqw 0 2.2cqw; border-top: 1px solid color-mix(in srgb, var(--ink) 34%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); text-align: center; white-space: nowrap; overflow: hidden; }
.fc-name span { font-family: var(--font-body); font-size: 5.4cqw; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; line-height: 1.1; opacity: .68; padding-left: .18em; }
.fc-name b { font-family: var(--font-display); font-size: 10.4cqw; font-weight: 800; letter-spacing: -0.015em; text-transform: uppercase; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
.sp .fc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw 2cqw; margin: 2.8cqw 8cqw 0; font-family: var(--font-mono); font-size: 5.5cqw; font-weight: 500; line-height: 1.15; }
.sp .fc-stats span { display: flex; align-items: baseline; justify-content: center; gap: 1.5cqw; opacity: .92; }
.sp .fc-stats b { margin: 0; font-size: 7.4cqw; font-weight: 700; }
.sp .fc-club { margin: 2.6cqw 15cqw 0; font-size: 5.4cqw; font-weight: 600; letter-spacing: .04em; line-height: 1.2; text-align: center; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the foil: a band of gloss that slides with the mouse, tinted on the special tiers */
.fc-foil { position: absolute; inset: 0 -80%; pointer-events: none; opacity: .75; transform: translateX(calc(var(--ry, 0) * 70%)); background: linear-gradient(112deg, transparent 38%, var(--gloss) 48%, #fff0 56%, transparent 66%); }
.t-legend .fc-foil { opacity: 1; background: linear-gradient(112deg, transparent 26%, #ff9be04d 38%, #9be1ff66 47%, #fff3a04d 56%, transparent 68%); }
.sp-slot.best .fc.in .fc-foil { animation: spFoil 1.2s var(--ease) 1s backwards; }
@keyframes spFoil { from { transform: translateX(-70%); } }
/* the small card in the album: no stats, bigger name */
.sp .fc.sm { width: 100%; padding: 0; }
.sp .fc.sm .fc-top { height: 88cqw; }
.sp .fc.sm .fc-rt b { font-size: 23cqw; }
.sp .fc.sm .fc-rt span { font-size: 9cqw; }
.sp .fc.sm .fc-face { width: 72cqw; }
.sp .fc.sm .fc-face svg { height: auto; }
.sp .fc.sm .fc-stats { display: none; }
.sp .fc.sm .fc-name { padding: 3cqw 0 2.6cqw; }
.fc.sm .fc-name span { font-size: 6.2cqw; }
.fc.sm .fc-name b { font-size: 11.2cqw; }
.sp .fc.sm .fc-club { margin-top: 3.2cqw; font-size: 6.4cqw; }
.fc.sm .fc-tier { font-size: 5.8cqw; }
.t-bronze.sm .fc-foil, .t-silver.sm .fc-foil, .t-gold.sm .fc-foil { display: none; }
.sp .fc.in, .sp .fc.t-legend.in { animation: spCardIn .6s var(--spring) both; }
.sp .sp-slot:nth-child(2) .fc.in { animation-delay: .05s; }
.sp .sp-slot:nth-child(3) .fc.in { animation-delay: .17s; }
.sp .sp-slot.best .fc.in { animation-delay: .34s; animation-duration: .75s; }
@keyframes spCardIn { from { transform: perspective(700px) rotateY(96deg) rotateX(0deg) rotate(0deg); translate: 0 70px; scale: .82; opacity: 0; } }

/* ---------- 9. the club: a heading, two plain figures and the cards. No panel: the page is the surface ---------- */
.sp .sp-album { display: grid; gap: var(--s3, 12px); min-width: 0; }
.sp-album .sec-h { margin: 0; }
.sp .sp-sum { display: flex; flex-wrap: wrap; gap: var(--s1, 4px) var(--s5, 24px); }
.sp .sp-sum .stat { justify-content: flex-start; gap: var(--s2, 8px); }
.sp .sp-sum .stat[hidden] { display: none; }
.sp .sp-sum .sp-val { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.sp .sp-club { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--s4, 16px) var(--s3, 12px); align-items: start; }
.sp .sp-own { display: grid; gap: var(--s2, 8px); min-width: 0; }
.sp .sp-own button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 4px 6px; border: 0; border-radius: var(--r-sm); background: var(--panel-2); color: var(--fg); font: 500 var(--fs-meta, 12px)/1.15 var(--font-body); transition: background var(--t-2) var(--ease); }
.sp .sp-own button:hover { background: var(--panel-3, var(--panel-2)); }
.sp .sp-own button.armed { background: var(--crimson); color: #fff; }
.sp-album .empty { text-align: left; padding: 0; }
.sp .sp-tip[hidden] { display: none; }

/* ---------- 10. small screens and motion ---------- */
@media (max-width: 699px) {
  .sp { gap: var(--s5, 24px); }
  .sp-top { gap: var(--s3, 12px); }
  .sp .sp-packs { gap: var(--s1, 4px); }
  .sp .sp-art { width: 28px; height: 40px; }
  .sp .sp-stage { min-height: 480px; padding: 26px 8px 42px; }
  /* nothing on the stage yet: it stays low, so the packs are in sight under it */
  .sp .sp-stage:not(.sp-tearing, .sp-live, .sp-result) { min-height: 220px; padding-block: 20px; }
  .sp .sp-stage:not(.sp-tearing, .sp-live, .sp-result) .sp-spot { width: 86px; height: 120px; margin-bottom: 14px; }
  .sp-rig { top: 12px; width: 54px; height: 26px; }
  .sp-rig.l { left: 12px; }
  .sp-rig.r { right: 12px; }
  .sp .sp-tear { --pw: 172px; --ph: 240px; --tt: 42px; }
  .sp .sp-tear-body span { font-size: 17.5px; }
  .sp-walk { --sw: 232px; min-height: 340px; gap: 10px; }
  .sp .sp-clue { min-height: 168px; }
  .sp .flag.big { width: 114px; height: 76px; }
  .sp-rhead b { font-size: 23px; }
  .sp .sp-slot small { font-size: 10.5px; }
  .sp .sp-actions { width: 100%; padding: 0 6px; }
  .sp .sp-actions > * { flex: 1 1 100%; }
  .sp .sp-club { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3, 12px) var(--s2, 8px); }
}
:root.rm .sp-tear, :root.rm .sp-tear::after, :root.rm .spk-shine, :root.rm .sp-slot.best::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .sp .sp-tear, .sp .sp-tear::after, .sp .spk-shine, .sp .sp-slot.best::after { animation: none !important; } }
:root[data-q="low"] .sp-slot.best::after, :root[data-q="low"] .spk-shine { display: none; }

/* ---------- 11. the play dock: Open sits on the pitch, at the bottom of the stage. With a pack on the stage (ripping it,
   the walkout, Keep and Sell all) the dock steps aside, so there is one thing to press at a time ---------- */
.sp .sp-dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; gap: 10px; padding: 0 18px 20px; pointer-events: none; }
.sp .sp-dock > * { pointer-events: auto; }
.sp .sp-dock:has(#sp-open:disabled) { display: none; }
.sp .sp-dock #sp-open { flex: 0 1 320px; width: auto; min-width: 0; min-height: 56px; padding: 8px 22px; border-radius: 14px; font: 700 17px/1.15 var(--font-body); box-shadow: 0 10px 22px -10px #000d, inset 0 -3px 0 #0000002e; }
.sp .sp-stage:not(.sp-tearing, .sp-live, .sp-result) { padding-bottom: 96px; }
@media (max-width: 699px) {
  .sp .sp-dock { padding: 0 12px 12px; }
  .sp .sp-dock #sp-open { flex: 1 1 auto; min-height: 52px; font-size: 16.5px; }
  .sp .sp-stage:not(.sp-tearing, .sp-live, .sp-result) { min-height: 280px; padding: 16px 8px 76px; }
  .sp .sp-stage:not(.sp-tearing, .sp-live, .sp-result) .sp-spot { margin-bottom: 0; }
}
