/* Public cases site */

body {
  background:
    radial-gradient(ellipse 90% 520px at 50% 0, #0f2a40 0%, transparent 70%) no-repeat,
    var(--bg);
}

/* ---------- Top bar ---------- */
.nav { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: #080b10fa; }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { width: 40px; height: 40px; object-fit: cover; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.brand-name { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: .02em; }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a { padding: 8px 12px; color: var(--muted); font-family: var(--display); font-size: 17px; font-weight: 600; }
.nav-links a:hover { color: var(--text); }
.nav-side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 4px; border: 1px solid var(--line-2); background: var(--panel); }
.user-chip img { width: 30px; height: 30px; object-fit: cover; }
.user-chip span { max-width: 130px; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #080b10f5 0%, #080b10c4 46%, #080b1066 100%), linear-gradient(0deg, var(--bg) 0%, transparent 34%); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 56px; align-items: center; padding-block: 68px 76px; }
h1 {
  font-size: clamp(44px, 6.4vw, 86px);
  line-height: .94;
  letter-spacing: -.01em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #04121d) drop-shadow(0 12px 30px #2ea6f240);
}
.studio-chip { --state: var(--dim); display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 6px 12px 6px 10px; background: color-mix(in srgb, var(--state) 14%, #080b10cc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--state) 55%, transparent); font-size: 13.5px; font-weight: 500; }
.studio-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--state); box-shadow: 0 0 12px var(--state); }
.studio-chip.is-online { --state: var(--ok); }
.studio-chip.is-online i { animation: pulse 1.6s ease-in-out infinite; }
.studio-chip.is-offline { --state: var(--bad); }
.hero-lead { max-width: 56ch; margin-top: 22px; color: #c2cedb; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 13px; }

.hero-panel { --cut: 22px; padding: 26px; }
.hero-panel::before { background: linear-gradient(170deg, #121a24f2 0%, #0a0e14f2 100%); }
.guest-panel { text-align: center; }
.guest-panel .crate-art { width: min(300px, 82%); margin: -6px auto 4px; }
.guest-title { font-family: var(--display); font-size: 25px; font-weight: 700; }
.guest-text { max-width: 34ch; margin: 6px auto 0; color: var(--muted); font-size: 14px; }
.crate-float .crate-svg { animation: crate-float 5s ease-in-out infinite; }
@keyframes crate-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.member-top { display: flex; align-items: center; gap: 14px; }
.member-top img { width: 56px; height: 56px; object-fit: cover; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.member-name { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.1; }
.member-rank { color: var(--muted); font-size: 13px; }
.level-badge { display: grid; place-items: center; min-width: 74px; margin-left: auto; padding: 6px 10px 4px; background: linear-gradient(180deg, #17364e, #0b1c2a); box-shadow: inset 0 0 0 1px #2ea6f266; }
.level-badge span { color: var(--ice); font-size: 11px; }
.level-badge b { font-family: var(--display); font-size: 34px; line-height: 1; }
.xp-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.xp-bar { height: 12px; margin-top: 7px; background: #05080c; box-shadow: inset 0 0 0 1px var(--line-2); }
.xp-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #0f6aa8, #2ea6f2 70%, #c9ecff); box-shadow: 0 0 16px #2ea6f2aa; transition: width .9s var(--ease); }
.next-drop { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; background: #ffffff08; font-size: 14px; }
.next-drop .crate-art { width: 62px; flex: none; }
.next-drop b { display: block; font-family: var(--display); font-size: 18px; }
.next-drop span { color: var(--muted); font-size: 13px; }
.member-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 16px 0 0; background: var(--line); }
.member-stats div { padding: 10px 6px; background: #0b1017; text-align: center; }
.member-stats dt { color: var(--muted); font-size: 12px; }
.member-stats dd { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.1; }
.boost-line { margin-top: 12px; color: #ffc23d; font-size: 13px; }

/* ---------- Live drops ---------- */
.ticker { display: flex; align-items: stretch; height: 54px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #070a0f, #05070a); }
.ticker-label { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; flex: none; padding: 0 22px; border-right: 1px solid var(--line); background: #06090d; font-family: var(--display); font-size: 16px; font-weight: 700; box-shadow: 14px 0 22px #05070a; }
.ticker-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 10px var(--bad); animation: pulse 1.6s ease-in-out infinite; }
.ticker-label.is-live { animation: label-flash 1.4s ease-out; }
@keyframes label-flash { 0% { color: #ffc23d; text-shadow: 0 0 18px #ffc23d; } 100% { color: var(--text); text-shadow: none; } }
@keyframes pulse { 50% { opacity: .35; } }
.ticker-window { position: relative; flex: 1; overflow: hidden; contain: layout paint; }
.ticker-window::before, .ticker-window::after { content: ''; position: absolute; top: 0; bottom: 0; z-index: 1; width: 70px; pointer-events: none; }
.ticker-window::before { left: 0; background: linear-gradient(90deg, #06080c, #06080c00); }
.ticker-window::after { right: 0; background: linear-gradient(270deg, #06080c, #06080c00); }
.ticker-track { display: flex; align-items: center; width: max-content; height: 100%; padding-left: 18px; will-change: transform; }
.tick { position: relative; display: flex; align-items: center; gap: 9px; flex: none; height: 34px; margin-right: 12px; padding: 0 14px 0 10px; border-left: 3px solid var(--rar); background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 16%, #0b1017), #0b1017 70%); color: var(--muted); font-size: 13px; white-space: nowrap; }
.tick-icon { width: 22px; height: 22px; flex: none; color: var(--rar); }
.tick-icon svg, .tick-icon img { width: 100%; height: 100%; object-fit: contain; }
.tick b { color: var(--rar); font-family: var(--display); font-size: 16px; font-weight: 700; }
.tick-who { color: var(--muted); }
.tick time { color: var(--dim); }
.tick.is-rare { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rar) 55%, transparent), 0 0 18px color-mix(in srgb, var(--rar) 30%, transparent); }
.tick.is-new::before { content: ''; position: absolute; inset: 0; background: var(--rar); opacity: 0; animation: tick-new 1.1s ease-in-out 4; pointer-events: none; }
.tick.is-new::after { content: 'New'; margin-left: 2px; padding: 0 6px; background: #ffc23d; color: var(--ink); font-family: var(--display); font-size: 12px; font-weight: 700; }
@keyframes tick-new { 50% { opacity: .32; } }
.tick-empty { padding-left: 6px; color: var(--dim); font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding-block: 72px 0; }
.section-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 28px; align-items: end; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(32px, 4vw, 46px); }
.section-head p { max-width: 62ch; padding-bottom: 5px; color: var(--muted); }

/* ---------- Uploaded pictures ---------- */
.crate-art .crate-img { width: 100%; aspect-ratio: 6 / 5; object-fit: contain; filter: drop-shadow(0 14px 18px #000a); transition: transform .5s var(--ease), filter .5s ease; }
.crate-float .crate-img { animation: crate-float 5s ease-in-out infinite; }
.crate-art.is-image.is-open .crate-img { transform: scale(1.12); filter: drop-shadow(0 0 40px var(--blue)) brightness(1.35); }
.item-icon .item-img, .history-icon img, .slot img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Cases ---------- */
.crate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.crate-card { --glow: var(--blue); --cut: 20px; display: flex; flex-direction: column; padding: 18px 18px 20px; text-align: left; }
.crate-card::before { background: radial-gradient(ellipse 80% 55% at 50% 22%, color-mix(in srgb, var(--glow) 20%, transparent), transparent 70%), var(--panel); }
.crate-card.is-owned { background: color-mix(in srgb, var(--glow) 70%, var(--line-2)); }
.crate-pick { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.crate-pick .crate-art { width: 88%; margin: 0 auto; will-change: transform; transition: transform .35s var(--ease); }
.crate-pick:hover .crate-art { transform: translateY(-6px) scale(1.03); }
.crate-count { position: absolute; top: 14px; left: 16px; z-index: 2; min-width: 34px; padding: 1px 8px; background: var(--glow); color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; text-align: center; }
.crate-count.is-zero { background: var(--panel-3); color: var(--dim); }
.crate-name { margin-top: 8px; font-size: 27px; }
.crate-tagline { min-height: 2.9em; margin-top: 5px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.crate-odds { display: flex; height: 6px; margin: 14px 0 6px; overflow: hidden; background: var(--ink); }
.crate-odds i { display: block; min-width: 2px; height: 100%; background: var(--rar); }
.crate-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; }
.crate-top b { color: #ffc23d; font-weight: 500; }
.crate-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
.crate-actions .button { min-height: 40px; padding: 0 10px; font-size: 15.5px; }
.coin-inline { display: inline-block; width: 16px; height: 16px; color: #ffc23d; vertical-align: -3px; }

/* ---------- Level track ---------- */
.track-scroller { overflow-x: auto; padding-bottom: 12px; scrollbar-color: var(--line-2) transparent; }
.track-list { display: flex; gap: 10px; width: max-content; min-width: 100%; }
.track-step { --glow: var(--blue); position: relative; flex: 1 0 118px; padding: 12px 10px 14px; border-top: 3px solid var(--line-2); background: var(--panel); text-align: center; }
.track-step .crate-art { width: 84px; margin: 6px auto 4px; }
.track-level { font-family: var(--display); font-size: 21px; font-weight: 700; }
.track-reward { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.track-step.is-reached { border-top-color: var(--ok); }
.track-step.is-reached .crate-art { opacity: .35; filter: grayscale(.8); }
.track-step.is-reached .track-reward { color: var(--ok); }
.track-step.is-next { border-top-color: var(--glow); background: linear-gradient(180deg, color-mix(in srgb, var(--glow) 16%, var(--panel)), var(--panel)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 50%, transparent); }
.track-step.is-big .track-level { color: var(--glow); }

/* ---------- Stash ---------- */
.stash-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.voucher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.voucher { display: flex; flex-direction: column; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.voucher.is-picked { box-shadow: inset 0 0 0 2px var(--rar), 0 0 26px color-mix(in srgb, var(--rar) 35%, transparent); }
.voucher .item-card { padding-top: 16px; }
.voucher-body { display: grid; gap: 8px; padding: 12px; }
.voucher-code { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 6px 6px 10px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.voucher-code code { font-size: 13.5px; letter-spacing: .04em; }
.voucher-code button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; background: var(--panel-3); color: var(--muted); }
.voucher-code button:hover { color: var(--text); }
.voucher-code button svg { width: 16px; height: 16px; }
.voucher-meta { color: var(--muted); font-size: 12.5px; }
.voucher-meta.is-soon { color: var(--warn); }
.voucher-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.voucher-actions .button { flex: 1; min-height: 32px; padding: 0 8px; font-size: 13.5px; }
.history { margin-top: 20px; border: 1px solid var(--line); background: var(--panel); }
.history summary { padding: 12px 16px; cursor: pointer; font-family: var(--display); font-size: 17px; font-weight: 600; }
.history-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--line); }
.history-list li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.history-list li:last-child { border-bottom: 0; }
.history-icon { width: 22px; height: 22px; flex: none; color: var(--rar); }
.history-list b { color: var(--rar); font-weight: 600; }
.history-list span { margin-left: auto; color: var(--dim); font-size: 12.5px; white-space: nowrap; }

.contract { --cut: 18px; position: sticky; top: 88px; padding: 20px; }
.contract h3 { font-size: 24px; }
.contract-text { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.contract-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 16px 0 12px; }
.slot { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--line-2); background: var(--ink); color: var(--dim); font-family: var(--display); font-size: 18px; }
.slot.is-filled { border: 0; padding: 7px; background: linear-gradient(180deg, color-mix(in srgb, var(--rar) 30%, var(--panel)), var(--panel)); box-shadow: inset 0 -3px 0 var(--rar); color: var(--rar); }
.slot svg { width: 100%; height: 100%; }
.contract-status { min-height: 2.8em; margin-bottom: 12px; color: var(--muted); font-size: 13.5px; }
.contract-status b { color: var(--rar); }
.contract .link-button { display: block; margin: 8px auto 0; }

/* ---------- How to earn ---------- */
.earn-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 22px; align-items: start; }
.earn-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.earn-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--panel); }
.earn-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--panel-3); color: var(--blue); }
.earn-icon svg { width: 22px; height: 22px; }
.earn-row h3 { font-size: 19px; }
.earn-row p { color: var(--muted); font-size: 13.5px; }
.earn-gain { color: var(--ice); font-family: var(--display); font-size: 17px; font-weight: 700; text-align: right; white-space: nowrap; }
.earn-gain small { display: block; color: var(--muted); font-family: var(--body); font-size: 12px; font-weight: 400; }
.rules { --cut: 18px; padding: 22px; }
.rules h3 { font-size: 22px; }
.rules h3 + ul { margin: 10px 0 22px; }
.rules ul:last-child { margin-bottom: 0; }
.rule-list li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rule-list li:last-child { border-bottom: 0; }
.rule-list b { font-family: var(--display); font-size: 16px; text-align: right; white-space: nowrap; }
.rule-list-plain li { display: block; color: var(--muted); }

.footer { margin-top: 84px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px; color: var(--dim); font-size: 13px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; overflow-y: auto; background: #030508eb; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { --cut: 22px; width: min(920px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; }
.sheet-close { position: absolute; top: 14px; right: 30px; z-index: 2; }
.inspect-head { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: center; }
.inspect-info h2 { font-size: 40px; }
.inspect-tagline { margin-top: 4px; color: var(--muted); }
.odds-bar { display: flex; height: 10px; margin-top: 18px; overflow: hidden; background: var(--ink); }
.odds-bar i { display: block; min-width: 3px; height: 100%; background: var(--rar); }
.odds-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; }
.odds-legend li { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.odds-legend i { width: 9px; height: 9px; background: var(--rar); }
.odds-legend b { color: var(--text); font-weight: 600; }
.inspect-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.inline-message { min-height: 1.4em; margin-top: 8px; color: var(--warn); font-size: 13.5px; }
.inspect-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 24px; }
.inspect-items .item-card { padding-bottom: 0; }
.inspect-items .item-card.is-out { opacity: .38; filter: grayscale(.7); }
.item-odds { position: relative; margin: -6px 0 12px; color: var(--muted); font-size: 12.5px; }
.item-stock { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 0 6px; background: #000a; color: #ffc23d; font-size: 11.5px; }
.item-desc { position: relative; margin: -8px 4px 10px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.overlay-stage { padding: 0; background: radial-gradient(ellipse at 50% 40%, #0d2233 0%, #04070b 62%); }
.stage { --glow: var(--blue); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 100vh; padding: 28px 0; overflow: hidden; }
.stage > * { position: relative; z-index: 1; }

/* A floor grid running off to the horizon. Drawn once, never animated. */
.stage > .stage-floor { position: absolute; left: -30%; right: -30%; bottom: 0; z-index: 0; height: 58%; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--glow) 26%, transparent) 0 1px, transparent 1px 90px), repeating-linear-gradient(0deg, color-mix(in srgb, var(--glow) 26%, transparent) 0 1px, transparent 1px 64px); transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%; opacity: .75; }
.stage > .stage-floor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #04070b 0%, #04070b00 55%), radial-gradient(ellipse 50% 100% at 50% 100%, transparent 30%, #04070b 100%); }

/* Light rays for the good drops. A small disc scaled up, so spinning it costs next to nothing. */
.stage > .stage-rays { position: absolute; left: 50%; top: 46%; z-index: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rar) 46%, transparent) 0deg 5deg, transparent 5deg 17deg); opacity: 0; transform: scale(3.6); will-change: transform, opacity; transition: opacity .6s ease; animation: rays-spin 36s linear infinite; animation-play-state: paused; }
.stage > .stage-rays-fade { position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 50% 46%, #04070b00 0%, #04070b99 34%, #04070b 62%); opacity: 0; transition: opacity .6s ease; }
@keyframes rays-spin { from { transform: scale(3.6) rotate(0deg); } to { transform: scale(3.6) rotate(360deg); } }
#stage.is-rare .stage-rays { opacity: .85; animation-play-state: running; }
#stage.is-rare .stage-rays-fade { opacity: 1; }
#stage.is-rare[data-phase="result"] .stage-rays { opacity: .42; }
#stage.is-rare .stage-floor { opacity: 0; }

/* Charging bar under the title while the case is opening. */
.stage-charge { width: 190px; height: 3px; margin-bottom: 6px; background: #ffffff14; overflow: hidden; }
.stage-charge i { display: block; height: 100%; background: linear-gradient(90deg, var(--glow), #fff); transform: scaleX(0); transform-origin: 0 50%; }
#stage[data-phase="crate"] .stage-charge i { animation: charge 2.1s cubic-bezier(.3, .6, .2, 1) forwards; }
#stage:not([data-phase="crate"]) .stage-charge { visibility: hidden; }
@keyframes charge { to { transform: scaleX(1); } }

/* The pad the case sits on: a soft pool of light, two spinning rings, dust rising through a beam. */
.stage-pad { position: relative; z-index: 0; width: min(440px, 88vw); aspect-ratio: 6 / 5; pointer-events: none; transition: opacity .3s ease; }
#stage:not([data-phase="crate"]) .stage-pad { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; }
#stage:not([data-phase="crate"]) .stage-pad * { animation-play-state: paused; }
.pad-aura { position: absolute; left: 4%; right: 4%; bottom: -9%; height: 40%; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--glow) 60%, transparent) 0%, transparent 68%); will-change: transform, opacity; animation: pad-aura 2.4s ease-in-out infinite; }
@keyframes pad-aura { 50% { transform: scale(1.12); opacity: .62; } }
.pad-ring { position: absolute; left: 3%; bottom: -44%; width: 94%; aspect-ratio: 1; border: 2px dashed color-mix(in srgb, var(--glow) 80%, #fff); border-radius: 50%; opacity: .7; will-change: transform; animation: pad-spin 9s linear infinite; }
.pad-ring-inner { left: 18%; bottom: -29%; width: 64%; border-style: solid; border-color: color-mix(in srgb, var(--glow) 70%, transparent) transparent; opacity: .9; animation-duration: 3.2s; animation-direction: reverse; }
@keyframes pad-spin { from { transform: rotateX(74deg) rotate(0deg); } to { transform: rotateX(74deg) rotate(360deg); } }
.pad-beam { position: absolute; left: 50%; bottom: 16%; width: 54%; height: 190%; margin-left: -27%; background: linear-gradient(0deg, color-mix(in srgb, var(--glow) 62%, #fff) 0%, color-mix(in srgb, var(--glow) 30%, transparent) 38%, transparent 92%); opacity: 0; transform: scale(.25, .1); transform-origin: 50% 100%; will-change: transform, opacity; transition: transform .55s var(--ease), opacity .4s ease; }
#stage.is-popped .pad-beam { opacity: .62; transform: scale(1, 1); }
#stage.is-popped .pad-ring { animation-duration: 1.1s; }
.pad-motes { position: absolute; inset: 0; }
.pad-motes i { position: absolute; bottom: 12%; width: 4px; height: 4px; border-radius: 50%; background: color-mix(in srgb, var(--glow) 70%, #fff); opacity: 0; will-change: transform, opacity; animation: mote var(--t, 2.6s) linear var(--d, 0s) infinite; }
@keyframes mote { 0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate3d(var(--x, 0px), -230px, 0) scale(.3); opacity: 0; } }
.stage-crate.is-open { animation: crate-pop .5s var(--ease); }
@keyframes crate-pop { 30% { transform: translateY(-14px) scale(1.05); } }
.stage.is-shaken { animation: stage-shake .5s cubic-bezier(.3, .7, .3, 1); }
@keyframes stage-shake { 15% { transform: translate3d(-9px, 5px, 0); } 30% { transform: translate3d(8px, -6px, 0); } 45% { transform: translate3d(-6px, 3px, 0); } 60% { transform: translate3d(5px, -2px, 0); } 80% { transform: translate3d(-2px, 1px, 0); } }

/* The reveal for the top two rarities. */
.rare-show { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 0 20px; text-align: center; }
#stage[data-phase="rare"] .rare-show { display: flex; }
#stage[data-phase="rare"] .stage-title, #stage[data-phase="rare"] .stage-charge, #stage[data-phase="rare"] .stage-body, #stage[data-phase="rare"] .stage-skip { display: none; }
.rare-word { font-family: var(--display); font-size: clamp(54px, 13vw, 168px); font-weight: 700; line-height: .86; letter-spacing: .04em; text-transform: uppercase; background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--rar) 55%, #fff) 30%, var(--rar) 52%, color-mix(in srgb, var(--rar) 55%, #000) 60%, var(--rar) 82%, #fff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; will-change: transform, opacity; animation: rare-slam .7s cubic-bezier(.2, 1.3, .3, 1) both; }
@keyframes rare-slam { 0% { transform: scale(3.2); opacity: 0; letter-spacing: .5em; } 55% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.rare-item { width: 230px; margin-top: 14px; will-change: transform, opacity; animation: rare-item .8s cubic-bezier(.2, 1.2, .3, 1) .45s both; }
.rare-item .item-card { padding: 30px 16px 0; }
.rare-item .item-icon { width: 128px; height: 128px; }
.rare-item .item-name { font-size: 23px; }
.rare-item .item-rarity { margin-bottom: 20px; font-size: 14px; }
@keyframes rare-item { 0% { transform: translateY(60px) scale(.4) rotate(-8deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rare-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #ffffffb0 50%, transparent 65%); transform: translateX(-130%); animation: rare-sheen 1.2s ease-out 1.1s 2; pointer-events: none; }
.rare-item { position: relative; overflow: hidden; }
@keyframes rare-sheen { to { transform: translateX(130%); } }
.rare-name { max-width: 30ch; color: #d6e2ee; font-size: clamp(16px, 2.2vw, 20px); animation: rare-fade .5s ease 1s both; }
@keyframes rare-fade { from { opacity: 0; transform: translateY(10px); } }
.rare-ring { position: absolute; left: 50%; top: 50%; width: 240px; height: 240px; margin: -120px 0 0 -120px; border: 3px solid var(--rar); border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform, opacity; animation: rare-ring 1.2s ease-out .1s both; }
.rare-ring-late { border-width: 2px; animation-delay: .55s; }
@keyframes rare-ring { 0% { transform: scale(.2); opacity: .95; } 100% { transform: scale(7); opacity: 0; } }
.rare-shards { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.rare-shards i { position: absolute; top: -30px; width: 9px; height: 16px; background: var(--c, var(--rar)); opacity: .95; will-change: transform; animation: shard var(--t, 2.6s) linear var(--d, 0s) both; }
@keyframes shard { to { transform: translate3d(var(--x, 0px), 112vh, 0) rotate(var(--r, 540deg)); } }
.reel.is-settled .item-card.is-winner.is-rare-win { animation: winner-charge .42s ease-in-out 5; box-shadow: 0 0 0 3px var(--rar), 0 0 90px var(--rar); }
@keyframes winner-charge { 50% { transform: scale(1.24) rotate(-1.2deg); } }
.result.is-rare .result-rarity { font-size: 24px; letter-spacing: .08em; text-transform: uppercase; }
.stage-title { position: relative; z-index: 1; margin-bottom: 8px; color: var(--ice); font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .02em; }
/* The case and the reel sit in the same spot. The reel is built and drawn while the case is still
   shaking, so nothing has to be created at the moment it starts to move. */
.stage-body { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; width: 100%; }
.stage-body > * { grid-area: 1 / 1; }
.stage-crate { width: min(340px, 70vw); will-change: transform, opacity; transition: transform .45s var(--ease), opacity .35s ease; }
.stage-crate.is-leaving { transform: scale(1.5) translateY(-10px); opacity: 0; }
.stage-crate.is-shaking .crate-svg, @keyframes shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-2deg) translateX(-3px); } 60% { transform: rotate(2deg) translateX(3px); } }
.stage-skip { margin-top: 26px; }
#stage[data-phase="result"] .stage-body, #stage[data-phase="result"] .stage-skip { display: none; }
#stage:not([data-phase="reel"]) .reel-wrap { opacity: 0; pointer-events: none; }
#stage:not([data-phase="reel"]) .stage-skip { visibility: hidden; }
#stage[data-phase="reel"] .stage-crate { opacity: 0; }

.reel-wrap { position: relative; width: 100%; min-width: 0; padding-top: 26px; transition: opacity .25s ease; }
.reel-glow { --glow: var(--blue); position: absolute; inset: -70px 12% -10px; z-index: 0; background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--glow), transparent 70%); opacity: .22; transition: opacity .3s ease; pointer-events: none; }
.reel { position: relative; z-index: 1; width: 100%; height: 268px; overflow: hidden; contain: layout paint; background: linear-gradient(180deg, #0a1018 0%, #05080c 50%, #0a1018 100%); }
.reel::before, .reel::after { content: ''; position: absolute; left: 0; right: 0; z-index: 3; height: 2px; background: linear-gradient(90deg, transparent, #2ea6f2 30%, #c9ecff 50%, #2ea6f2 70%, transparent); }
.reel::before { top: 0; }
.reel::after { bottom: 0; }
.reel-fade { position: absolute; top: 2px; bottom: 2px; z-index: 2; width: 17%; pointer-events: none; }
.reel-fade-left { left: 0; background: linear-gradient(90deg, #04070b, #04070b00); }
.reel-fade-right { right: 0; background: linear-gradient(270deg, #04070b, #04070b00); }
.reel-strip { display: flex; gap: 10px; height: 100%; padding-block: 30px; will-change: transform; }
/* Reel cards skip the clipped corner and every filter: they are drawn once and then only moved. */
.reel-strip .item-card { flex: 0 0 172px; justify-content: center; padding-top: 0; clip-path: none; background: linear-gradient(225deg, #070b10 9px, transparent 9.5px), linear-gradient(180deg, #151c26 0%, #0c1016 100%); transition: transform .16s ease-out, opacity .3s ease; }
.reel-strip .item-icon { width: 84px; height: 84px; }
.reel-strip .item-name { font-size: 17px; }
.reel-strip .item-rarity { margin-bottom: 18px; }
.reel-strip .item-card.is-focus { z-index: 1; transform: scale(1.07); box-shadow: 0 0 0 1px var(--rar), 0 0 26px var(--rar); }
.reel.is-settled .item-card { opacity: .14; }
.reel.is-settled .item-card.is-winner { z-index: 1; opacity: 1; transform: scale(1.14); box-shadow: 0 0 0 2px var(--rar), 0 0 48px var(--rar); animation: winner-pulse .7s ease-in-out 2; }
@keyframes winner-pulse { 50% { transform: scale(1.2); } }
.reel-marker { position: absolute; top: 0; bottom: 0; left: 50%; z-index: 4; width: 2px; margin-left: -1px; background: linear-gradient(180deg, #ffc23d, #fff3cf 50%, #ffc23d); box-shadow: 0 0 16px 1px #ffc23d; will-change: transform; }
.reel-marker::before, .reel-marker::after { content: ''; position: absolute; left: 50%; border: 11px solid transparent; transform: translateX(-50%); }
.reel-marker::before { top: 0; border-top-color: #ffc23d; }
.reel-marker::after { bottom: 0; border-bottom-color: #ffc23d; }
.reel-marker i { position: absolute; top: 0; bottom: 0; left: -86px; width: 174px; background: linear-gradient(90deg, transparent, #ffc23d14 50%, transparent); }
.reel-legend { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.reel-legend li { display: flex; align-items: center; gap: 6px; }
.reel-legend i { width: 9px; height: 9px; background: var(--rar); }
.reel-legend b { color: var(--text); font-weight: 600; }
.stage-flash { position: fixed; inset: 0; z-index: 70; background: radial-gradient(ellipse at 50% 50%, var(--rar), transparent 70%); opacity: 0; pointer-events: none; will-change: opacity; animation: stage-flash .7s ease-out; }
@keyframes stage-flash { 12% { opacity: .55; } 100% { opacity: 0; } }

.result { display: grid; grid-template-columns: 250px minmax(0, 420px); gap: 34px; align-items: center; padding: 0 24px; animation: result-in .5s var(--ease); }
@keyframes result-in { from { opacity: 0; transform: scale(.94) translateY(12px); } }
.result-card .item-card { padding: 34px 16px 0; }
.result-card .item-icon { width: 132px; height: 132px; }
.result-card .item-name { font-size: 24px; }
.result-card .item-rarity { margin-bottom: 22px; font-size: 14px; }
.result-rarity { color: var(--rar); font-family: var(--display); font-size: 19px; font-weight: 700; }
.result-info h2 { margin-top: 2px; font-size: clamp(34px, 5vw, 52px); }
.result-desc { margin-top: 10px; color: #c2cedb; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 10px 10px 10px 16px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--rar); }
.code-box code { font-size: 20px; letter-spacing: .08em; }
.result-next { margin-top: 12px; color: var(--muted); font-size: 14px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.burst i { position: absolute; top: 46%; left: 50%; width: 7px; height: 7px; background: var(--rar); animation: spark 1.1s var(--ease) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(260deg) scale(.2); opacity: 0; } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1080px) {
  .crate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding-block: 48px 56px; }
  .hero-panel { max-width: 520px; }
  .stash-layout, .earn-layout { grid-template-columns: 1fr; }
  .contract { position: static; }
  .nav-links { display: none; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .nav-inner { gap: 12px; height: 60px; }
  .brand-name, .user-chip span { display: none; }
  .button-discord { padding: 0 12px; font-size: 14px; }
  .section { padding-top: 52px; }
  .section-head { grid-template-columns: 1fr; }
  .crate-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .crate-card { padding: 12px 12px 14px; }
  .crate-name { font-size: 21px; }
  .crate-tagline { min-height: 0; font-size: 12.5px; }
  .crate-top { flex-direction: column; gap: 2px; }
  .voucher-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
  .voucher-actions .button { flex-basis: 100%; }
  .inspect-head { grid-template-columns: 1fr; }
  .inspect-head .crate-art { width: 200px; margin: 0 auto; }
  .sheet { padding: 20px 16px; }
  .result { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .result-card { width: 190px; margin: 0 auto; }
  .result-card .item-icon { width: 96px; height: 96px; }
  .result-actions, .code-box { justify-content: center; }
  .code-box { flex-direction: column; }
  .member-stats { grid-template-columns: repeat(2, 1fr); }
  .earn-row { grid-template-columns: 40px minmax(0, 1fr); }
  .earn-gain { grid-column: 2; text-align: left; }
  .ticker { height: 48px; }
  .ticker-label { padding: 0 12px; font-size: 14px; }
  .tick { height: 30px; }
  .footer-inner { flex-direction: column; }
  .reel { height: 214px; }
  .reel-strip .item-card { flex-basis: 138px; }
  .reel-strip .item-icon { width: 66px; height: 66px; }
  .reel-strip .item-name { font-size: 15px; }
}
