/* ===== Kickwise collection page (collection.html, assets/collection.js) ===== */

.col-page main { padding-bottom: 88px; }
.col-head { display: flex; justify-content: space-between; align-items: end; gap: 18px 32px; flex-wrap: wrap; padding: 32px 0 8px; }
.col-head h1 { font-size: clamp(52px, 7vw, 96px); }
.col-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.col-stats > div { min-width: 120px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.col-stats dt { font-size: 13px; color: var(--muted); }
.col-stats dd { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--muted); }
.col-stats dd b { font-size: 34px; font-weight: 900; color: var(--text); line-height: 1; text-transform: uppercase; }
.coins-stat dd b { color: #ffd23f; }
.coins-stat .coin { width: 22px; height: 22px; }
.rtext.r-common { color: #c9d2cc !important; } .rtext.r-rare { color: #4fb3ff !important; } .rtext.r-epic { color: #b26bff !important; }
.rtext.r-legendary { color: #ffc93c !important; } .rtext.r-mythic { color: #ff5fa8 !important; }

.col-sec { padding-top: 56px; }
.col-sec > h2, .album-head h2 { font-size: clamp(38px, 4.6vw, 58px); margin-bottom: 18px; }
.sec-lead { margin: -8px 0 18px; color: var(--muted); }

/* ---------- Today: daily card (the biggest thing on the page) and match cards ---------- */
.today { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; padding-top: 24px; }
.daily-tile, .match-tile { position: relative; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.daily-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.daily-tile.ready { border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 60%); }
.daily-tile h2, .match-tile h2 { font-size: clamp(34px, 3.6vw, 46px); }
.dt-lead, .match-tile p { margin: 6px 0 14px; color: var(--muted); max-width: 46ch; }
/* the card back waiting to be opened */
.dt-card { width: 118px; aspect-ratio: 5 / 7; border-radius: 12px; padding: 5px; transform: rotate(-4deg);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 45%, color-mix(in srgb, var(--accent) 40%, #000));
  box-shadow: 0 18px 36px -18px #000, 0 0 30px -10px var(--accent); }
.dt-card span { display: block; height: 100%; border-radius: 8px; position: relative; background: radial-gradient(70% 50% at 50% 40%, color-mix(in srgb, var(--accent) 22%, #0c1510), #0a100d 75%); }
.dt-card span::after { content: ""; position: absolute; inset: 28% 24%; background: var(--accent);
  -webkit-mask: url("brand/kickwise-mark.svg") center / contain no-repeat; mask: url("brand/kickwise-mark.svg") center / contain no-repeat; }
.daily-tile.ready .dt-card { animation: dt-float 3.2s ease-in-out infinite; }
@keyframes dt-float { 50% { transform: rotate(-2deg) translateY(-6px); } }
.daily-tile:not(.ready) .dt-card { filter: saturate(.3) brightness(.7); }
.streak { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 0 0 16px; padding: 0; max-width: 440px; }
.streak li { height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11.5px; font-weight: 700; color: var(--muted); }
.streak li.done { background: color-mix(in srgb, var(--accent) 22%, var(--bg-2)); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.streak li.now { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.streak li.big { background: linear-gradient(150deg, #3a1170, #1d0b36); color: #e2c4ff; box-shadow: inset 0 0 0 1px #a35cff; }
.streak li.big.done, .streak li.big.now { background: linear-gradient(150deg, #a35cff, #5b20b0); color: #fff; }
.dt-action { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.match-tile { display: flex; flex-direction: column; }
.match-tile .dt-action { margin-top: auto; }
.match-tile.ready { border-color: #a35cff; background: radial-gradient(120% 120% at 100% 0%, rgba(163, 92, 255, .2), var(--surface) 60%); }

/* ---------- Pack shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pack-tile { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pack-wrap {
  --p1: #1f3328; --p2: #0f1a14; --pi: var(--accent);
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; color: var(--pi);
  background: linear-gradient(160deg, var(--p1), var(--p2));
  font-family: var(--display); text-transform: uppercase; transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.pack-wrap::before, .pack-wrap::after { content: ""; position: absolute; left: 0; right: 0; height: 9px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0 6px, transparent 6px 12px); }
.pack-wrap::before { top: 0; } .pack-wrap::after { bottom: 0; }
.pack-wrap b { font-size: 64px; font-weight: 900; line-height: .85; }
.pack-wrap > span:last-child { font-size: 18px; font-weight: 800; letter-spacing: .08em; }
.pw-mark { position: absolute; top: 16px; left: 16px; width: 26px; height: 26px; background: currentColor; opacity: .9;
  -webkit-mask: url("brand/kickwise-mark.svg") center / contain no-repeat; mask: url("brand/kickwise-mark.svg") center / contain no-repeat; }
.pack-tile:hover .pack-wrap { transform: translateY(-3px) rotate(-1deg); }
.p-sport .pack-wrap { --p1: #b8e6ff; --p2: #2f6fc0; --pi: #06142a; }
.p-elite .pack-wrap { --p1: #ead1ff; --p2: #6b2bc4; --pi: #fff; }
.pack-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack-body h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: 1; }
.pack-body p { margin: 0; font-size: 14px; color: var(--muted); }
.pk-odds { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px !important; }
.pk-odds span { display: inline-flex; align-items: center; gap: 5px; }
.pk-odds .rar-dot { width: 8px; height: 8px; }
.pk-sports { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-sports .chip { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.pk-sports .kw-ico { width: 15px; height: 15px; }
.pack-buy { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-price { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 900; font-size: 24px; color: #ffd23f; margin-right: auto; }
.pk-need, .pk-wait { font-size: 12.5px; color: var(--muted); flex-basis: 100%; }
.pk-wait { flex-basis: auto; font-size: 15px; }
.pk-wait b { color: var(--text); }
.shelf-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.shelf-note a { color: var(--text); }

/* ---------- Fusion ---------- */
.fuse-box { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.fuse-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.fuse-tab { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 8px; padding: 10px 12px; text-align: left;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--bg-2); cursor: pointer; }
.fuse-tab b { font-size: 15px; } .fuse-tab span { font-family: var(--display); font-weight: 900; font-size: 20px; }
.fuse-tab small { grid-column: 2 / -1; font-size: 12px; color: var(--muted); }
.fuse-tab[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.fuse-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 26px; align-items: center; }
.fuse-slots { display: grid; grid-template-columns: repeat(6, 74px); gap: 8px; align-items: center; }
.fslot { position: relative; display: grid; place-items: center; width: 74px; aspect-ratio: 5 / 7; padding: 0; border-radius: 10px; border: 1.5px dashed var(--line-strong); background: transparent; }
.fslot.full { border: 0; cursor: pointer; }
.fslot .pcard { width: 100%; border-radius: 9px; }
.fslot.out { margin-left: 18px; border: 0; background: linear-gradient(150deg, #fff3, transparent); box-shadow: inset 0 0 0 2px currentColor; color: #c9d2cc; display: flex; flex-direction: column; justify-content: center; }
.fslot.out::before { content: ""; position: absolute; left: -20px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-top: 2.5px solid var(--muted); border-right: 2.5px solid var(--muted); transform: rotate(45deg); }
.fslot.out b { font-family: var(--display); font-size: 38px; line-height: 1; }
.fslot.out small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.fslot.out.r-rare { color: #4fb3ff; } .fslot.out.r-epic { color: #b26bff; } .fslot.out.r-legendary { color: #ffc93c; } .fslot.out.r-mythic { color: #ff5fa8; }
.fuse-go p { margin: 0 0 12px; color: var(--muted); }
.fuse-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fuse-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; margin-top: 18px; max-height: 360px; overflow-y: auto; padding: 4px; }
.fpick { position: relative; padding: 0; border: 0; background: none; border-radius: 12px; cursor: pointer; transition: transform .15s; }
.fpick .pcard { width: 100%; border-radius: 10px; }
.fpick.on { transform: translateY(-4px); }
.fpick.on::after { content: ""; position: absolute; inset: -4px; border-radius: 14px; box-shadow: 0 0 0 2.5px var(--accent); pointer-events: none; }
.fpick:not(.spare) .pcard { opacity: .6; }
.fp-only { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); padding: 2px 7px; border-radius: 999px; background: var(--bg); font-size: 10.5px; font-weight: 700; white-space: nowrap; color: var(--muted); }

/* ---------- Album ---------- */
.album-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.album-head h2 { margin-bottom: 0; }
.album-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.album-tools .kw-ico { width: 17px; height: 17px; }
.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-2); }
.search .kw-ico { color: var(--muted); }
.search input { width: 170px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; outline: none; }
.search:focus-within { border-color: var(--accent); }
.sport-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
.stab { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.stab .kw-ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.stab b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stab span { margin-left: auto; font-size: 13px; color: var(--muted); }
.stab[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.stab[aria-pressed="true"] .kw-ico { color: var(--accent); }
#filters { margin-bottom: 18px; }
.slot { display: block; width: 100%; padding: 0 0 6px; border: 0; background: none; cursor: pointer; border-radius: 14px;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.slot:hover { transform: translateY(-4px) rotate(-1deg); }
.slot:focus-visible { outline-offset: 4px; }
.empty-note { grid-column: 1 / -1; margin: 0; padding: 28px; border-radius: var(--radius); border: 1.5px dashed var(--line-strong); color: var(--muted); text-align: center; }

/* ---------- Sets ---------- */
.set-group { margin: 26px 0 0; padding-bottom: 8px; border-bottom: 3px solid var(--text); font-family: var(--display); font-weight: 900; font-size: 22px; text-transform: uppercase; }
.set-group:first-child { margin-top: 0; }
.set { border-bottom: 1px solid var(--line); }
.set summary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto 110px; gap: 18px; align-items: center;
  padding: 14px 4px; cursor: pointer; list-style: none; }
.set summary::-webkit-details-marker { display: none; }
.set summary:hover .set-name b { color: var(--accent); }
.set-name b { display: block; font-family: var(--display); font-weight: 900; font-size: 24px; text-transform: uppercase; line-height: 1; transition: color .15s; }
.set-name small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.set-faces { display: flex; align-items: center; min-width: 0; overflow: hidden; }
.set-faces .sf .avatar, .set-faces i { width: 34px; height: 34px; border-radius: 50%; margin-right: -8px; border: 2px solid var(--bg); flex: none; font-size: 12px; }
.set-faces .sf { display: contents; }
.set-faces i { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.set-faces em { margin-left: 16px; font-style: normal; font-size: 13px; color: var(--muted); }
.set-count { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--muted); }
.set-count b { font-size: 30px; font-weight: 900; color: var(--text); }
.set-reward { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; font-family: var(--display); font-weight: 900; font-size: 22px; color: #ffd23f; }
.set-reward .kw-ico { width: 18px; height: 18px; }
.set.done .set-reward, .set.done .set-count b { color: var(--ok); }
.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 12px; padding: 4px 4px 22px; }
.set-cards .pcard { width: 100%; }

/* ---------- One card ---------- */
.card-view { width: min(720px, calc(100vw - 24px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); color: var(--text); }
.card-view::backdrop { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(4px); }
.cv-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; padding: 26px; align-items: center; }
.cv-info h2 { font-size: 44px; line-height: .92; }
.cv-meta { margin: 10px 0 14px; color: var(--muted); }
.cv-rar { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cv-rar li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--bg-2); font-size: 11.5px; color: var(--muted); opacity: .6; }
.cv-rar li.on { opacity: 1; color: var(--text); }
.cv-rar b { font-family: var(--display); font-size: 20px; }
.cv-sets { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; }
.cv-sets li { display: flex; justify-content: space-between; padding: 7px 12px; border-radius: var(--radius-sm); background: var(--bg-2); font-size: 14px; }
.cv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-actions .kw-ico { width: 17px; height: 17px; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1100px) { .shelf { grid-template-columns: 1fr 1fr; } .fuse-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .today { grid-template-columns: 1fr; } .sport-tabs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .col-head { padding-top: 20px; }
  .col-stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .col-stats > div { min-width: 0; }
  .col-stats dd b { font-size: 28px; }
  .col-sec { padding-top: 44px; }
  .daily-tile { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .dt-card { width: 84px; }
  .streak { gap: 4px; } .streak li { height: 30px; font-size: 10px; }
  .daily-tile .dt-action { grid-column: 1 / -1; }
  .daily-tile .dt-action .btn { width: 100%; }
  .shelf { grid-template-columns: 1fr; }
  .pack-tile { flex-direction: row; align-items: stretch; }
  .pack-wrap { width: 96px; aspect-ratio: 3 / 4; flex: none; }
  .pack-wrap b { font-size: 42px; }
  .pack-wrap > span:last-child { font-size: 13px; }
  .pw-mark { top: 12px; left: 12px; width: 18px; height: 18px; }
  .fuse-box { padding: 14px; }
  .fuse-tabs { grid-template-columns: 1fr 1fr; }
  .fuse-slots { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
  .fslot { width: 100%; }
  .fslot.out { margin-left: 10px; } .fslot.out::before { left: -12px; width: 8px; height: 8px; }
  .fslot.out b { font-size: 26px; } .fslot.out small { font-size: 8.5px; }
  .fuse-pick { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .search { flex: 1; } .search input { width: 100%; }
  .album-tools { width: 100%; }
  .sport-tabs { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .stab { flex: none; height: 42px; }
  .set summary { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .set-faces { grid-column: 1 / -1; grid-row: 2; }
  .set-reward { grid-column: 2; grid-row: 1; }
  .set-count { grid-column: 1; grid-row: 3; }
  .set-faces > :nth-child(n+10) { display: none; }
  .card-grid, .set-cards { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
  .cv-box { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; padding: 20px 16px; }
  .cv-box .pcard.lg { width: min(220px, 60vw); }
  .cv-actions { justify-content: center; }
  .cv-info h2 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .daily-tile.ready .dt-card { animation: none; } }
