/* Born from Blood — Gacha Page — AAA Full-Screen Layout */

/* ===== PAGE SHELL ===== */
.gacha-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ===== SCENE: full-viewport banner ===== */
.gacha-scene {
  position: relative;
  height: calc(100dvh - 64px - 72px);
  min-height: 420px;
  overflow: hidden;
  background: #06030a;
  flex-shrink: 0;
}

/* Full-screen hero / splash art */
.hero-bg { position: absolute; inset: 0; }
.hero-img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: right center;
  transition: opacity .8s ease;
}
.hero-img.hero-fade { opacity: 0; }
@keyframes heroShake {
  0%,100% { transform: scale(1) translateX(0); }
  20%     { transform: scale(1.005) translateX(-6px); }
  40%     { transform: scale(1.005) translateX(6px); }
  60%     { transform: scale(1.003) translateX(-3px); }
  80%     { transform: scale(1.003) translateX(3px); }
}
.hero-img.hero-shake { animation: heroShake .55s ease-in-out 2; }

/* Gradient overlays */
.hero-grad-l {
  position: absolute; top: 0; left: 0; bottom: 0; width: 68%;
  background: linear-gradient(to right,
    rgba(4,2,8,.96) 0%, rgba(4,2,8,.78) 30%,
    rgba(4,2,8,.35) 60%, transparent 100%);
  pointer-events: none; z-index: 1;
}
.hero-grad-b {
  position: absolute; bottom: 0; left: 0; right: 0; height: 55%;
  background: linear-gradient(to top,
    rgba(4,2,8,.92) 0%, rgba(4,2,8,.4) 50%, transparent 100%);
  pointer-events: none; z-index: 1;
}

/* Large watermark text */
.banner-watermark {
  position: absolute; bottom: 65px; right: -12px; z-index: 2;
  font-family: "Cinzel", serif; font-weight: 900;
  font-size: clamp(52px, 9vw, 126px); line-height: 1.05;
  color: rgba(255,255,255,.05);
  letter-spacing: .12em; text-transform: uppercase; text-align: right;
  pointer-events: none; user-select: none;
}

/* ===== LEFT: BANNER THUMBNAIL SIDEBAR ===== */
.banner-sidebar {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 152px; z-index: 10;
  display: flex; flex-direction: column;
  padding: 22px 12px 22px 14px; gap: 10px;
  background: linear-gradient(to right, rgba(4,2,8,.82) 65%, transparent);
}
.banner-sidebar-label {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 11px;
  letter-spacing: .24em; color: rgba(255,255,255,.32); text-transform: uppercase;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 2px;
}
.banner-thumb {
  position: relative; display: block;
  width: 124px; height: 78px; border-radius: 7px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.1);
  cursor: pointer; opacity: .52; text-decoration: none; color: inherit;
  transition: opacity .18s, border-color .18s, transform .15s, box-shadow .18s;
}
.banner-thumb:hover { opacity: .84; transform: translateX(5px); }
.banner-thumb.active {
  opacity: 1; border-color: #e8c66a;
  box-shadow: 0 0 20px rgba(224,162,60,.42), 0 2px 12px rgba(0,0,0,.5);
}
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-thumb-name {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px 5px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  font-family: "Cinzel", serif; font-weight: 700; font-size: 9px;
  color: #f3d9b0; letter-spacing: .03em;
}
.banner-thumb-link { text-decoration: none; }

