/* rip/pack-page.css — THE REDESIGNED PACK PAGE (15 Nov 2026), on every universe (rip/lib/universe-page.tpl.php).
   Aaron: "Some pages are very clogged and have too much. Need to include everything important but try to simplify and
   reduce the pages, link features better etc." … "I want it all done first."
   One order for every universe, set here with `order` (the open view is a flex column; on a PC it is `display:contents`
   inside the page grid, which honours `order` too), so no module's own host moves in the DOM:
     the pack · your progress (Collected · Quests · Streak) · This pack · Get more pulls · Biggest pulls today · shortcuts.
   The quests, streak and collection boxes fold under the progress tiles; "Get more pulls" is one card for the three
   places that offered a Short or an invite. rip/pack-page.js fills the tiles and wires the folds. */

/* ── page order ─────────────────────────────────────────────────────────────────────────────────────── */
main.fp-host > .fp-view[data-view="open"] > #pd-strip      { order: 10; }
main.fp-host > .fp-view[data-view="open"] > #rip-missions,
main.fp-host > .fp-view[data-view="open"] > #sim-streak    { order: 11; }
main.fp-host > .fp-view[data-view="open"] > #sim-account-pitch,
main.fp-host > .fp-view[data-view="open"] > .fp-note-sm    { order: 15; }   /* a new visitor: why to join, straight under the pack */
main.fp-host > .fp-view[data-view="open"] > #fp-odds-sec   { order: 20; }
main.fp-host > .fp-view[data-view="open"] > #rip-capped,
main.fp-host > .fp-view[data-view="open"] > #pd-more       { order: 30; }
main.fp-host > .fp-view[data-view="open"] > #sim-setup     { order: 35; }
main.fp-host > .fp-view[data-view="open"] > #pd-big        { order: 40; }
main.fp-host > .fp-view[data-view="open"] > #pd-quick      { order: 50; }
main.fp-host > .fp-view[data-view="open"] > #fp-wall       { order: 60; }
/* On a PC the open view's children are the page grid's own items, so everything after the open view keeps its place
   after them (the grid would otherwise put order 0 — the channel and the About box — before order 10). */
@media (min-width: 1100px) {
  main.fp-wrap.fp-host > .fp-view.fp-channel, main.fp-wrap.fp-host > .fp-view.fp-facts,
  main.fp-wrap.fp-host > .fp-view:not([data-view="open"]) { order: 90; }
}

/* ── folded away, kept in the DOM (their painters still write to them) ──────────────────────────────── */
#fp-wall, #fp-w2e { display: none !important; }
#rip-missions:not(.pd-open), #sim-streak:not(.pd-open) { display: none !important; }
/* the streak's own "Watch a Short" — "Get more pulls" says it once */
#sim-streak .rip-streak-w2e { display: none !important; }
/* the setup card's invite row is "Get more pulls"'s; the card stays only for what it alone offers (notifications, a photo) */
#sim-setup a.su-row[href*="referrals"] { display: none !important; }
#sim-setup:not(:has(#su-push, a.su-row[href*="avatar"], .d2-card, [class*="day2"])) { display: none !important; }

