/* Pack opening: full-screen stage */
body[data-route="open"] .topbar, body[data-route="open"] .subtabs, body[data-route="open"] .sitefoot { display: none; }
body[data-route="open"] { padding: 0; overflow-x: hidden; }
body[data-route="open"] main { padding: 0; max-width: none; }
.opening { --fx: #35d4ff; position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; overflow: hidden; background: #040405; color: #fff; }
.op-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, #1b2030, #040405 70%); }
.op-bg.art { background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.78)), var(--asset-backdrop-arena) center/cover; }
.rays-wrap { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none; -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 46%); mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 46%); }
.rays { position: absolute; left: 50%; top: 42%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; will-change: transform; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--fx) 45%, transparent) 0 4deg, transparent 4deg 16deg); animation: spin 40s linear infinite; }
.stage-card .rays-wrap, .stage-teaser .rays-wrap, .ripped .rays-wrap { opacity: .7; }
.stage-hold.holding .rays-wrap { opacity: .25; }
@keyframes spin { to { transform: rotate(360deg); } }
.fog { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none; background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--fx) 30%, #0a2a2a) 0, transparent 68%); opacity: .7; }
.op-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; padding: 1.4rem 1.8rem; }
.op-top h2 { font-size: 1.35rem; }
.op-top p { margin: .2rem 0 0; color: #b5b9c4; font-size: .9rem; }
.op-ctl { display: flex; gap: .6rem; align-items: center; }
.op-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: rgba(20,20,22,.78); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: .65rem 1.3rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.op-btn:hover { background: rgba(60,60,66,.75); }
.op-btn.light { background: #f4f4f6; color: #0b0b0b; border-color: transparent; }
.op-btn.light:hover { background: #fff; }
.op-btn.big { padding: .95rem 2rem; font-size: 1.05rem; }
.op-x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(20,20,22,.7); border: 0; color: #fff; cursor: pointer; }
.op-stage { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 0 1.4rem 2rem; }

/* foil rip */
.rip { position: relative; width: min(250px, 62vw); will-change: transform; transform-origin: 50% 85%; touch-action: none; user-select: none; cursor: pointer; }
.rip-body, .rip-slice { position: absolute; inset: 0; background: linear-gradient(160deg, #ff9a3d, #c2410c 60%, #7c2d12) center / 100% 100% no-repeat; }
.rip-body { z-index: 2; }
.rip-slice { z-index: 5; transition: transform .1s linear, opacity .65s ease-in; will-change: transform; }
.ripped .rip-slice { transition: transform .75s cubic-bezier(.25,.1,.55,1), opacity .75s ease-in .1s; }
.rip-cards { position: absolute; left: 13%; width: 74%; top: 14%; height: 66%; z-index: 1; }
.rip-cards i { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 5 / 7; border-radius: 6% / 4.5%; background: #14171d center / 100% 100% no-repeat; border: 1px solid #3a3f4d; transform: translateY(0); transition: transform .9s cubic-bezier(.2,.9,.25,1.1); }
.ripped .rip-cards i:nth-child(1) { transform: translate(-14%, -78%) rotate(-9deg); transition-delay: .25s; }
.ripped .rip-cards i:nth-child(2) { transform: translate(0, -92%) rotate(1deg); transition-delay: .35s; }
.ripped .rip-cards i:nth-child(3) { transform: translate(14%, -78%) rotate(9deg); transition-delay: .45s; }
.rip-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; overflow: visible; pointer-events: none; }
.rip-line polyline { fill: none; stroke: #fff6dc; stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }
.rip-glow { position: absolute; left: -2%; right: -2%; top: calc(8.5% - 16px); height: 32px; z-index: 3; transform-origin: 0 50%; transform: scaleX(0); opacity: 0; border-radius: 50%; background: radial-gradient(ellipse at center, #fff 0, #ffc46a 38%, transparent 72%); }
.rip-burst { position: absolute; left: 50%; top: 8.5%; width: 260%; aspect-ratio: 1; margin: -130% 0 0 -130%; z-index: 4; pointer-events: none; opacity: 0; transform: scale(.08); background: radial-gradient(circle, #fff 0, #fff 6%, color-mix(in srgb, #ffb347 70%, transparent) 20%, transparent 56%); }
.ripped .rip-burst { animation: ripburst 1s ease-out forwards; }
@keyframes ripburst { 0% { opacity: 1; transform: scale(.08); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.ripped .rip-glow { transition: opacity .5s; opacity: 0 !important; }
.holdbtn { position: relative; width: 92px; height: 92px; border-radius: 50%; border: 0; background: rgba(12,12,14,.85); color: #fff; font-weight: 900; letter-spacing: .12em; cursor: pointer; display: grid; place-items: center; touch-action: none; }
.holdbtn svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.holdbtn circle { fill: none; stroke-width: 3; }
.holdbtn .track { stroke: rgba(255,255,255,.18); }
.holdbtn .ringbar { stroke: #4aa3ff; stroke-linecap: round; }
.hint { margin: 0; color: #d4d7de; }
.skip { margin-top: 1.2rem; }

/* teaser */
.tunnel { background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--fx) 70%, #fff) 0, color-mix(in srgb, var(--fx) 40%, transparent) 14%, transparent 48%); }
.tunnel-light { position: absolute; left: 50%; top: 44%; width: 46vmin; height: 46vmin; transform: translate(-50%, -50%); background: radial-gradient(circle, #fff 0, color-mix(in srgb, var(--fx) 80%, #fff) 28%, transparent 66%); animation: pulse 1.3s ease-in-out infinite; border-radius: 50%; }
@keyframes pulse { 50% { transform: translate(-50%, -50%) scale(1.15); } }
.teaser-letters { position: relative; font-size: clamp(5rem, 22vmin, 12rem); font-weight: 900; letter-spacing: .04em; text-shadow: 0 0 40px rgba(0,0,0,.6); animation: letters .5s ease-out; }
@keyframes letters { from { opacity: 0; transform: scale(1.7); } }

/* card */
.cardstage { flex-direction: row; gap: 3.5rem; flex-wrap: wrap; }
.bigcard { position: relative; width: min(300px, 62vw); cursor: pointer; }
.bigcard::before { content: ""; position: absolute; inset: -18%; z-index: -1; background: radial-gradient(circle, color-mix(in srgb, var(--fx) 55%, transparent) 0, transparent 66%); }
.bigcard .ucard.size-lg { max-width: none; }
.flash::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--fx) 60%, #fff), transparent 65%); animation: fl 1.2s ease-out forwards; }
@keyframes fl { 0% { opacity: 0; } 15% { opacity: .9; } 100% { opacity: 0; } }
.bestpanel { width: min(360px, 90vw); background: rgba(14,14,16,.9); border: 1px solid rgba(255,255,255,.14); border-radius: 24px; padding: 1.3rem; text-align: left; display: grid; gap: .8rem; }
.bp-label { margin: 0; font-size: .82rem; color: #c3c7d2; font-weight: 700; }
.tpill { display: inline-block; background: color-mix(in srgb, var(--tier) 25%, #111); color: var(--tier); border: 1px solid var(--tier); border-radius: 99px; padding: .12rem .65rem; font-size: .75rem; font-weight: 800; }
.bp-card { display: flex; gap: .9rem; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: #23252d; overflow: hidden; flex: none; display: grid; place-items: end center; }
.avatar img { width: 130%; max-width: none; }
.bp-card h3 { font-size: 1.15rem; } .bp-card p { margin: .1rem 0 .35rem; color: #b5b9c4; font-size: .9rem; }
.bp-new { margin: 0; color: #b5b9c4; font-size: .9rem; } .bp-new.new { color: var(--good); font-weight: 700; }
.bp-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.bp-count { margin: 0; color: #868b98; font-size: .8rem; }

/* grid reveal */
.gridstage { justify-content: flex-start; overflow-y: auto; padding-top: .4rem; }
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 190px)); gap: 1rem; justify-content: center; width: 100%; margin: auto 0; }
.reveal-grid.many { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-width: 1100px; }
.reveal-grid .slot { overflow: visible; }
.reveal-grid .slot.tierfx-hof .face { box-shadow: 0 0 30px 3px rgba(53,212,255,.7); }
.reveal-grid .slot.tierfx-franchise .face { box-shadow: 0 0 36px 5px rgba(255,61,139,.8); }
.op-actions { display: flex; gap: .6rem; justify-content: center; padding: 1rem 0; }

/* haul */
.haul { flex-direction: row; align-items: flex-start; justify-content: center; gap: 2.2rem; overflow-y: auto; width: 100%; padding-top: .4rem; }
.haul-left { width: min(420px, 100%); display: grid; gap: 1rem; text-align: left; flex: none; }
.haul-left h1 { font-size: 2.2rem; }
.bestbox { display: flex; gap: 1rem; align-items: center; background: rgba(14,14,16,.78); border: 2px solid transparent; border-radius: 24px; padding: 1rem; background-clip: padding-box; box-shadow: 0 0 0 2px var(--tier, #fff), 0 0 30px color-mix(in srgb, var(--tier, #fff) 40%, transparent); }
.bb-card { width: 130px; flex: none; } .bb-card .ucard.size-md { max-width: none; }
.bb-info small { color: #b5b9c4; } .bb-info h3 { font-size: 1.2rem; margin: .2rem 0; } .bb-info p { margin: 0 0 .3rem; color: #b5b9c4; } .bb-info b { font-size: 2.6rem; }
.hstats { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: #c3c7d2; } .hstats b { color: #fff; }
.tbadges { display: flex; flex-wrap: wrap; gap: .4rem; }
.haul-left .op-btn { justify-self: start; }
.haul-grid { flex: 1; max-width: 760px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.haul-grid:not(.many) { grid-template-columns: repeat(auto-fill, minmax(130px, 150px)); }

@media (max-width: 800px) {
  .cardstage { flex-direction: column; gap: 1.2rem; overflow-y: auto; justify-content: flex-start; }
  .haul { flex-direction: column; align-items: center; }
  .op-top { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rays, .tunnel-light { animation: none; }
}
