/* The Daily PlayPack page (js/pages/playpack.js): how the free daily packs and
   streaks work, and one panel per game with "Open a pack from a random set". */

.playpack-page { max-width: 1180px; }
.pp-hero { max-width: 860px; margin-bottom: clamp(22px, 4vw, 40px); }
.pp-hero h1 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.025em; margin: 0 0 0.3em; }
.pp-hero h1 span { background: linear-gradient(100deg, #ffe08a, #ffb547 50%, #ff8a4c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pp-hero .lede { margin: 0 0 14px; }
.pp-fun { margin: 0; padding: 12px 16px; max-width: 74ch; border-radius: 14px; background: color-mix(in srgb, #ffb547 12%, var(--surface)); border: 1px solid color-mix(in srgb, #ffb547 38%, transparent); font-size: 0.94rem; }
.pp-fun b { color: #ffd27a; }

.pp-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.pp-game { position: relative; display: grid; align-content: start; gap: 10px; padding: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--edge); box-shadow: 0 14px 34px color-mix(in srgb, var(--tc) 14%, transparent); transition: border-color 0.25s, transform 0.25s var(--ease); }
.pp-game:hover { border-color: color-mix(in srgb, var(--tc) 55%, var(--edge)); }
.pp-game .pp-logo { min-height: 84px; }
.pp-game .pp-logo .gb-text b { font-size: 1.25rem; }
.pp-copy { margin: 0 4px; font-size: 0.9rem; }
.pp-game { grid-template-rows: auto auto auto auto 1fr; }
/* Status chip on its own line, then "Choose a set" on the left with the streak on the right; the random-set button sits at the bottom of the tile. */
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pp-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 2px; min-height: 28px; }
.pp-streak { display: flex; justify-content: flex-end; margin-left: auto; }
.pp-streak:empty { display: none; }
.pp-game .pp-choose { color: var(--ink); text-shadow: none; }
.pp-choose { flex: 0 0 auto; padding: 7px 14px; min-height: 0; font-size: 0.88rem; font-weight: 700; }
.pp-game.gb-pokemon .pp-logo { --ay: 32%; --az: 1.4; --ax: 45%; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--line); color: var(--ink); text-decoration: none; }
.pp-chip.is-ready { background: color-mix(in srgb, #4ade80 18%, transparent); color: #9ff0bb; }
.pp-chip.is-done { color: var(--muted); }
.pp-chip.is-streak { background: color-mix(in srgb, #ff8a4c 20%, transparent); color: #ffc49a; }
.pp-chip.is-pending { background: color-mix(in srgb, #ffb547 24%, transparent); color: #ffd27a; }
.pp-chip.is-pending:hover { text-decoration: underline; }
.pp-acts { display: flex; flex-wrap: wrap; gap: 8px; align-self: end; }
.pp-acts .btn { cursor: pointer; font: inherit; font-weight: 700; }
.pp-random { flex: 1 1 auto; justify-content: center; background: linear-gradient(100deg, color-mix(in srgb, var(--tc) 85%, #fff), var(--tc)); color: #140a02; box-shadow: 0 8px 22px color-mix(in srgb, var(--tc) 35%, transparent); }
.gb-lorcana .pp-random, .gb-yugioh .pp-random, .gb-onepiece .pp-random { color: #0c0a18; }
.pp-random:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.pp-random.is-rolling span { display: inline-block; animation: pp-roll 0.6s linear infinite; }
@keyframes pp-roll { to { transform: rotate(360deg); } }
.pp-game.is-used .pp-logo { filter: saturate(0.7); }

/* "Watch last pack opening": the last pack in a game, replayed card by card, with its video again. */
.pp-watch { flex: 1 1 100%; justify-content: center; gap: 8px; color: var(--ink); text-shadow: none; border-color: color-mix(in srgb, var(--tc) 45%, var(--edge)); background: color-mix(in srgb, var(--tc) 10%, var(--surface)); }
.pp-watch > span:last-child { display: grid; text-align: left; line-height: 1.15; }
.pp-watch small { font-size: 0.74rem; font-weight: 600; color: var(--muted); }
.pp-watch:hover { border-color: var(--tc); }
.pp-watch[hidden] { display: none; }
.pp-viewer { --ink: #f3efff; --muted: #b5acd0; --line: rgba(255, 255, 255, 0.14); --edge: rgba(255, 255, 255, 0.16); --surface: rgba(24, 19, 46, 0.72); --accent: #ffd36a;
  position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 14px var(--gutter, 16px) calc(14px + env(safe-area-inset-bottom)); background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 22%, rgba(8, 6, 20, 0.86)), rgba(6, 4, 16, 0.95) 70%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink); overflow: hidden auto; overscroll-behavior: contain; outline: none; }
.ppv-box { width: min(980px, 100%); display: grid; gap: 14px; }
.ppv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ppv-head .kicker { margin: 0; }
.ppv-head strong { display: block; font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.1; }
.ppv-head .quiet { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.ppv-x { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--edge); background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.ppv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(84px, 17vw, 150px), 1fr)); gap: clamp(8px, 1.4vw, 14px); margin: 0; padding: 0; list-style: none; }
.ppv-card { position: relative; aspect-ratio: 63 / 88; border-radius: 6%/4.3%; overflow: hidden; background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(18px) scale(0.92); transition: opacity 0.35s, transform 0.45s cubic-bezier(.2, .85, .25, 1), box-shadow 0.3s; }
.ppv-card.is-in { opacity: 1; transform: none; }
.ppv-card.is-now { transform: translateY(-6px) scale(1.06); z-index: 1; box-shadow: 0 0 0 2px var(--accent), 0 14px 30px rgba(0, 0, 0, 0.55); }
.ppv-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppv-card .img-missing { display: grid; place-items: center; height: 100%; padding: 8px; text-align: center; font-size: 0.8rem; }
.ppv-card.tier-h { box-shadow: 0 0 0 2px #ffe08a, 0 0 22px color-mix(in srgb, #ff9ad5 55%, transparent); }
.ppv-card.is-best { box-shadow: 0 0 0 3px #fff, 0 0 30px color-mix(in srgb, var(--accent) 70%, transparent); }
.ppv-badge { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 999px; text-align: center; font-style: normal; font-size: 0.68rem; font-weight: 800; background: linear-gradient(100deg, #ff8a3d, #ffd36a); color: #2a1300; }
.ppv-caption { margin: 0; min-height: 2.6em; text-align: center; }
.ppv-caption .pk-best { margin-left: 6px; }
.ppv-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ppv-acts .btn { cursor: pointer; font: inherit; font-weight: 700; }
.ppv-acts .btn-ghost { color: var(--ink); text-shadow: none; }
/* Phones: four cards a row, and the buttons stay in reach at the bottom. */
@media (max-width: 560px) {
  .pp-viewer { place-items: start center; }
  .ppv-cards { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ppv-badge { font-size: 0.56rem; left: 3px; right: 3px; bottom: 3px; padding: 1px 3px; }
  .ppv-caption { font-size: 0.9rem; }
  .ppv-acts { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(transparent, rgba(6, 4, 16, 0.92) 30%); }
  .ppv-acts .btn { flex: 1 1 calc(50% - 8px); justify-content: center; padding-inline: 10px; font-size: 0.88rem; }
  .ppv-acts .btn-reel { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ppv-card { transition: none; opacity: 1; transform: none; } }

.pp-how, .pp-streaks { margin-top: clamp(36px, 6vw, 64px); max-width: 900px; }
.pp-how h2, .pp-streaks h2 { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 14px; }
.pp-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: pp; }
.pp-steps li { position: relative; padding: 14px 16px 14px 60px; border-radius: 16px; background: var(--surface); border: 1px solid var(--edge); counter-increment: pp; }
.pp-steps li::before { content: counter(pp); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; color: #2a1300; background: linear-gradient(140deg, #ffe08a, #ff8a4c); }
.pp-steps b { display: block; margin-bottom: 2px; }
.pp-steps em { font-style: normal; font-weight: 700; color: var(--ink); }
.pp-miles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.pp-miles li { display: grid; gap: 1px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--edge); }
.pp-miles b { font-family: var(--display); font-size: 1.8rem; line-height: 1; color: #ffc49a; }
.pp-miles span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pp-miles em { font-style: normal; font-size: 0.88rem; margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pp-random.is-rolling span { animation: none; } .pp-game { transition: none; } }
