/* Vault pack opening (shared by qtb.cards and the Twitch panel) */
.vr { --gold: #e8bf4a; --navy: #0d1b3a; position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center;
  padding: 14px 14px 22px; color: #f6eedb; font-family: inherit; overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, rgba(232,191,74,0.18), rgba(8,7,5,0.94) 55%), rgba(8,7,5,0.94); animation: vr-in .25s ease both; }
.vr.vr-out { animation: vr-fade .22s ease both; }
@keyframes vr-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vr-fade { to { opacity: 0; } }
.vr-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.vr-flash { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0;
  background: conic-gradient(from 0deg, #ff6b6b, #ffd93d, #6bff95, #5fd3ff, #b36bff, #ff6b6b); mix-blend-mode: screen; }
.vr.vr-flashing .vr-flash { animation: vr-flash .9s ease-out; }
@keyframes vr-flash { 0% { opacity: .75; } 100% { opacity: 0; } }
.vr.vr-charge .vr-pack { animation: vr-shake .12s linear infinite; filter: drop-shadow(0 0 26px rgba(255,217,61,.9)); }
.vr-top { width: 100%; max-width: 520px; display: flex; justify-content: space-between; align-items: center; z-index: 4; min-height: 30px; }
.vr-step { font-size: 13px; color: #c9bb98; letter-spacing: .04em; }
.vr-skip, .vr-btn { font: inherit; cursor: pointer; border-radius: 999px; }
.vr-skip { background: none; border: 1px solid rgba(255,255,255,.25); color: #e9dfc6; padding: 4px 12px; font-size: 13px; }
.vr-btn { background: var(--gold); color: #1b1408; border: 0; padding: 11px 26px; font-weight: 800; font-size: 16px; box-shadow: 0 6px 22px rgba(232,191,74,.35); }
.vr-btn:focus-visible, .vr-skip:focus-visible { outline: 2px solid #fff4d6; outline-offset: 3px; }
.vr-pack:focus { outline: none; }
.vr-pack:focus-visible { box-shadow: inset 0 0 0 2px rgba(232,191,74,.85), inset 0 0 0 7px rgba(13,27,58,.9), inset 0 0 0 8px rgba(232,191,74,.45), 0 0 0 3px rgba(255,244,214,.7), 0 18px 50px rgba(0,0,0,.6); }
.vr-stage { --w: min(58vw, 250px); position: relative; width: var(--w); aspect-ratio: 245 / 342; align-self: center; z-index: 4; perspective: 1100px; margin: 8px 0; }
.vr-cap { z-index: 4; text-align: center; min-height: 92px; max-width: 520px; }
.vr-btns { z-index: 4; min-height: 46px; }
.vr-hint { color: #c9bb98; font-size: 14px; animation: vr-pulse 1.4s ease-in-out infinite; }
@keyframes vr-pulse { 50% { opacity: .45; } }
.vr-name { font-size: 20px; font-weight: 800; margin-top: 4px; }
.vr-set { color: #bfb196; font-size: 13.5px; margin-top: 2px; }
.vr-val { font-size: 22px; font-weight: 900; margin-top: 4px; color: var(--gold); }
.vr-tag { display: inline-block; font-weight: 900; letter-spacing: .08em; font-size: 14px; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }
.vr-tag.t-epic, .vr-val.t-epic { color: #d6a3ff; } .vr-tag.t-legend, .vr-val.t-legend { color: #ffe08a; } .vr-tag.t-rare, .vr-val.t-rare { color: #9fd1ff; }
.vr-tag.t-god { color: #1b1408; font-size: 18px; background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bff95, #5fd3ff, #b36bff); background-size: 200% 100%; animation: vr-rainbow 1.6s linear infinite; }
.vr-val.t-god { background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bff95, #5fd3ff, #b36bff); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: vr-rainbow 1.6s linear infinite; }
@keyframes vr-rainbow { to { background-position: 200% 0; } }

/* the pack */
.vr-pack { position: absolute; inset: -4% -3%; border: 0; padding: 0; cursor: pointer; color: #fff4d6; border-radius: 10px; overflow: hidden; z-index: 2;
  background: linear-gradient(160deg, #1d3a7a 0%, #0d1b3a 45%, #152a5c 100%);
  box-shadow: inset 0 0 0 2px rgba(232,191,74,.85), inset 0 0 0 7px rgba(13,27,58,.9), inset 0 0 0 8px rgba(232,191,74,.45), 0 18px 50px rgba(0,0,0,.6);
  animation: vr-float 2.6s ease-in-out infinite; transition: transform .45s ease, opacity .45s ease; }
@keyframes vr-float { 50% { transform: translateY(-6px) rotate(-1deg); } }
@keyframes vr-shake { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-3px,1px) rotate(-1.5deg); } 75% { transform: translate(3px,-1px) rotate(1.5deg); } }
.vr-crimp { position: absolute; left: 0; right: 0; height: 7%; background: repeating-linear-gradient(90deg, #c9a03a 0 3px, #f6dc8a 3px 6px); opacity: .9; }
.vr-crimp.top { display: none; } .vr-crimp.bottom { bottom: 0; }
.vr-tear { position: absolute; left: 0; right: 0; top: 7%; height: 2px; background: rgba(255,255,255,.0); }
.vr-emblem { position: absolute; left: 50%; top: 22%; width: 46%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, #f6dc8a 0 12%, #0d1b3a 13% 30%, #e8bf4a 31% 35%, #0d1b3a 36% 58%, #e8bf4a 59% 64%, transparent 65%); filter: drop-shadow(0 0 10px rgba(232,191,74,.45)); }
.vr-emblem i { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, transparent 0 40deg, rgba(232,191,74,.85) 40deg 45deg); mask: radial-gradient(circle, transparent 0 36%, #000 37% 57%, transparent 58%); -webkit-mask: radial-gradient(circle, transparent 0 36%, #000 37% 57%, transparent 58%); }
.vr-word { position: absolute; left: 0; right: 0; top: 63%; font-weight: 900; font-size: calc(var(--w) * 0.12); line-height: .95; letter-spacing: .04em; text-align: center;
  background: linear-gradient(180deg, #fff4c7, #e8bf4a 60%, #b8862a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vr-sub { position: absolute; left: 8%; right: 8%; bottom: 10%; font-size: 11px; color: #cdbf9c; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-gleam { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 48%, transparent 60%); background-size: 250% 100%; animation: vr-gleam 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes vr-gleam { 0% { background-position: 150% 0; } 60%,100% { background-position: -100% 0; } }
.vr-pack::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12%; z-index: 3; border-bottom: 2px dashed rgba(246,220,138,.6);
  background: repeating-linear-gradient(90deg, #c9a03a 0 3px, #f6dc8a 3px 6px) top / 100% 58% no-repeat, linear-gradient(160deg, #1d3a7a, #10224a); transition: transform .5s cubic-bezier(.3,.7,.3,1), opacity .5s; }
.vr-pack.torn { animation: none; }
.vr-pack.torn::before { transform: translate(40%, -160%) rotate(24deg); opacity: 0; }
.vr-pack.torn .vr-crimp.top { transform: translate(40%, -300%) rotate(24deg); opacity: 0; transition: transform .5s, opacity .5s; }
.vr-pack.torn::after { content: ""; position: absolute; left: 10%; right: 10%; top: 4%; height: 26%; z-index: 4; background: radial-gradient(ellipse at 50% 0%, rgba(255,240,190,.95), transparent 70%); animation: vr-leak .6s ease-out both; }
@keyframes vr-leak { from { opacity: 0; } to { opacity: 1; } }
.vr-pack.gone { transform: translateY(70%) scale(.92); opacity: 0; pointer-events: none; }

/* the card */
.vr-card { position: absolute; inset: 0; z-index: 1; transform: translateY(18%) scale(.9); opacity: 0; transition: transform .55s cubic-bezier(.2,.9,.25,1.15), opacity .3s; }
.vr-card.vr-rise, .vr-card.vr-show { z-index: 5; transform: translateY(0) scale(1); opacity: 1; }
.vr-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.6,.25,1); transform: rotateY(180deg); }
.vr-card.vr-flipped .vr-flip { transform: rotateY(0deg); }
.vr-back, .vr-front { position: absolute; inset: 0; border-radius: 4.5% / 3.2%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.vr-back { transform: rotateY(180deg); background: radial-gradient(circle at 50% 50%, #f6dc8a 0 6%, #0d1b3a 7% 16%, #e8bf4a 17% 19%, #0d1b3a 20% 30%, #e8bf4a 31% 33%, transparent 34%), linear-gradient(160deg, #1d3a7a, #0d1b3a);
  box-shadow: inset 0 0 0 6px #e8bf4a, inset 0 0 0 9px #0d1b3a; }
.vr-front { background: #1a1610; }
.vr-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vr-noart { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: 6px; padding: 12px; background: linear-gradient(160deg, #2a2418, #151109); box-shadow: inset 0 0 0 3px #8c6a22; }
.vr-noart span { color: #bfb196; font-size: 12px; }
.vr-shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, rgba(170,220,255,.35) 50%, transparent 62%); background-size: 260% 100%; }
.vr-card.vr-glow .vr-shine { opacity: 1; animation: vr-sweep 2.2s ease-in-out .3s infinite; }
@keyframes vr-sweep { 0% { background-position: 150% 0; } 70%,100% { background-position: -110% 0; } }
.vr-card.t-common.vr-glow .vr-shine { animation-iteration-count: 1; }
.vr-card.vr-glow.t-uncommon { filter: drop-shadow(0 0 14px rgba(91,212,140,.55)); }
.vr-card.vr-glow.t-rare { filter: drop-shadow(0 0 18px rgba(80,160,255,.7)); }
.vr-card.vr-glow.t-epic { filter: drop-shadow(0 0 24px rgba(176,107,255,.8)); }
.vr-card.vr-glow.t-legend { filter: drop-shadow(0 0 30px rgba(255,207,74,.9)); }
.vr-card.vr-glow.t-god { animation: vr-godglow 1.6s linear infinite; }
@keyframes vr-godglow { 0% { filter: drop-shadow(0 0 30px #ff6b6b); } 25% { filter: drop-shadow(0 0 34px #ffd93d); } 50% { filter: drop-shadow(0 0 34px #6bff95); } 75% { filter: drop-shadow(0 0 34px #5fd3ff); } 100% { filter: drop-shadow(0 0 30px #ff6b6b); } }
.vr-card.t-legend .vr-shine, .vr-card.t-god .vr-shine { mix-blend-mode: overlay;
  background: linear-gradient(115deg, transparent 20%, rgba(255,110,110,.55) 32%, rgba(255,230,90,.55) 40%, rgba(110,255,150,.5) 48%, rgba(95,210,255,.55) 56%, rgba(180,110,255,.55) 64%, transparent 76%); background-size: 260% 100%; }
.vr-card.vr-glow.t-legend::before, .vr-card.vr-glow.t-god::before { content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,224,138,.22) 0 10deg, transparent 10deg 20deg); animation: vr-spin 9s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 68%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 68%); }
.vr-card.vr-glow.t-god::before { background: repeating-conic-gradient(from 0deg, rgba(255,107,107,.3) 0 8deg, rgba(255,217,61,.3) 8deg 16deg, rgba(107,255,149,.3) 16deg 24deg, rgba(95,211,255,.3) 24deg 32deg, rgba(179,107,255,.3) 32deg 40deg); }
@keyframes vr-spin { to { transform: rotate(360deg); } }

/* box summary */
.vr-stage.vr-sum { width: min(94vw, 560px); aspect-ratio: auto; perspective: none; }
.vr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.vr-mini { display: flex; flex-direction: column; gap: 4px; align-items: center; animation: vr-in .3s ease both; }
.vr-mini img, .vr-mini .vr-noart { width: 100%; aspect-ratio: 245 / 342; object-fit: cover; border-radius: 5px; font-size: 10px; }
.vr-mini span { font-weight: 800; color: #e8bf4a; font-size: 13px; }
.vr-mini.t-legend img, .vr-mini.t-god img { box-shadow: 0 0 0 2px #ffe08a, 0 0 18px rgba(255,207,74,.7); }
.vr-mini.t-epic img { box-shadow: 0 0 0 2px #d6a3ff; }

/* small screens (the Twitch panel is 318 px wide) */
@media (max-width: 360px), (max-height: 560px) { .vr { padding: 6px 8px 10px; grid-template-rows: auto minmax(0, 1fr) auto auto; } .vr-stage { --w: 128px; margin: 4px 0; } .vr-cap { min-height: 0; margin-bottom: 6px; }
  .vr-name { font-size: 15px; margin-top: 2px; } .vr-set { font-size: 12px; } .vr-val { font-size: 17px; margin-top: 2px; } .vr-tag { font-size: 12px; } .vr-tag.t-god { font-size: 14px; } .vr-btns { min-height: 40px; } .vr-btn { padding: 8px 20px; font-size: 14px; } .vr-hint { font-size: 13px; }
  .vr-stage.vr-sum { width: 100%; } .vr-grid { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; } }
.vr-still *, .vr-still { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .vr *, .vr { animation: none !important; transition: none !important; } }