/* ===== TOP-LEFT: PACK INFO OVERLAY ===== */
.pack-info {
  position: absolute; top: 34px; left: 172px;
  z-index: 10; max-width: 440px;
}
.pack-info-tag {
  font-family: "Cinzel", serif; font-weight: 700;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: #e8c66a; margin-bottom: 10px;
}
.pack-info-title {
  font-family: "Cinzel", serif; font-weight: 900;
  font-size: clamp(32px, 5vw, 62px); line-height: 1.02;
  color: #fff; margin: 0 0 12px;
  text-shadow: 0 2px 28px rgba(0,0,0,.65), 0 1px 4px rgba(0,0,0,.9);
  letter-spacing: .03em;
}
.pack-info-desc {
  font-size: 14px; color: rgba(255,255,255,.58);
  line-height: 1.75; margin: 0 0 10px; max-width: 360px;
}
.pack-info-pity { font-size: 13px; color: #d79bff; }

/* ===== PREVIEW STRIP (high-rarity card thumbnails) ===== */
.pack-preview-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.ps-card {
  position: relative; width: 50px; height: 70px; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(120,40,50,.5); background: #0c0609;
  animation: rvIn .4s forwards; cursor: zoom-in;
  transition: transform .2s, box-shadow .2s;
}
.ps-card:hover { transform: scale(1.1) translateY(-3px); }
.ps-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-badge {
  position: absolute; top: 3px; right: 3px;
  font-family: "Cinzel", serif; font-weight: 900; font-size: 7px;
  padding: 1px 4px; border-radius: 4px; color: #1a0a0e; z-index: 2; line-height: 1.5;
}
.rar-R   .ps-badge { background: #9fb2c9; }
.rar-SR  .ps-badge { background: #7fd0ff; }
.rar-SSR .ps-badge { background: #d79bff; }
.rar-UR  .ps-badge { background: linear-gradient(90deg,#ffd86e,#ff7ea3,#7fd0ff); }
.rar-SER .ps-badge { background: linear-gradient(90deg,#fff,#ffd86e,#ff7ea3,#a78bfa); }
.rar-CR  .ps-badge { background: linear-gradient(135deg,#fff3c4,#ffd700 38%,#e8a817,#ffdf7e); color: #3a2604; }
.rar-CSR .ps-badge { background: linear-gradient(90deg,#fff,#8fd7ff,#ff8a8a); }
.rar-CFR .ps-badge { background: linear-gradient(90deg,#fff7cc,#ffd86e,#fff,#c7a2ff); }

/* ===== BOTTOM-CENTER: PULL BUTTONS ===== */
.pull-area {
  position: absolute; bottom: 28px; left: 152px; right: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.gacha-msg-float {
  color: #e2a0a8; font-size: 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,.8); min-height: 20px; text-align: center;
}
.gacha-msg-float a { color: #e8c66a; cursor: pointer; }
.pull-btns { display: flex; gap: 18px; }
.pull-btn {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px; min-width: 215px;
  background: rgba(12,6,18,.8); border: 1px solid rgba(255,255,255,.18); border-radius: 40px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  cursor: pointer; color: white;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.pull-btn:hover:not(:disabled) {
  background: rgba(52,22,36,.88); border-color: rgba(232,198,106,.5);
  transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,.5);
}
.pull-btn:active:not(:disabled) { transform: translateY(0); }
.pull-btn:disabled { opacity: .38; cursor: not-allowed; }
.pull-icon { font-size: 26px; flex-shrink: 0; }
.pull-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.pull-count { font-family: "Cinzel", serif; font-weight: 700; font-size: 11px; color: #e8c66a; letter-spacing: .12em; }
.pull-label { font-family: "Cinzel", serif; font-weight: 700; font-size: 16px; color: #fff; }
.pull-btn-10 { background: rgba(18,6,32,.8); border-color: rgba(154,72,224,.32); }
.pull-btn-10:hover:not(:disabled) { background: rgba(38,10,58,.88); border-color: rgba(154,72,224,.65); }

/* Collection CTA */
#collCta a {
  display: inline-block; padding: 10px 22px;
  background: var(--gold-grad, linear-gradient(135deg,#e8a032,#c87832));
  color: #1a0a0e; font-family: "Cinzel", serif; font-weight: 700;
  font-size: 14px; border-radius: 10px; text-decoration: none;
  box-shadow: 0 4px 16px rgba(224,162,60,.35); transition: transform .1s;
}
#collCta a:hover { transform: translateY(-2px); }

/* ===== STICKY STATS BAR ===== */
.gacha-stats-bar {
  display: flex; align-items: stretch; height: 72px;
  background: rgba(6,3,9,.96); border-top: 1px solid rgba(130,30,48,.28);
  position: sticky; bottom: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex-shrink: 0;
}
.stats-panel {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 8px 20px; border-right: 1px solid rgba(255,255,255,.06);
  min-width: 0; overflow: hidden;
}
.stats-panel-top {
  font-size: 11px; color: rgba(255,255,255,.4); letter-spacing: .06em; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stats-guaranteed {
  display: inline-block; background: #d4913c; color: #1a0a0e;
  font-size: 9px; font-weight: 900; font-family: "Cinzel", serif;
  padding: 1px 5px; border-radius: 3px; letter-spacing: .04em; margin-left: 4px; vertical-align: middle;
}
.stats-panel-val {
  font-family: "Cinzel", serif; font-weight: 900; font-size: 26px; color: #f3d9b0; white-space: nowrap;
}
.stats-actions {
  flex: 0 0 auto; flex-direction: row !important; align-items: center !important;
  gap: 10px; padding: 8px 16px; min-width: 280px;
}
.btn-buy {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 13px; color: #08160b;
  background: var(--green-grad, linear-gradient(135deg,#5acd6e,#2e9e44));
  border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(63,164,90,.3); transition: transform .1s; white-space: nowrap;
}
.btn-buy:hover:not(:disabled) { transform: translateY(-2px); }
.btn-buy:disabled { opacity: .38; cursor: not-allowed; }
.btn-selldup {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 13px; color: #08160b;
  background: var(--green-grad, linear-gradient(135deg,#5acd6e,#2e9e44));
  border: none; border-radius: 8px; padding: 9px 14px; cursor: pointer; white-space: nowrap;
  transition: filter .1s;
}
.btn-selldup:hover:not(:disabled) { filter: brightness(1.1); }
.btn-selldup:disabled { opacity: .38; cursor: not-allowed; }
.btn-view-all {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 14px; color: #1a0a0e;
  background: var(--gold-grad, linear-gradient(135deg,#e8a032,#c87832));
  border-radius: 8px; padding: 9px 18px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(224,162,60,.28); transition: transform .1s; white-space: nowrap;
}
.btn-view-all:hover { transform: translateY(-2px); }
.btn-view-all strong { color: #1a0a0e; }

/* ===== REVEAL: one pack at a time, direct show (no flip) ===== */
.reveal {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; margin: 32px auto 24px;
  max-width: 1200px; padding: 0 18px; min-height: 0;
}
.reveal.show { min-height: 320px; }

/* Pack counter */
.rv-counter {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 14px;
  color: rgba(255,255,255,.38); letter-spacing: .12em; min-height: 20px;
}

/* Cards row */
.rv-row { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* Individual revealed card (direct show, no flip) */
.rv-card {
  position: relative; width: 170px; height: 238px; border-radius: 10px; overflow: hidden;
  border: 2px solid #7a2630; background: #0c0609;
  opacity: 0; animation: rvIn .45s forwards; cursor: zoom-in;
}
@keyframes rvIn {
  from { opacity: 0; transform: translateY(22px) scale(.92); }
  to   { opacity: 1; transform: none; }
}
.rv-face {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden;
}
.rv-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rv-badge, .coll-badge {
  position: absolute; top: 6px; right: 6px;
  font-family: "Cinzel", serif; font-weight: 900; font-size: 12px;
  padding: 2px 8px; border-radius: 6px; color: #1a0a0e; z-index: 2;
}
.rv-new {
  position: absolute; top: 6px; left: 6px;
  background: #e8c66a; color: #1a0a0e;
  font-weight: 900; font-size: 11px; padding: 2px 7px; border-radius: 6px; z-index: 2;
}
.rv-name, .coll-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 7px;
  font-size: 12px; color: #f3d9b0;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
  text-align: center; z-index: 2;
}

/* Rarity glow on card border */
.rar-SR  .rv-card { box-shadow: 0 0 16px rgba(58,160,224,.55); }
.rar-SSR .rv-card { box-shadow: 0 0 20px rgba(154,72,224,.6); }
.rar-UR  .rv-card { box-shadow: 0 0 26px rgba(255,174,70,.75); }
.rar-SER .rv-card { box-shadow: 0 0 30px rgba(255,255,255,.6), 0 0 44px rgba(255,174,70,.55); }
.rar-CR  .rv-card { box-shadow: 0 0 18px rgba(255,196,40,.6),  0 0 32px rgba(232,168,23,.35); }
.rar-CSR .rv-card { box-shadow: 0 0 24px rgba(143,215,255,.7), 0 0 34px rgba(255,80,80,.35); }
.rar-CFR .rv-card { box-shadow: 0 0 36px rgba(255,255,255,.75),0 0 56px rgba(255,216,110,.65); }

/* Rarity badge colors */
.rar-R   .rv-badge, .rar-R   .coll-badge { background: #9fb2c9; }
.rar-SR  .rv-badge, .rar-SR  .coll-badge { background: #7fd0ff; box-shadow: 0 0 10px #3aa0e0; }
.rar-SSR .rv-badge, .rar-SSR .coll-badge { background: #d79bff; box-shadow: 0 0 12px #9a48e0; }
.rar-UR  .rv-badge, .rar-UR  .coll-badge { background: linear-gradient(90deg,#ffd86e,#ff7ea3,#7fd0ff); box-shadow: 0 0 16px #ffae46; }
.rar-SER .rv-badge, .rar-SER .coll-badge { background: linear-gradient(90deg,#ffffff,#ffd86e,#ff7ea3,#a78bfa); color: #1a0a0e; box-shadow: 0 0 16px #fff; }
.rar-CR  .rv-badge, .rar-CR  .coll-badge { background: linear-gradient(135deg,#fff3c4,#ffd700 38%,#e8a817 72%,#ffdf7e); color: #3a2604; box-shadow: 0 0 12px rgba(255,200,40,.85); }
.rar-CSR .rv-badge, .rar-CSR .coll-badge { background: linear-gradient(90deg,#ffffff,#8fd7ff,#ff8a8a); box-shadow: 0 0 14px rgba(143,215,255,.7); }
.rar-CFR .rv-badge, .rar-CFR .coll-badge { background: linear-gradient(90deg,#fff7cc,#ffd86e,#ffffff,#c7a2ff); box-shadow: 0 0 20px #fff, 0 0 30px rgba(255,216,110,.8); }

/* Collection rarity glows */
.rar-SR  .coll-card { box-shadow: 0 0 16px rgba(58,160,224,.55); }
.rar-SSR .coll-card { box-shadow: 0 0 20px rgba(154,72,224,.6); }
.rar-UR  .coll-card { box-shadow: 0 0 26px rgba(255,174,70,.75); }
.rar-SER .coll-card { box-shadow: 0 0 30px rgba(255,255,255,.6), 0 0 44px rgba(255,174,70,.55); }
.rar-CR  .coll-card { box-shadow: 0 0 18px rgba(255,196,40,.6), 0 0 32px rgba(232,168,23,.35); }
.rar-CSR .coll-card { box-shadow: 0 0 24px rgba(143,215,255,.7),0 0 34px rgba(255,80,80,.35); }
.rar-CFR .coll-card { box-shadow: 0 0 36px rgba(255,255,255,.75),0 0 56px rgba(255,216,110,.65); }

/* Next / Done button */
.rv-next {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 16px;
  color: #1a0a0e; background: var(--gold-grad, linear-gradient(135deg,#e8a032,#c87832));
  border: none; border-radius: 12px; padding: 13px 36px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(224,162,60,.4); transition: transform .1s, box-shadow .1s;
  letter-spacing: .08em;
}
.rv-next:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(224,162,60,.55); }
.rv-done {
  background: var(--green-grad, linear-gradient(135deg,#5acd6e,#2e9e44));
  color: #08160b; box-shadow: 0 6px 20px rgba(63,164,90,.38);
}
.rv-done:hover { box-shadow: 0 10px 28px rgba(63,164,90,.55); }

/* ===== COLLECTION (collection.html reuse) ===== */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-top: 16px; }
.coll-card { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid rgba(120,40,50,.5); background: #0c0609; display: flex; flex-direction: column; }
.coll-img { position: relative; aspect-ratio: 3/4.2; cursor: zoom-in; }
.coll-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coll-sell { margin-top: auto; border: none; border-top: 1px solid rgba(120,40,50,.5); background: rgba(63,164,90,.22); color: #bff0c2; font-family: "Cinzel", serif; font-weight: 700; font-size: 12px; padding: 7px 4px; cursor: pointer; }
.coll-sell:hover { background: rgba(63,164,90,.42); }
.coll-qty { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.8); color: var(--gold, #e8a032); font-weight: 900; font-size: 13px; padding: 2px 7px; border-radius: 6px; z-index: 2; }
.coll-empty { color: #b78b93; padding: 30px; grid-column: 1/-1; text-align: center; }
.coll-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(150,40,55,.3); }
.coll-stat { color: #f3d9b0; font-size: 17px; flex: 1 1 auto; }
.coll-stat span { color: var(--gold, #e8a032); font-weight: 900; font-size: 22px; }
.coll-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.coll-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.coll-tab { font-family: "Cinzel", serif; font-weight: 700; font-size: 13px; color: #d7b9bf; background: rgba(150,40,55,.16); border: 1px solid rgba(150,40,55,.4); border-radius: 8px; padding: 6px 14px; cursor: pointer; }
.coll-tab:hover { background: rgba(150,40,55,.3); }
.coll-tab.active { color: #1a0a0e; background: var(--gold-grad); border-color: #e8c66a; }

/* ===== BIG PREVIEW + HOLO ===== */
.big-prev {
  position: fixed; inset: 0; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out;
}
.big-prev[hidden] { display: none; }
.holo { transition: transform .3s ease; transform: perspective(800px) rotateX(0) rotateY(0); will-change: transform; }
.holo.tilt { transition: transform .07s ease-out; transform: perspective(800px) rotateX(var(--ry,0deg)) rotateY(var(--rx,0deg)) scale(1.03); }
#bigHolo { position: relative; display: inline-block; border-radius: 14px; }
#bigHolo img { display: block; max-width: 92vw; max-height: 92vh; border-radius: 14px; box-shadow: 0 0 50px rgba(0,0,0,.8); }

/* ===== Holographic foil — premium CFR tier (glowing rainbow sheen + glare) ===== */
.holo.rar-CFR { --mx: 50%; --my: 50%; }
.holo.rar-CFR > img { position: relative; z-index: 1; }
.holo.rar-CFR::before,
.holo.rar-CFR::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; z-index: 2;
}
/* shifting rainbow foil that rides the card surface */
.holo.rar-CFR::before {
  background: repeating-linear-gradient(115deg,
    rgba(255,0,128,.32) 0%, rgba(255,213,0,.32) 11%, rgba(0,255,170,.32) 22%,
    rgba(0,170,255,.32) 33%, rgba(180,0,255,.32) 44%, rgba(255,0,128,.32) 55%);
  background-size: 220% 220%;
  mix-blend-mode: color-dodge;
  opacity: .18;
  animation: foilShift 6s linear infinite;
}
/* pointer-tracked highlight + sweeping glare band */
.holo.rar-CFR::after {
  background:
    radial-gradient(130px 130px at var(--mx) var(--my), rgba(255,255,255,.55), rgba(255,255,255,0) 62%),
    linear-gradient(105deg, transparent 34%, rgba(255,255,255,.55) 48%, transparent 62%);
  background-size: auto, 260% 260%;
  mix-blend-mode: screen;
  opacity: .3;
  animation: foilGlare 5.5s ease-in-out infinite;
}
@keyframes foilShift { 0% { background-position: 0% 0%; } 100% { background-position: 220% 220%; } }
@keyframes foilGlare { 0%,100% { background-position: 0 0, 0% 50%; } 50% { background-position: 0 0, 100% 50%; } }
/* pulsing aura on the big card view */
#bigHolo.rar-CFR { animation: cfrGlow 2.8s ease-in-out infinite; }
@keyframes cfrGlow {
  0%,100% { filter: drop-shadow(0 0 10px rgba(255,216,110,.32)); }
  50%     { filter: drop-shadow(0 0 20px rgba(255,255,255,.5)) drop-shadow(0 0 34px rgba(255,150,210,.32)); }
}
@media (prefers-reduced-motion: reduce) {
  .holo.rar-CFR::before, .holo.rar-CFR::after, #bigHolo.rar-CFR { animation: none; }
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .gacha-scene { height: calc(100svh - 60px - 62px); min-height: 380px; }
  .banner-sidebar { width: 62px; padding: 12px 6px 12px 8px; gap: 8px; }
  .banner-sidebar-label { display: none; }
  .banner-thumb { width: 50px; height: 32px; border-radius: 5px; }
  .banner-thumb-name { font-size: 7px; padding: 2px 3px 3px; }
  .pack-info { left: 72px; top: 18px; max-width: calc(100vw - 80px); }
  .pack-info-title { font-size: clamp(24px, 7vw, 42px); }
  .pack-info-desc { display: none; }
  .pull-area { left: 62px; bottom: 18px; gap: 10px; }
  .pull-btn { min-width: 145px; padding: 12px 18px; gap: 10px; }
  .pull-label { font-size: 14px; }
  .pull-icon { font-size: 20px; }
  .gacha-stats-bar { height: 62px; }
  .stats-panel-val { font-size: 20px; }
  .stats-panel { padding: 6px 12px; }
  .stats-actions { min-width: auto; gap: 7px; padding: 6px 10px; }
  .stats-guaranteed { display: none; }
  .pack-preview-strip { display: none; }
}
@media (max-width: 620px) {
  .pull-btns { flex-direction: column; gap: 8px; }
  .pull-btn { min-width: 200px; }
  .banner-watermark { display: none; }
}

/* ==========================================================================
   React Gacha Center — scoped premium dark fantasy shell
   ========================================================================== */
.gacha-center-page {
  --gc-gold: #f0c46c;
  --gc-gold-soft: rgba(240,196,108,.34);
  --gc-blood: #b01f38;
  --gc-void: #050307;
  --gc-panel: rgba(8, 6, 12, .56);
  --gc-line: rgba(255, 226, 166, .15);
  background:
    radial-gradient(circle at 72% 12%, rgba(235, 178, 86, .12), transparent 28%),
    radial-gradient(circle at 22% 78%, rgba(151, 38, 58, .18), transparent 32%),
    #050307;
  overflow-x: hidden;
}

.gacha-center-page header {
  background: linear-gradient(90deg, rgba(19, 7, 12, .94), rgba(10, 5, 9, .92) 48%, rgba(25, 8, 14, .94));
  border-bottom-color: rgba(240, 196, 108, .18);
  box-shadow: 0 10px 36px rgba(0,0,0,.36);
}

.gacha-center-page #gachaRoot {
  position: relative;
  min-height: calc(100dvh - 64px);
  padding: 0;
  overflow-x: hidden;
}

.gacha-center-page .gacha-scene {
  height: calc(100dvh - 64px - 86px);
  min-height: 560px;
  background: #040207;
}

.gacha-center-page .gc-ambient::before {
  content: "";
  position: absolute;
  inset: -8%;
  background:
    linear-gradient(90deg, rgba(5,3,7,.94), rgba(5,3,7,.42) 45%, rgba(5,3,7,.82)),
    url("assets/cards/nikke/sec1.webp") center right / cover no-repeat;
  filter: blur(13px) saturate(.92) brightness(.58);
  transform: scale(1.04);
}

.gacha-center-page[data-gacha-set="ct03"] .gc-ambient::before {
  background:
    linear-gradient(90deg, rgba(5,3,7,.95), rgba(5,3,7,.38) 48%, rgba(5,3,7,.78)),
    url("assets/cards/nikke/sec1.webp") center right / cover no-repeat;
}

.gacha-center-page .gc-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 54% 34%, rgba(255, 214, 132, .18), transparent 19%),
    linear-gradient(180deg, rgba(0,0,0,.14), rgba(0,0,0,.74)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 5px);
  opacity: .74;
}

.gacha-center-page .gc-layout {
  max-width: 1920px;
  margin: 0 auto;
  /* sidebar | pack-info panel | feature art — all scale with vw, panel never below 340px */
  grid-template-columns: clamp(110px, 9vw, 150px) clamp(340px, 27vw, 520px) minmax(0, 1fr) !important;
}

@media (min-width: 901px) {
  .gacha-center-page .gc-layout > .banner-sidebar,
  .gacha-center-page .gc-layout > .pack-info,
  .gacha-center-page .gc-layout > .gc-feature {
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
}

.gacha-center-page .gc-panel,
.gacha-center-page .gc-feature,
.gacha-center-page .gacha-stats-bar {
  position: relative;
}

.gacha-center-page .gc-panel::before,
.gacha-center-page .gc-feature::before,
.gacha-center-page .gacha-stats-bar::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 0 28px rgba(255, 212, 126, .035);
}

.gacha-center-page .banner-sidebar {
  position: relative;
  inset: auto;
  width: auto;
  z-index: 20;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 22%),
    rgba(5, 3, 8, .58);
}

.gacha-center-page .banner-thumb {
  width: 100%;
  height: 92px;
  opacity: .68;
  border-radius: 10px;
  border-color: rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(240,196,108,.14), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 52%),
    rgba(8,5,10,.78);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 12px 30px rgba(0,0,0,.28);
}

.gacha-center-page .banner-thumb-link { height: 78px; }

.gacha-center-page .banner-thumb-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px;
  filter:
    drop-shadow(0 10px 18px rgba(0,0,0,.62))
    drop-shadow(0 0 10px rgba(240,196,108,.12));
}

.gacha-center-page .banner-thumb-fallback {
  object-fit: cover;
  padding: 0;
  opacity: .72;
}

.gacha-center-page .banner-thumb:hover {
  opacity: .92;
  transform: translateX(5px);
  border-color: rgba(240,196,108,.42);
}

.gacha-center-page .banner-thumb.active {
  opacity: 1;
  border-color: var(--gc-gold);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.16),
    0 0 24px rgba(240,196,108,.34),
    0 14px 32px rgba(0,0,0,.5);
}

.gacha-center-page .banner-thumb.active .banner-thumb-logo {
  filter:
    drop-shadow(0 10px 18px rgba(0,0,0,.7))
    drop-shadow(0 0 16px rgba(240,196,108,.32));
}

.gacha-center-page .banner-thumb.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(240,196,108,.3), transparent 38%),
    radial-gradient(circle at 90% 20%, rgba(255,255,255,.2), transparent 28%);
  pointer-events: none;
}

.gacha-center-page .pack-info {
  position: relative;
  top: auto;
  left: auto;
  max-width: none;
  overflow: hidden;
}

/* Allow content sections to shrink so the summon console stays fully visible */
.gacha-center-page .pack-info > *:not(.summon-console) {
  overflow: hidden;
}

.gacha-center-page .pack-info::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% 10%;
  height: 190px;
  background: radial-gradient(ellipse, rgba(176,31,56,.18), transparent 62%);
  pointer-events: none;
}

.gacha-center-page .pack-info-title {
  margin: 0;
  /* scale with panel width (27vw) so title stays ~2 lines at all desktop sizes */
  font-size: clamp(28px, 3.5vw, 68px);
  max-width: 100%;
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0,0,0,.85), 0 0 26px rgba(240,196,108,.14);
}

.gacha-center-page .pack-info-logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
  max-height: 255px;
  margin: 8px 0 6px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.7)) drop-shadow(0 0 18px rgba(240,196,108,.14));
}

.gacha-center-page[data-gacha-set="ct03"] .pack-info-logo {
  width: min(100%, 330px);
  max-height: 330px;
  margin-top: -4px;
  margin-bottom: -8px;
}

.gacha-center-page .pack-info-title.pack-info-title-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.gacha-center-page .pack-info-desc {
  max-width: 460px;
  color: rgba(235, 229, 218, .7);
}

.gacha-center-page .gc-mini-panel {
  box-shadow: inset 0 0 24px rgba(255,255,255,.025);
}

.gacha-center-page .pack-preview-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.gacha-center-page .ps-card {
  width: 100%;
  height: auto;
  aspect-ratio: 64 / 90;
  border-radius: 9px;
  border-color: rgba(240,196,108,.22);
  background: #09060c;
  box-shadow: 0 12px 24px rgba(0,0,0,.32);
}

.gacha-center-page .ps-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 18px 34px rgba(0,0,0,.46), 0 0 24px rgba(240,196,108,.2);
}

.gacha-center-page .ps-badge {
  font-size: 8px;
  border-radius: 999px;
}

.gacha-center-page .gc-feature {
  min-width: 0;
}

.gacha-center-page .gc-featured-img {
  object-fit: cover;
  object-position: 56% center;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,.72)) saturate(1.03);
  transition: opacity .8s ease, transform .65s ease;
}

.gacha-center-page[data-gacha-set="ct03"] .gc-featured-img {
  object-position: 54% center;
}

.gacha-center-page .gc-cover-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gacha-center-page .gc-cover-fallback {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gacha-center-page .gc-cover-stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px clamp(26px, 4.8vw, 88px) 82px;
  transition: opacity .35s ease, transform .35s ease;
}

.gacha-center-page .gc-cover-stage.is-empty {
  opacity: .62;
}

.gacha-center-page .gc-cover-stage.is-empty .gc-cover-fan::before {
  content: "Loading drop pool";
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(240,196,108,.22);
  border-radius: 999px;
  background: rgba(5,3,8,.58);
  color: rgba(244,217,156,.68);
  font-family: "Cinzel", serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  padding: 10px 16px;
  text-transform: uppercase;
}

.gacha-center-page .gc-cover-meta,
.gacha-center-page .gc-cover-caption {
  position: absolute;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(240,196,108,.2);
  background: rgba(4,2,7,.62);
  color: rgba(244,217,156,.82);
  font-family: "Cinzel", serif;
  box-shadow: 0 14px 34px rgba(0,0,0,.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gacha-center-page .gc-cover-meta {
  top: 20px;
  left: 22px;
  max-width: calc(100% - 44px);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.gacha-center-page .gc-cover-meta strong {
  color: #fff;
  letter-spacing: .08em;
}

.gacha-center-page .gc-cover-caption {
  right: 22px;
  bottom: 26px;
  max-width: calc(100% - 44px);
  border-radius: 14px;
  padding: 10px 13px;
}

.gacha-center-page .gc-cover-caption span {
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7cc, #d59c38);
  color: #1b0d05;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
}

.gacha-center-page .gc-cover-caption strong {
  min-width: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 13px;
}

.gacha-center-page .gc-cover-fan {
  position: relative;
  width: clamp(540px, 44vw, 820px);
  max-width: calc(100% - 28px);
  height: clamp(500px, calc(100dvh - 250px), 690px);
  min-height: 0;
}

.gacha-center-page .gc-cover-card {
  position: absolute;
  display: block;
  width: 60%;
  aspect-ratio: 900 / 1280;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(240,196,108,.28);
  border-radius: 14px;
  background: #08050a;
  cursor: zoom-in;
  box-shadow:
    0 24px 58px rgba(0,0,0,.62),
    0 0 0 1px rgba(255,255,255,.06) inset;
  transition: transform .24s ease, filter .24s ease, box-shadow .24s ease;
  animation: coverCardIn .5s ease both;
}

.gacha-center-page .gc-cover-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gacha-center-page .gc-cover-card:hover {
  filter: brightness(1.08);
  box-shadow:
    0 30px 70px rgba(0,0,0,.72),
    0 0 32px rgba(240,196,108,.24),
    0 0 0 1px rgba(255,255,255,.1) inset;
}

.gacha-center-page .gc-cover-card-0 {
  z-index: 8;
  left: 50%;
  top: 4%;
  width: 52%;
  transform: translateX(-50%) rotate(.7deg);
  animation-delay: .03s;
}

.gacha-center-page .gc-cover-card-0:hover {
  transform: translate(-50%, -8px) scale(1.025) rotate(.7deg);
}

.gacha-center-page .gc-cover-card-1 {
  z-index: 5;
  left: 6%;
  top: 12%;
  width: 40%;
  transform: rotate(-13deg) scale(.9);
  opacity: .92;
  animation-delay: .09s;
}

.gacha-center-page .gc-cover-card-1:hover {
  transform: translate(-10px, -4px) rotate(-13deg) scale(.93);
}

.gacha-center-page .gc-cover-card-2 {
  z-index: 5;
  right: 6%;
  top: 12%;
  width: 40%;
  transform: rotate(13deg) scale(.9);
  opacity: .92;
  animation-delay: .14s;
}

.gacha-center-page .gc-cover-card-2:hover {
  transform: translate(10px, -4px) rotate(13deg) scale(.93);
}

.gacha-center-page .gc-cover-card-3 {
  z-index: 3;
  left: 17%;
  top: 44%;
  width: 33%;
  transform: rotate(-18deg) scale(.78);
  opacity: .62;
  animation-delay: .18s;
}

.gacha-center-page .gc-cover-card-4 {
  z-index: 3;
  right: 17%;
  top: 44%;
  width: 33%;
  transform: rotate(18deg) scale(.78);
  opacity: .62;
  animation-delay: .22s;
}

.gacha-center-page .gc-cover-rarity {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7cc, #d59c38);
  color: #1a0a0e;
  font-family: "Cinzel", serif;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  box-shadow: 0 0 18px rgba(240,196,108,.38);
}

@keyframes coverCardIn {
  from { opacity: 0; filter: blur(5px) brightness(.75); }
}

.gacha-center-page .hero-img.hero-shake,
.gacha-center-page .gc-cover-stage.hero-shake {
  animation: heroShake .55s ease-in-out 2, summonGlow 1.1s ease-in-out 1;
}

@keyframes summonGlow {
  0%, 100% { filter: drop-shadow(0 24px 48px rgba(0,0,0,.72)) saturate(1.03); }
  50% { filter: drop-shadow(0 0 42px rgba(240,196,108,.55)) saturate(1.14); }
}

.gacha-center-page .banner-watermark {
  right: 18px;
  bottom: 92px;
  z-index: 1;
  color: rgba(255,255,255,.055);
  font-size: clamp(58px, 8vw, 128px);
  letter-spacing: .1em;
}

.gacha-center-page .summon-console.pull-area {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  flex-shrink: 0;
  align-items: stretch;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(240,196,108,.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), transparent 34%),
    radial-gradient(circle at 18% 20%, rgba(240,196,108,.18), transparent 35%),
    rgba(5,3,8,.58);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.38),
    0 18px 42px rgba(0,0,0,.34);
}

.gacha-center-page .gacha-msg-float:empty {
  opacity: 0;
  pointer-events: none;
}

.gacha-center-page .summon-console .gacha-msg-float {
  width: 100%;
  min-height: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.gacha-center-page .summon-console .gacha-msg-float:empty {
  display: none;
  height: 0;
  padding: 0;
}

.gacha-center-page .summon-console .gacha-msg-float:not(:empty) {
  padding: 8px 10px;
  border-color: rgba(255,255,255,.1);
  background: rgba(0,0,0,.42);
}

.gacha-center-page .pull-btns {
  gap: 18px;
  transform: none;
}

.gacha-center-page .summon-console .pull-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.gacha-center-page .pull-btn {
  min-width: clamp(130px, 11vw, 254px);
  min-height: 72px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 14px;
  padding: 13px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 226, 166, .22);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(135deg, rgba(111, 22, 34, .86), rgba(17, 8, 15, .92) 62%, rgba(126, 72, 22, .72));
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.62),
    0 18px 46px rgba(0,0,0,.45),
    0 0 36px rgba(176,31,56,.15);
}

.gacha-center-page .summon-console .pull-btn {
  min-width: 0;
  width: 100%;
  min-height: 66px;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0 10px;
  padding: 11px 12px;
  border-radius: 14px;
}

.gacha-center-page .pull-btn-10 {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(135deg, rgba(58, 20, 89, .9), rgba(14, 8, 23, .94) 58%, rgba(142, 88, 28, .72));
}

.gacha-center-page .pull-btn:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: rgba(240,196,108,.66);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.1),
    0 24px 58px rgba(0,0,0,.55),
    0 0 42px rgba(240,196,108,.28);
}

.gacha-center-page .pull-btn:disabled {
  opacity: .42;
  filter: grayscale(.45);
}

.gacha-center-page .pull-count {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(240,196,108,.38);
  background: radial-gradient(circle, rgba(240,196,108,.26), rgba(0,0,0,.28));
  color: var(--gc-gold);
  font-size: 15px;
  letter-spacing: .08em;
}

.gacha-center-page .summon-console .pull-count {
  width: 44px;
  height: 44px;
  font-size: 13px;
}

.gacha-center-page .pull-label {
  align-self: end;
  font-size: 19px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gacha-center-page .summon-console .pull-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(14px, .95vw, 16px);
  letter-spacing: .055em;
}

.gacha-center-page .pull-cost {
  align-self: start;
  color: rgba(235,229,218,.62);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gacha-center-page .summon-console .pull-cost {
  font-size: 11px;
  letter-spacing: .1em;
}

.gacha-center-page .summon-console #collCta {
  display: flex;
  justify-content: center;
}

.gacha-center-page .summon-console #collCta:empty {
  display: none;
}

.gacha-center-page #collCta a {
  border-radius: 999px;
  border: 1px solid rgba(240,196,108,.28);
  background: rgba(7,5,10,.72);
  color: #f6d58d;
  box-shadow: 0 10px 28px rgba(0,0,0,.38);
}

.gacha-center-page .gacha-stats-bar {
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(240px, 1.1fr) minmax(220px, 1fr) minmax(0, auto);
  gap: 1px;
  height: 86px;
  position: sticky;
  bottom: 0;
  z-index: 60;
  padding: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  border-top: 1px solid rgba(240,196,108,.2);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 34%),
    rgba(4, 2, 7, .94);
  box-shadow: 0 -18px 54px rgba(0,0,0,.44);
}

.gacha-center-page .stats-panel {
  flex: unset;
  border-right: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.018);
  padding: 12px 18px;
}

.gacha-center-page .stats-panel-top {
  color: rgba(235,229,218,.45);
  font-family: "Cinzel", serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.gacha-center-page .stats-panel-val {
  font-size: 28px;
  color: #f4d99c;
  text-shadow: 0 0 20px rgba(240,196,108,.14);
}

.gacha-center-page .stats-actions {
  display: flex;
  flex-direction: row !important;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  padding: 12px 18px;
  white-space: nowrap;
}

.gacha-center-page .btn-buy,
.gacha-center-page .btn-selldup,
.gacha-center-page .btn-view-all {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  padding: 10px 14px;
  font-family: "Cinzel", serif;
  font-size: clamp(11px, .72vw, 13px);
  font-weight: 800;
  letter-spacing: .03em;
}

.gacha-center-page .btn-buy {
  background: linear-gradient(135deg, #77e08a, #2fa753);
  color: #061409;
}

.gacha-center-page .btn-selldup {
  background: linear-gradient(135deg, #4fd37a, #1f8f48);
  color: #061409;
}

.gacha-center-page .btn-view-all {
  background: linear-gradient(135deg, #f4c66f, #c57c2b);
  color: #180b05;
}

.gacha-center-page .btn-buy:disabled,
.gacha-center-page .btn-selldup:disabled {
  opacity: .42;
  filter: grayscale(.4);
  cursor: not-allowed;
}

.gacha-center-page .reveal.show {
  position: fixed;
  inset: 0;
  z-index: 220;
  min-height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 96px 24px 34px;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 36%, rgba(240,196,108,.18), transparent 24%),
    radial-gradient(circle at 50% 58%, rgba(176,31,56,.22), transparent 30%),
    rgba(2,1,4,.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gacha-center-page .rv-counter {
  color: rgba(240,196,108,.76);
}

.gacha-center-page .rv-card {
  width: min(190px, 26vw);
  height: auto;
  aspect-ratio: 5 / 7;
  border-color: rgba(240,196,108,.32);
  box-shadow: 0 24px 54px rgba(0,0,0,.56);
}

.gacha-center-page .rv-next {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(135deg, #f0c46c, #bd7028);
}

.gacha-center-page .gacha-load-fail {
  margin: 32px;
  border: 1px solid rgba(240,196,108,.2);
  border-radius: 16px;
  background: rgba(0,0,0,.45);
  color: #f3d9b0;
  padding: 24px;
}

@media (max-width: 1180px) {
  .gacha-center-page .gacha-scene {
    min-height: 720px;
  }
  .gacha-center-page .gc-layout {
    grid-template-columns: clamp(90px, 8vw, 114px) clamp(300px, 30vw, 420px) minmax(0, 1fr) !important;
    gap: 14px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .gacha-center-page .banner-thumb {
    height: 76px;
  }
  .gacha-center-page .pack-preview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gacha-center-page .stats-actions {
    min-width: 390px;
  }
}

@media (max-width: 900px) {
  .gacha-center-page .gacha-scene {
    height: auto;
    min-height: calc(100dvh - 64px);
  }
  .gacha-center-page .gc-layout {
    grid-template-columns: 1fr;
    padding: 12px 12px 24px;
  }
  .gacha-center-page .banner-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(240,196,108,.12);
  }
  .gacha-center-page .banner-sidebar-label {
    display: none;
  }
  .gacha-center-page .banner-sidebar > div {
    flex-direction: row;
  }
  .gacha-center-page .banner-thumb,
  .gacha-center-page .banner-thumb-link {
    flex: 0 0 128px;
    height: 74px;
  }
  .gacha-center-page .gc-feature {
    min-height: 420px;
  }
  .gacha-center-page .gc-cover-stage {
    padding: 56px 18px 76px;
  }
  .gacha-center-page .gc-cover-fan {
    width: min(76vw, 390px);
    min-height: 360px;
  }
  .gacha-center-page .gc-cover-caption {
    bottom: 22px;
  }
  .gacha-center-page .pull-area {
    bottom: auto;
  }
  .gacha-center-page .pull-btns {
    transform: none;
  }
  .gacha-center-page .gacha-stats-bar {
    grid-template-columns: 1fr 1fr;
    height: auto;
  }
  .gacha-center-page .stats-actions {
    grid-column: 1 / -1;
    min-width: 0;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ===== CARD SHOWCASE REVEAL ===== */
.cs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020109;
  opacity: 0;
  transition: opacity .35s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.cs-overlay.cs-in { opacity: 1; }

/* Blurred rarity glow blob behind the card */
.cs-glow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 62vw; height: 62vw;
  max-width: 600px; max-height: 600px;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
  z-index: 1;
}
.cs-glow.cs-glow-show { opacity: .60; }
.cs-glow.cs-glow-cfr {
  background: conic-gradient(from 0deg, #ffd86e, #ff7ea3, #7fd0ff, #c7a2ff, #9aff9a, #ffd86e);
  animation: csGlowSpin 4s linear infinite;
}
@keyframes csGlowSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Skip button */
.cs-skip {
  position: absolute;
  top: 18px; right: 22px;
  z-index: 10;
  font-family: "Cinzel", serif;
  font-weight: 700; font-size: 13px;
  color: rgba(255,255,255,.52);
  background: rgba(0,0,0,.48);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  letter-spacing: .1em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color .15s, background .15s, border-color .15s;
}
.cs-skip:hover {
  color: #fff;
  background: rgba(0,0,0,.7);
  border-color: rgba(255,255,255,.34);
}

/* Card stage — flex row so multi-card packs sit side by side */
.cs-stage {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
}

/* 3-D card — width set inline by JS based on pack size */
.cs-card {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 5 / 7;
  transform-style: preserve-3d;
  border-radius: 16px;
  box-shadow: 0 44px 110px rgba(0,0,0,.82);
  transition: transform .68s cubic-bezier(.5,0,.5,1), box-shadow .55s ease;
}
.cs-card.cs-card-flip { transform: rotateY(180deg); }

.cs-face, .cs-back {
  position: absolute; inset: 0;
  border-radius: 16px; overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.cs-face { transform: rotateY(180deg); }
.cs-face img, .cs-back img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}


/* Card counter "N / Total" */
.cs-counter {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  font-family: "Cinzel", serif;
  font-weight: 700; font-size: 12px;
  color: rgba(255,255,255,.32);
  letter-spacing: .15em;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap;
}

/* ===== Card zoom preview (tap card during reveal or in summary) ===== */
.cs-preview {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.88);
  opacity: 0; transition: opacity .25s ease;
  cursor: pointer;
}
.cs-preview.cs-preview-in { opacity: 1; }
.cs-preview-img {
  max-width: 88vw;
  max-height: 88vh;
  width: auto; height: auto;
  border-radius: 18px;
  box-shadow: 0 0 80px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08);
  object-fit: contain;
  pointer-events: none;
}

/* ===== Summary screen ===== */
.cs-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 1200px;
  max-height: 100dvh;
  box-sizing: border-box;
  overflow-y: auto;
  cursor: default;
  opacity: 0;
  transition: opacity .35s ease;
}
.cs-summary-title {
  font-family: "Cinzel", serif;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.70);
  letter-spacing: .22em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.cs-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 120px));
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 4px 2px;
}
.cs-thumb {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--tc, #8ca0b4), 0 0 10px var(--tc, #8ca0b4);
}
.cs-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.cs-thumb-rar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  text-align: center;
  font-family: "Cinzel", serif;
  font-size: 8px;
  font-weight: 700;
  background: rgba(0,0,0,.72);
  color: var(--tc, #8ca0b4);
  padding: 2px 0;
  letter-spacing: .04em;
}
.cs-summary-close {
  flex-shrink: 0;
  padding: 10px 36px;
  border-radius: 24px;
  border: 1.5px solid rgba(255,255,255,.30);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.cs-summary-close:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.55);
}

@media (max-width: 620px) {
  .gacha-center-page .pack-info {
    padding: 18px;
  }
  .gacha-center-page .pack-info-title {
    font-size: 38px;
  }
  .gacha-center-page .pack-info-logo {
    width: min(100%, 360px);
    max-height: 178px;
    margin-top: 4px;
  }
  .gacha-center-page[data-gacha-set="ct03"] .pack-info-logo {
    width: min(100%, 230px);
    max-height: 230px;
  }
  .gacha-center-page .pack-preview-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gacha-center-page .pull-btns {
    width: min(100%, 340px);
  }
  .gacha-center-page .summon-console .pull-btns {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .gacha-center-page .summon-console.pull-area {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }
  .gacha-center-page .pull-btn {
    min-width: 100%;
  }
  .gacha-center-page .gc-cover-stage {
    padding: 52px 8px 76px;
  }
  .gacha-center-page .gc-cover-meta {
    left: 14px;
    right: 14px;
    justify-content: center;
  }
  .gacha-center-page .gc-cover-caption {
    left: 14px;
    right: 14px;
    bottom: 18px;
    justify-content: center;
  }
  .gacha-center-page .gc-cover-caption strong {
    max-width: 220px;
  }
  .gacha-center-page .rv-row {
    gap: 12px;
  }
  .gacha-center-page .rv-card {
    width: min(42vw, 170px);
  }
}

/* ===== CT05 Rate Up (featured UR @ 50%) ===== */
.ct05-rateup { margin-top: 2px; }

/* empty state — pick a card */
.ct05-ru-pick {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; cursor: pointer; text-align: left;
  border-radius: 16px;
  border: 1px dashed rgba(201,168,76,.45);
  background: linear-gradient(135deg, rgba(201,168,76,.10), rgba(201,168,76,.03));
  transition: border-color .2s, background .2s, transform .12s;
}
.ct05-ru-pick:hover {
  border-color: rgba(201,168,76,.85);
  background: linear-gradient(135deg, rgba(201,168,76,.18), rgba(201,168,76,.06));
  transform: translateY(-1px);
}
.ct05-ru-pick-ic {
  font-size: 22px; color: #e6c766;
  filter: drop-shadow(0 0 8px rgba(230,199,102,.6));
  flex-shrink: 0;
}
.ct05-ru-pick-tx { display: flex; flex-direction: column; gap: 2px; }
.ct05-ru-pick-tx strong {
  font-family: "Cinzel", serif; font-size: 14px; font-weight: 700;
  color: #f4e3ac; letter-spacing: .04em;
}
.ct05-ru-pick-tx small { font-size: 11px; color: rgba(244,227,172,.6); }

/* filled state — show featured */
.ct05-ru-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.ct05-ru-kick {
  font-family: "Cinzel", serif; font-size: 10px; font-weight: 900;
  letter-spacing: .28em; text-transform: uppercase;
  color: #101012; padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #f4e3ac, #d8b552);
  box-shadow: 0 0 16px rgba(216,181,82,.5);
}
.ct05-ru-change {
  font-size: 11px; color: rgba(244,227,172,.75); cursor: pointer;
  background: none; border: none; text-decoration: underline;
  text-underline-offset: 2px; padding: 2px 4px;
}
.ct05-ru-change:hover { color: #f4e3ac; }
.ct05-ru-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 14px;
  border: 1px solid rgba(201,168,76,.4);
  background: linear-gradient(135deg, rgba(201,168,76,.14), rgba(0,0,0,.25));
  box-shadow: inset 0 0 24px rgba(201,168,76,.08);
}
.ct05-ru-card img {
  width: 46px; height: 64px; object-fit: cover; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.12); flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.ct05-ru-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ct05-ru-info strong {
  font-family: "Cinzel", serif; font-size: 14px; color: #f4e3ac;
  letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ct05-ru-info small { font-size: 11px; color: rgba(244,227,172,.62); }

/* picker modal */
.ct05-modal {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(4,2,6,.82); backdrop-filter: blur(6px);
}
.ct05-modal.show { display: flex; }
.ct05-modal-box {
  position: relative; width: min(920px, 94vw); max-height: 86vh;
  display: flex; flex-direction: column;
  padding: 26px 24px 20px; border-radius: 22px;
  border: 1px solid rgba(201,168,76,.28);
  background: linear-gradient(160deg, #17121b, #0c0910 70%);
  box-shadow: 0 40px 120px rgba(0,0,0,.7), inset 0 0 60px rgba(201,168,76,.05);
}
.ct05-modal-x {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7); font-size: 15px;
}
.ct05-modal-x:hover { background: rgba(255,255,255,.12); color: #fff; }
.ct05-modal-title {
  font-family: "Cinzel", serif; font-size: 20px; font-weight: 900;
  color: #f4e3ac; letter-spacing: .06em; text-transform: uppercase;
}
.ct05-modal-desc { margin: 6px 0 16px; font-size: 12.5px; color: rgba(255,255,255,.55); max-width: 640px; }
.ct05-modal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px; overflow-y: auto; padding: 4px 4px 8px;
}
.ct05-cell {
  display: flex; flex-direction: column; gap: 6px; padding: 6px; cursor: pointer;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03); transition: border-color .15s, transform .12s, box-shadow .15s;
}
.ct05-cell:hover { transform: translateY(-2px); border-color: rgba(201,168,76,.6); }
.ct05-cell.is-sel {
  border-color: #e6c766;
  box-shadow: 0 0 0 1px #e6c766, 0 0 22px rgba(230,199,102,.35);
  background: rgba(201,168,76,.12);
}
.ct05-cell img {
  width: 100%; aspect-ratio: 3/4.2; object-fit: cover; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.ct05-cell span {
  font-size: 10.5px; line-height: 1.25; color: rgba(255,255,255,.72);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* CT05 Rate Up — big card display (replaces Featured Cards on CT05) */
.ct05-ru-big {
  display: block; width: 100%; cursor: pointer; text-align: center;
  padding: 16px 14px 14px; border-radius: 18px;
  border: 1px solid rgba(201,168,76,.42);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(201,168,76,.16), transparent 60%),
    linear-gradient(160deg, rgba(201,168,76,.10), rgba(0,0,0,.32));
  box-shadow: inset 0 0 40px rgba(201,168,76,.07), 0 18px 50px rgba(0,0,0,.4);
  transition: border-color .2s, transform .12s;
  -webkit-user-select: none; user-select: none;
}
.ct05-ru-big:hover { border-color: rgba(230,199,102,.8); transform: translateY(-2px); }
.ct05-ru-big-img {
  width: auto; height: clamp(210px, 30vh, 300px); max-width: 100%;
  aspect-ratio: 3 / 4.2; object-fit: cover; display: block; margin: 0 auto;
  border-radius: 12px; pointer-events: none;
  box-shadow: 0 16px 48px rgba(0,0,0,.62), 0 0 0 1px rgba(255,255,255,.1),
              0 0 40px rgba(201,168,76,.18);
}
.ct05-ru-big-info { margin-top: 12px; }
.ct05-ru-big-info strong {
  display: block; font-family: "Cinzel", serif; font-size: 18px; font-weight: 700;
  color: #f4e3ac; letter-spacing: .03em;
}
.ct05-ru-big-info small {
  display: block; margin-top: 3px; font-size: 11.5px; color: rgba(244,227,172,.6);
}

dialog{border:1px solid #66798e;background:#101722;color:#e6eaf3;width:min(1050px,94vw);max-height:90vh;padding:24px}dialog::backdrop{background:#000b;backdrop-filter:blur(8px)}.ng-modal-head{display:flex;align-items:center;justify-content:space-between;gap:20px;position:sticky;top:-24px;background:#101722;z-index:2;padding-bottom:12px}.ng-modal-head h2{font-size:18px;font-weight:500}.ng-modal-head button{font-size:26px;background:none;border:0;color:white;padding:4px 12px}.ng-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}.ng-card{border:1px solid #ffffff19;background:#1b2330;padding:9px;color:#d5dfed;display:flex;flex-direction:column;gap:8px;text-align:left;min-width:0}.ng-card img{width:100%;aspect-ratio:900/1280;object-fit:contain}.ng-card strong{font-size:12px;line-height:1.4;font-weight:500}.ng-card small{font-size:10px;color:#bba9f1}.ng-card.selected{border-color:#bfb2ff;box-shadow:0 0 18px #a489ff30}.ng-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}.ng-detail img{max-width:100%;max-height:70vh;object-fit:contain}.ng-detail p{white-space:pre-line;font-size:14px;line-height:1.85;color:#c3cedb}.ng-result-note{font-size:13px;color:#a4b7d1;margin:0 0 18px}
/* Preserve the original BFBTCG gacha composition without relying on CDN utilities. */
@media(max-width:980px){.gacha-center-page .gc-layout>.banner-sidebar{transform:none!important;max-width:none!important;max-height:none!important}.gacha-center-page .banner-sidebar>div:last-child{flex:1;min-width:0}.gacha-center-page .banner-sidebar .banner-thumb{flex:0 0 128px;height:54px}}
.gacha-center-page #packRateVal{display:inline-block;margin-left:8px;font-size:24px}.gacha-center-page .summon-console .pull-label{white-space:normal;overflow:visible;text-overflow:clip;font-size:12px;letter-spacing:.02em}.gc-layout .pack-info>div:first-child{flex-shrink:0}.gc-layout .pack-info>.grid{flex-shrink:0}.gc-layout .pack-info>.ct05-rateup{flex-shrink:0}
body.gacha-page{margin:0}button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[hidden]{display:none!important}
.gc-layout{display:grid;position:relative;height:100%;min-height:0;gap:20px;padding:20px 16px;box-sizing:border-box}.gc-layout *{box-sizing:border-box}.gc-panel{display:flex;flex-direction:column;gap:16px;padding:24px;border:1px solid #e8c88a26;border-radius:16px;background:#08060c90;overflow-y:auto}.banner-sidebar{display:flex;flex-direction:column;gap:12px;padding:20px 12px;background:#0006}.banner-thumb{width:100%;height:92px}.gc-feature{position:relative;overflow:hidden;border:1px solid #e8c88a26;border-radius:28px;background:#0003}.gc-panel .pack-info-title{margin:8px 0;font-size:clamp(34px,4vw,68px);line-height:1.02}.gc-panel .pack-info-desc{line-height:1.7;color:#ddd9}.gc-mini-panel{padding:12px;border:1px solid #fff2;border-radius:12px}.gc-panel>.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.gc-panel .ct05-ru-big-img{height:clamp(160px,24vh,250px)}.ct05-ru-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.summon-console{margin-top:auto;display:flex;flex-direction:column;gap:12px}.pull-btns{display:flex;justify-content:center;gap:14px}.gc-feature img{max-width:100%}.banner-watermark{pointer-events:none}.ng-progress{height:3px;background:#fff2;margin:8px 0}.ng-progress i{display:block;height:100%;background:#ddc07a}#ngPityText{margin:0;font-size:11px;line-height:1.5}#ngMessage{min-height:20px;font-size:12px}#ngMessage[data-error=true]{color:#ff9eab}#ngRetry,#ngLogin{padding:8px;border:1px solid #c9a84c66;background:#1b1420;color:#f4e3ac}.ng-card{font:inherit;cursor:pointer}.ng-modal-head h2{margin:0}.ng-detail p{white-space:pre-line}.gacha-stats-bar .stats-panel-val{color:#f4e3ac}.nikke-banner-logo{position:absolute;right:30px;top:20px;width:220px;height:120px;object-fit:contain;z-index:2;pointer-events:none}.gc-cover-card{background:transparent}.ng-card.selected{border-color:#e6c766}
@media(max-width:980px){.gacha-center-page .gc-layout{grid-template-columns:1fr!important;height:auto}.gacha-center-page .banner-sidebar{display:flex;flex-direction:row;height:70px;padding:8px 12px}.banner-sidebar>div:last-child{display:flex}.banner-thumb{height:54px;width:120px}.gc-feature{min-height:500px;order:2}.gc-panel{order:1;overflow:visible}.gacha-center-page .gacha-scene{height:auto;overflow:visible}.gacha-center-page .gacha-stats-bar{position:relative;flex-wrap:wrap}.ng-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ng-detail{grid-template-columns:1fr}.ng-detail img{max-height:55vh;justify-self:center}.ct05-ru-big-img{height:220px!important}.nikke-banner-logo{width:170px;right:20px}.gc-panel .pack-info-title{font-size:40px}}
@media(max-width:980px){.gacha-center-page .gc-layout>.banner-sidebar{position:relative!important;inset:auto!important;width:100%!important;height:70px!important;order:0}.gacha-center-page .gc-layout>.gc-feature{height:510px!important;min-height:510px!important}.gacha-center-page .gc-cover-stage{height:510px;padding:90px 8px 65px}.gacha-center-page .gc-cover-fan{height:330px!important;min-height:330px!important;width:340px;max-width:100%}.gacha-center-page .summon-console.pull-area{left:auto;right:auto;bottom:auto}.gacha-center-page .banner-watermark{font-size:70px}.gacha-center-page .summon-console .pull-label{font-size:14px}}