/* ── shared card look ───────────────────────────────────────────────────────────────────────────────── */
.pd-card, #fp-odds-sec.pd-thispack, .pd-big, .pd-about {
  box-sizing: border-box; width: 100%; max-width: 600px; margin: 0 auto; text-align: left;
  font-family: var(--rip-body, system-ui, sans-serif); color: var(--rip-fg, #eef3f9);
}
.pd-card, #fp-odds-sec.pd-thispack {
  border-radius: 16px; padding: 16px;
  background: linear-gradient(180deg, var(--rip-panel-2, #18202c), var(--rip-panel, #111721));
  border: 1px solid var(--rip-line, rgba(255,255,255,.075));
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.pd-card h3, .pd-big h3, #fp-odds-sec.pd-thispack > .fp-h2 {
  margin: 0 0 2px; font: 800 17px/1.2 var(--rip-display, system-ui); letter-spacing: -.01em; color: var(--rip-fg, #fff); text-align: left;
}
.pd-sub, .pd-tp-line { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--rip-fg-2, #97a4b8); }

/* ── your progress: three tiles ─────────────────────────────────────────────────────────────────────── */
.pd-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 600px; margin: 0 auto; box-sizing: border-box; }
.pd-tile {
  position: relative; display: block; min-width: 0; box-sizing: border-box; margin: 0; padding: 12px 10px 11px;
  border-radius: 14px; text-align: left; text-decoration: none !important; cursor: pointer;
  font-family: var(--rip-body, system-ui); color: var(--rip-fg, #fff);
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10);
  transition: border-color .2s ease, background-color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pd-tile:hover { border-color: color-mix(in srgb, var(--rip-uni, #2ee6d6) 55%, transparent); }
.pd-tile:focus-visible { outline: 2px solid var(--rip-act, #2ee6d6); outline-offset: 2px; }
.pd-tile[aria-expanded="true"] { border-color: color-mix(in srgb, var(--rip-uni, #2ee6d6) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rip-uni, #2ee6d6) 16%, transparent), rgba(255,255,255,.02)); }
.pd-tile i { display: block; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--rip-uni, #2ee6d6) 55%, #fff); margin: 0 18px 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-tile b { display: block; font: 800 18px/1.15 var(--rip-display, system-ui); letter-spacing: -.01em; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pd-tile small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.3; color: var(--rip-fg-2, #97a4b8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-tile u { position: absolute; right: 9px; top: 8px; text-decoration: none; color: var(--rip-fg-3, #66738a); font-size: 13px; line-height: 1; transition: transform .2s ease; }
.pd-tile[aria-expanded="true"] u { transform: rotate(180deg); }
.pd-bar { display: block; height: 4px; margin-top: 8px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.pd-bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--rip-uni, #2ee6d6); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.pd-tile.is-pop { animation: pdPop 1.1s ease-out; }
@keyframes pdPop { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rip-uni, #2ee6d6) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.pd-tile .pd-done { color: #5eead4; }
/* an opened fold sits right under the tiles, sharing their width */
#rip-missions.pd-open > .rip-panel, #sim-streak.pd-open { margin-top: 0 !important; }
#rip-missions.pd-open, #sim-streak.pd-open { width: 100%; max-width: 600px; margin-left: auto; margin-right: auto; animation: pdFold .28s ease-out; }
#rip-missions.pd-open > .rip-panel { margin-bottom: 0 !important; }
@keyframes pdFold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── This pack ──────────────────────────────────────────────────────────────────────────────────────── */
#fp-odds-sec.pd-thispack > .fp-h2 { margin-bottom: 10px; }
#fp-odds-sec.pd-thispack > .pd-tp-line { margin: -6px 0 6px; }
#fp-odds-sec.pd-thispack #op-odds { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; max-width: none; }
#fp-odds-sec.pd-thispack #op-odds .op-odds__card { padding: 0; margin: 0; background: none; border: 0; box-shadow: none; }
#fp-odds-sec.pd-thispack #op-odds .op-odds__eyebrow { margin: 0 0 8px; }
#fp-odds-sec.pd-thispack .slim-toggle { margin: 8px 0 0; padding: 10px 4px 2px; border-top: 1px solid var(--rip-line, rgba(255,255,255,.075)); }
#fp-odds-sec.pd-thispack table.fp-odds { margin-top: 6px; }
.pd-prize {
  display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 11px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(251,191,36,.17), rgba(251,191,36,.05));
  border: 1px solid rgba(251,191,36,.38); color: #fde68a !important; text-decoration: none !important;
  font: 700 13.5px/1.35 var(--rip-body, system-ui);
}
.pd-prize small { display: block; margin-top: 1px; font-weight: 600; font-size: 12px; color: #fcd34d; opacity: .85; }
.pd-prize__ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(251,191,36,.18); color: #fbbf24; }
.pd-prize__ico svg { width: 20px; height: 20px; }

/* ── Get more pulls (and the out-of-pulls box, which takes its place when capped) ─────────────────────── */
.pd-row {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; margin: 8px 0 0; padding: 12px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.045);
  color: var(--rip-fg, #fff) !important; text-decoration: none !important; text-align: left; cursor: pointer;
  font: inherit; transition: border-color .2s ease, background-color .2s ease;
}
.pd-row[hidden] { display: none; }
.pd-row:hover { border-color: color-mix(in srgb, var(--rip-uni, #2ee6d6) 55%, transparent); background: rgba(255,255,255,.07); }
.pd-row:focus-visible { outline: 2px solid var(--rip-act, #2ee6d6); outline-offset: 2px; }
.pd-row > span:nth-child(2) { flex: 1; min-width: 0; }
.pd-row b { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.25; }
.pd-row small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.3; color: var(--rip-fg-2, #97a4b8); }
.pd-row em { flex: none; white-space: nowrap; font-style: normal; font-weight: 800; font-size: 12.5px; line-height: 1;
  color: #04201d; background: var(--rip-act, #2ee6d6); padding: 7px 10px; border-radius: 999px; }
.pd-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 15px; }
.pd-ico svg { width: 20px; height: 20px; }
.pd-ico--play { color: #fff; background: linear-gradient(135deg, #fb923c, #e11d48); box-shadow: 0 4px 14px rgba(225,29,72,.35); }
.pd-ico--friend { color: #5eead4; background: rgba(46,230,214,.14); }
/* the out-of-pulls box in the same card look */
main.fp-host #rip-capped { width: 100%; max-width: 600px; margin: 0 auto; box-sizing: border-box; }

/* ── Biggest pulls today ────────────────────────────────────────────────────────────────────────────── */
.pd-big[hidden] { display: none; }
.pd-big-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scroll-snap-type: x proximity;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pd-big-row::-webkit-scrollbar { display: none; }
.pd-big-row > figure { flex: 0 0 106px; min-width: 0; margin: 0; scroll-snap-align: start; }
.pd-big-row img { display: block; width: 106px; height: 148px; object-fit: cover; border-radius: 8px; background: var(--rip-panel-2, #18202c);
  box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: transform .2s ease; }
.pd-big-row img.is-land { object-fit: contain; }
.pd-big-cap { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.3; color: var(--rip-fg-2, #c9d4e2); }
.pd-big-cap b { display: block; font-size: 13.5px; font-weight: 800; color: var(--rip-val, #f2b134); font-variant-numeric: tabular-nums; }
.pd-big-cap b.is-rar { color: color-mix(in srgb, var(--rip-uni, #2ee6d6) 60%, #fff); font-size: 12px; letter-spacing: .02em; }
.pd-big-cap span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-big-cap u { display: block; text-decoration: none; color: var(--rip-fg-3, #66738a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── the shortcuts ──────────────────────────────────────────────────────────────────────────────────── */
.pd-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 600px; margin: 0 auto; box-sizing: border-box; }
.pd-quick--guest { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pd-quick > a {
  display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 13px 4px 11px; border-radius: 14px;
  background: var(--rip-panel, #111721); border: 1px solid rgba(255,255,255,.08);
  color: var(--rip-fg, #e2e8f0) !important; text-decoration: none !important; text-align: center; font-family: var(--rip-body, system-ui);
  transition: border-color .2s ease, background-color .2s ease;
}
.pd-quick > a:hover { border-color: color-mix(in srgb, var(--rip-uni, #2ee6d6) 55%, transparent); background: var(--rip-panel-2, #18202c); }
.pd-quick svg { width: 22px; height: 22px; flex: none; color: var(--rip-act, #2ee6d6); }
.pd-quick b { font-size: 12.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.pd-quick small { font-size: 11px; line-height: 1.15; color: var(--rip-fg-2, #97a4b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* (The title's pulls-left chip went on 21 Nov 2026: the pulls are the Open button's second line, `data-sub`.) */

/* ⚠ THE INTRO STAYS TWO FULL LINES (page-slim.js): Aaron, 5 Nov 2026, "two lines, include the sets and any other very
   important info for search" — never clamped to one. */

/* ── Watch ──────────────────────────────────────────────────────────────────────────────────────────── */
main.fp-host #watch-real > h2 { font-size: 21px !important; text-align: left; margin-bottom: 4px !important; }
main.fp-host #watch-real > .rip-eyebrow { text-align: left; }
main.fp-host #watch-real { text-align: left !important; }
main.fp-host #rip-coming-up.pd-replay { display: none !important; }
/* the uploads: picture on top, the whole title under it (was a squeezed title beside a small thumbnail) */
main.fp-host #watch-real #ytl-grid > a.ytl-card { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; flex: 0 0 216px; width: 216px; }
main.fp-host #watch-real .ytl-card .ytl-thumb { width: 100%; }
main.fp-host #watch-real .ytl-card .ytl-title { font-size: 12.5px; -webkit-line-clamp: 2; }
main.fp-host #watch-real .ytl-card.ytl-skeleton { min-height: 0; aspect-ratio: 4 / 3; }
@media (min-width: 700px) {
  html.rip-slim main.fp-host #watch-real #ytl-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  main.fp-host #watch-real #ytl-grid > a.ytl-card { width: auto; }
}

/* ── About box: four rows that open in place ────────────────────────────────────────────────────────── */
.pd-about { margin-top: 8px; border-radius: 16px; border: 1px solid var(--rip-line-2, rgba(255,255,255,.12)); background: rgba(255,255,255,.025); overflow: hidden; }
.pd-about__h { margin: 0; padding: 15px 16px 11px; font: 800 16px/1.25 var(--rip-display, system-ui); color: var(--rip-fg, #fff); }
.pd-about .rip-hub { margin: 0; }
.pd-about .rip-hub__crumbs { margin: 0; padding: 0 16px 12px; }
.pd-about .rip-hub__faq, .pd-about details.fp-det, .pd-about #facts {
  margin: 0 !important; border: 0; border-top: 1px solid var(--rip-line, rgba(255,255,255,.08)); border-radius: 0; background: none; box-shadow: none;
}
.pd-about .rip-hub__faq summary, .pd-about details.fp-det > summary, html.rip-slim .pd-about #facts .slim-fold__h {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 14px 16px; cursor: pointer; list-style: none;
  font: 700 14.5px/1.3 var(--rip-body, system-ui); letter-spacing: 0; color: var(--rip-fg, #e2e8f0); text-align: left; background: none; border: 0;
}
.pd-about details.fp-det > summary::-webkit-details-marker { display: none; }
.pd-about .rip-hub__faq summary::after, .pd-about details.fp-det > summary::after, html.rip-slim .pd-about #facts .slim-fold__h::after {
  content: '\25BE'; color: var(--rip-act, #2ee6d6); font-size: 18px; transition: transform .2s;
}
.pd-about details[open] > summary::after { transform: rotate(180deg); }
.pd-about .rip-hub__packs > :not(summary) { margin-left: 16px; margin-right: 16px; }
.pd-about .rip-hub__packs > .rip-hub__h { margin-top: 2px; font-size: 14px; }
.pd-about .rip-hub__packs > .rip-hub__all { margin-bottom: 12px; }
.pd-about details.fp-det { padding: 0; }
.pd-about details.fp-det > :not(summary) { margin-left: 16px; margin-right: 16px; }
.pd-about #facts { padding: 0 !important; }
html.rip-slim .pd-about #facts.is-open > *:not(.slim-fold__h) { padding-left: 16px; padding-right: 16px; }
@media (prefers-reduced-motion: reduce) {
  .pd-tile, .pd-bar > span, .pd-tile u, .pd-row, .pd-quick > a { transition: none; }
  .pd-tile.is-pop, #rip-missions.pd-open, #sim-streak.pd-open { animation: none; }
}

/* ── tablet and PC ──────────────────────────────────────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .pd-tile { padding: 14px 14px 13px; }
  .pd-tile b { font-size: 20px; }
  .pd-quick:not(.pd-quick--guest) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pd-big-row > figure { flex-basis: 118px; }
  .pd-big-row img { width: 118px; height: 165px; }
}
@media (min-width: 1100px) {
  /* in the left column of the page grid: the column is ~548px, so the shortcuts go back to three across */
  .pd-quick:not(.pd-quick--guest) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* the page grid has no row gap (the head and the switcher set their own); the redesigned blocks space themselves */
  main.fp-wrap.fp-host :is(#pd-strip, #fp-odds-sec, #rip-capped, #pd-more, #sim-setup, #pd-big, #pd-quick, #sim-account-pitch, .fp-note-sm) { margin-top: 20px; }
  main.fp-wrap.fp-host :is(#rip-missions, #sim-streak).pd-open { margin-top: 10px; }
  main.fp-wrap.fp-host #op-tierhint { margin-top: 12px; }
  /* under the two columns the watch row and the About box take the page's whole width, edge to edge with the columns */
  main.fp-wrap.fp-host #watch-real, main.fp-wrap.fp-host #rip-coming-up { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  main.fp-wrap.fp-host .pd-about { max-width: none; }
}

/* ── the Lord race: two slim lines, its bar a hairline along the bottom edge (rip/lord-race.js paints it) ── */
main.fp-host ~ * #rip-lord-race, #rip-lord-race { margin-top: 4px; margin-bottom: 8px; }
#rip-lord-race .lr { padding: 8px 12px 9px 10px; gap: 10px; overflow: hidden; }
#rip-lord-race .lr-crest { width: 32px; height: 32px; max-width: 32px; max-height: 32px; }
#rip-lord-race .lr-eye { display: none; }
#rip-lord-race .lr-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
#rip-lord-race .lr-line { grid-column: 1; grid-row: 1; margin: 0; font-size: 14.5px; }
#rip-lord-race .lr-row { display: contents; }
#rip-lord-race .lr-you { grid-column: 2; grid-row: 1; font-size: 12px; }
#rip-lord-race .lr-msg { grid-column: 1 / -1; grid-row: 2; font-size: 12.5px; margin-top: 1px; }
#rip-lord-race .lr-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0; background: rgba(255,255,255,.07); }
#rip-lord-race .lr-go { font-size: 18px; }
/* the space it will take, held while lord-race.js asks the server (template: .lr-wait) */
#rip-lord-race.lr-wait:empty:not([hidden]) { display: block; min-height: 55px; box-sizing: border-box; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }

/* ══ THE DECLUTTERED PACK PAGE (21 Nov 2026) ════════════════════════════════════════════════════════════════════════
   Aaron: "My issue is just clutter... the eyes don't know where to look. Please consider how to fit in universe selection,
   tier selection, pack lord info and the set selection and opening buttons whilst keeping the pack as the main focus."
   One block (rip/lib/universe-page.tpl.php `main.pk-dc`), top to bottom, everything symmetric:
     .pk-top   two equal chips — the universe | the Lord (one chip, full width, with the race off)
     .fp-stage the pack, centred, as large as the screen allows
     the value line (#op-tierhint)
     .pk-ctl   two equal chips — the pack tier | the set (the set alone on a universe with one pack)
     the open bar (fixed, as before): Open pack, the pulls on its second line, ×10 beside it
   Each chip opens the pickers' one sheet (rip-ui.css .rip-upk / .pk-chip). The title and the description come after
   the block (`order`), so a reader still meets the <h1>. */
main.pk-dc { padding-top: 0; --pk-ob: 88px; }   /* --pk-ob: the open bar's height (a guest's carries the sign-in line) */
main.pk-dc.pk-dc--guest { --pk-ob: 134px; }
main.pk-dc > .pk-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%;
  max-width: 600px; margin: 10px auto 12px; box-sizing: border-box; }
/* ⚠ THE OPEN VIEW SPACES ITS BLOCKS WITH A 28 PX GAP (--rip-stack); inside the block the gaps are 10-12 px, so the block's
   own pieces take the gap back, and the tier mount that only holds a (closed) sheet takes no row at all. */
main.pk-dc > .pk-top + .fp-view, main.pk-dc > .pk-top ~ .fp-view[data-view="open"] { margin-top: 0; }
.pk-dc #op-tierbar:has(> .rip-upk--sheet) { display: contents; }
main.pk-dc > .pk-top.pk-top--one { grid-template-columns: minmax(0, 1fr); }
main.pk-dc > .pk-top > .rip-upk { margin: 0; min-width: 0; }
main.pk-dc > .pk-top > .rip-upk--sheet, .pk-dc .rip-upk--sheet { display: contents; }
#rip-lord-chip[hidden] { display: none; }
.pk-dc .fp-view[data-view="open"] > #op-tierhint, .pk-dc .fp-view[data-view="open"] > #fp-bonushint { order: 0; margin: 12px 0 0; text-align: center; }
.pk-dc .pk-ctl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%; max-width: 600px;
  margin: 12px auto 0; box-sizing: border-box; }
.pk-dc .pk-ctl.pk-ctl--one, .pk-dc .pk-ctl:has(> #set-pick-wrap[hidden]) { grid-template-columns: minmax(0, 1fr); }
.pk-dc .pk-ctl > #set-pick-wrap { margin: 0; min-width: 0; text-align: left; }
.pk-dc .pk-ctl > #set-pick-wrap[hidden] { display: none; }
.pk-dc .pk-sethint { margin: 8px auto 0; max-width: 36em; text-align: center; font-size: 13px; line-height: 1.45; color: var(--rip-fg-2, #97a4b8); }
.pk-dc .pk-sethint[hidden] { display: none; }
/* Phones and tablets: the open view is a flex column with a 28 px gap (--rip-stack); the block's own pieces take it back.
   From 1100 px the view is `display:contents` in the page grid (no gap), so the plain margins above stand. */
@media (max-width: 1099.98px) {
  .pk-dc .fp-view[data-view="open"] > #op-tierhint, .pk-dc .fp-view[data-view="open"] > #fp-bonushint { margin-top: calc(10px - var(--rip-stack, 28px)); }
  .pk-dc .pk-ctl { margin-top: calc(10px - var(--rip-stack, 28px)); }
  .pk-dc .pk-sethint { margin-top: calc(8px - var(--rip-stack, 28px)); }
}
@media (min-width: 1100px) {
  .pk-dc .fp-view[data-view="open"] > #op-tierhint, .pk-dc .fp-view[data-view="open"] > #fp-bonushint { text-align: left; }
  main.pk-dc > .pk-top { margin-top: 18px; }
}
/* the title and its line, after the block (the open view orders its children: pack-page.css "page order") */
main.pk-dc > .fp-view[data-view="open"] > .pk-head { order: 8; margin: 0 auto; width: 100%; max-width: 600px; }   /* the section rhythm (the view's gap) above it */
html.rip-slim main.pk-dc .pk-head { padding: 0; }
/* the pack: as large as the first screen allows — the space left by the header, the two chip rows, the value line, the
   open bar and the tab bar — between 300 px and its own 462 px tall (Pokémon's packs.htm size), width by its 260:462 shape */
@media (max-width: 480px) {
  /* 286 = header 60 + chips 10+60+12 + chips 10+60 + 10 above the bar + the tab bar 64; then the value line's room (32,
     on every universe, so the pack is the SAME size on all of them: universe-unity-check) and the bar; while a chosen
     set's hint shows under the chips, its height too (--pk-sh, set by set-picker.js roomForHint) */
  /* 21 Nov 2026, Aaron on a short phone (WWE, Magic): "The pack sized is fucked. Fix now". Shrinking the pack's BOX squeezed its
     260 px artwork and cut its text ("Magi"), and the chips still slid under the open bar. The pack now keeps its own
     260 x 462 layout and is ZOOMED as one piece (uni-picker.js pkFit measures the room left on the first screen; 1 when
     there is room or without JS, never below 0.6). */
  .pk-dc .fp-pack { width: 260px; height: auto; aspect-ratio: 260 / 462; zoom: var(--pk-z, 1); }
  .pk-dc .fp-stage { min-height: 0; }
  /* ⚠ FULL SIZE WHILE A PACK OPENS (Aaron, 21 Nov: "It starts too small, then gets bigger but still too small", and a dark
     glowing box beside the torn pack). The rip (pack-foil.js) mixes on-screen rects with the pack's own offsets, which a
     zoom pulls apart; the page is cleared while pulling, so the pack has the whole screen anyway. */
  body.sim-pulling .pk-dc .fp-pack { zoom: 1; }
  /* It GROWS to full size at the tap instead of snapping (Aaron, 21 Nov). 0.2 s, finished before the rip reads the pack's
     rectangle (pack-foil.js: 260 ms after the tear starts), so its glow and flap line up. ONLY WHILE PULLING: at rest the zoom
     must not animate, because uni-picker.js PACK FIT sets --pk-z:1 and measures in the same tick, and a running transition made it
     read the old zoom (the Set chip landed under the open bar on every universe; the sweep found it). */
  body.sim-pulling .pk-dc .fp-pack { transition: transform .35s ease, opacity .3s ease, zoom .2s cubic-bezier(.2, .7, .3, 1); }
  .pk-dc .pk-chip__txt b { overflow-wrap: normal; word-break: normal; overflow: hidden; text-overflow: ellipsis; }
  /* a universe without the value line (fun) keeps that room, split above and below the pack so it stays centred */
  main.pk-dc:not(:has(#op-tierhint)) .fp-stage { padding-block: 16px; }
  main.pk-dc:not(:has(#op-tierhint)) .fp-stage > .fp-sound { bottom: 22px; }
}
/* SHORT PHONES (the browser's bars leave ~690 px or less): every chip a little lower and the gaps tighter, so the pack keeps as
   much size as the first screen allows (Aaron, 21 Nov 2026, on a 390 x ~690 screen: "The pack sized is fucked"). */
@media (max-width: 480px) and (max-height: 760px) {
  .pk-dc .pk-chip { height: 50px; border-radius: 14px; }
  main.pk-dc > .pk-top { margin: 6px auto 8px; }
  .pk-dc .fp-view[data-view="open"] > #op-tierhint, .pk-dc .fp-view[data-view="open"] > #fp-bonushint { margin-top: calc(6px - var(--rip-stack, 28px)); }
  .pk-dc .pk-ctl { margin-top: calc(6px - var(--rip-stack, 28px)); }
  main.pk-dc:not(:has(#op-tierhint)) .fp-stage { padding-block: 6px; }
}
/* the sound toggle: a small round icon at the pack's lower right, never over a button */
.pk-dc .fp-stage > .fp-sound { position: absolute; top: auto; bottom: 6px; right: max(0px, calc(50% - 130px - 52px)); width: 40px; height: 40px;
  font-size: 15px; background: rgba(10,14,26,.82); box-shadow: 0 4px 14px rgba(0,0,0,.45); z-index: 4; }
/* the open bar: Open pack (the universe's colour) and ×10 on one row; the pulls are the button's second line */
body:has(> main.pk-dc) > .fp-openbar { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 10px; row-gap: 6px; justify-items: stretch;
  padding: 10px max(16px, calc(50% - 210px)) 14px;
  background: linear-gradient(to top, rgba(10,14,21,.98) 0%, rgba(10,14,21,.94) 78%, rgba(10,14,21,0) 100%); }
body:has(> main.pk-dc) > .fp-openbar:has(> .fp-cta--ten:not([hidden])) { grid-template-columns: minmax(0, 1fr) 84px; }
body:has(> main.pk-dc) > .fp-openbar > * { grid-column: 1 / -1; max-width: none; }
body:has(> main.pk-dc) > .fp-openbar > .fp-cta { grid-column: 1; padding: 12px 14px; line-height: 1.3; min-height: 60px; border-radius: 16px; }
body:has(> main.pk-dc) > .fp-openbar > .fp-cta--ten { grid-column: 2; padding: 8px 4px; }
body:has(> main.pk-dc) > .fp-openbar > .fp-cta--ten:not([hidden]) ~ * { grid-column: 1 / -1; }
.fp-cta[data-sub]:not([data-sub=""]):not(.is-capped)::after { content: attr(data-sub); display: block; margin-top: 2px;
  font: 700 12.5px/1.25 var(--rip-body, system-ui); letter-spacing: .01em; opacity: .88; }
body.sim-pulling .fp-cta[data-sub]::after { visibility: hidden; }

/* ⚠ THE SOUND BUTTON SITS BESIDE THE OPEN BAR ON A TABLET, NOT FLOATING ABOVE IT (16 Nov 2026, the tablet check). The
   floating button (fun-pack.css .fp-openbar > .fp-sound: 52 px above the bar) landed on the progress tiles under the
   pack — on Marvel at 820 px it covered the Streak tile's number. A tablet's bar has room either side of its 620 px
   row, so there the bar is a row and the button is its last item, centred on the controls. Phone (over the pack's
   corner) and PC (beside the pack column) keep the float. */
@media (min-width: 560px) and (max-width: 979px) {
  .fp-openbar { flex-direction: row; justify-content: center; align-items: center; gap: 10px; }
  .fp-openbar > .fp-sound { position: static; flex: 0 0 44px; top: auto; right: auto; }
}

/* ⚠ WHILE A PACK OPENS THE PICTURE RISES INTO THE HEADER'S STRIP (21 Nov 2026, Aaron: "Still shows an empty black space at the
   top"). The header fades out at the tap and its 60 px was plain black above the ground, which starts at var(--rh-h) when the
   header is showing (rip-ui.css). It glides up over the header's own 0.45 s fade and back down when the pull ends. */
@media (max-width: 759.98px) {
  body.rip-ui { transition: background-position .45s ease; }
  body.rip-ui.sim-pulling { background-position: 50% -8%, 50% 0, 50% 0; }
}
