/* cat gacha */
.ga-oddlist { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow-y: auto; padding: 4px 6px; }
.ga-oddrow { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink); padding: 3px 6px; border-radius: 8px; }
.ga-oddrow.sum { background: rgba(232, 138, 165, .18); font-weight: 900; margin-top: 4px; }
.ga-oddrow b { color: var(--rose-d); font-weight: 900; }
.ga-oddpity { margin-top: 8px; font-size: 13px; color: var(--teal); font-weight: 800; text-align: center; }
.ga-wallet { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 44px; }
.ga-wal { display: flex; align-items: center; gap: 5px; padding: 4px 12px 4px 8px; border-radius: 18px; background: rgba(255,255,255,.7); border: 2px solid #e5d3ff; font: 900 17px var(--font); color: var(--ink); }
.ga-wal img { width: 24px; height: 24px; object-fit: contain; }
.ga-getgems { margin-left: auto; min-height: 44px; min-width: 44px; padding: 0 12px; }
.ga-total { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font: 900 14px var(--font); color: var(--rose-d); }
.ga-total img { width: 24px; height: 24px; object-fit: contain; }
.ga-craft { padding: 10px; border-radius: 16px; background: rgba(185,163,217,.2); display: flex; flex-direction: column; gap: 8px; align-items: center; margin-bottom: 8px; }
.ga-chips { display: flex; gap: 10px; justify-content: center; }
.ga-craft-tx { font: 800 14px/1.3 var(--font); color: var(--ink); text-align: center; }
.ga-craft-btn { min-height: 48px; min-width: 150px; padding: 0 16px; }
.ga-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 26px; background: rgba(185,163,217,.25); margin-bottom: 8px; }
.ga-tab { flex: 1; min-height: 46px; border: 0; border-radius: 22px; background: transparent; font: 900 16px var(--font); color: var(--rose-d); cursor: pointer; transition: all .2s; padding: 0 6px; }
.ga-tab.on { background: linear-gradient(180deg, #ffb3c7, #e88aa5); color: #fff; -webkit-text-stroke: 3px #a04468; paint-order: stroke fill; box-shadow: 0 3px 0 #a94d6f; }
.ga-banner { --fc: #f6d88a; position: relative; height: 230px; border-radius: 20px; overflow: hidden; background: #2a1840 url(../assets/gacha-bg.webp) center 30%/cover;
  border: 4px solid var(--fc); box-shadow: 0 0 14px var(--fc), inset 0 0 22px rgba(0,0,0,.45); animation: gaPop .28s cubic-bezier(.2,1.5,.4,1); }
.ga-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,10,50,.45), rgba(30,10,50,0) 35%, rgba(30,10,50,.55)); pointer-events: none; }
.ga-ban-title { position: absolute; left: 0; right: 0; top: 8px; z-index: 3; text-align: center; font: 900 18px var(--font); color: #fff; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-text-stroke: 4px var(--outline); paint-order: stroke fill; text-shadow: 0 2px 0 var(--outline); }
.ga-ban-cat { position: absolute; left: 50%; top: 34px; height: 150px; width: 150px; transform: translateX(-50%); z-index: 2; object-fit: contain; filter: drop-shadow(0 0 12px var(--fc)) drop-shadow(0 4px 6px rgba(0,0,0,.4)); animation: gaFloat 3s ease-in-out infinite; }
.ga-ribbon { position: absolute; left: -34px; top: 38px; z-index: 4; width: 120px; transform: rotate(-35deg); text-align: center; padding: 2px 0; background: linear-gradient(90deg, #e8504a, #f6a04a); color: #fff; font: 900 15px var(--font); box-shadow: 0 2px 6px rgba(0,0,0,.4); -webkit-text-stroke: 2px #a02a28; paint-order: stroke fill; }
.ga-ban-info { position: absolute; left: 0; right: 0; bottom: 30px; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 6px; }
.ga-ban-name { font: 900 17px var(--font); color: #fff; -webkit-text-stroke: 3px var(--outline); paint-order: stroke fill; }
.ga-count { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 3; padding: 2px 12px; border-radius: 12px; background: rgba(40,15,60,.75); color: #fff; font: 800 13px var(--font); white-space: nowrap; border: 1.5px solid var(--fc); }
.ga-std-cats { position: absolute; left: 0; right: 0; top: 36px; z-index: 2; display: flex; justify-content: center; gap: 4px; }
.ga-std-cat { width: 108px; text-align: center; }
.ga-std-cat img { width: 104px; height: 120px; object-fit: contain; filter: drop-shadow(0 0 8px #f6c24a); animation: gaFloat2 3s ease-in-out infinite; }
.ga-std-cat:nth-child(2) img { animation-delay: -1s; } .ga-std-cat:nth-child(3) img { animation-delay: -2s; }
.ga-std-cat .rar { margin-top: -4px; position: relative; }
.ga-sec { margin: 10px 2px 4px; font: 900 14px var(--font); color: var(--rose-d); }
.ga-pity { margin-top: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(185,163,217,.2); text-align: center; font: 700 13px/1.35 var(--font); color: var(--ink); }
.ga-pity b { color: var(--rose-d); font-size: 14px; }
.ga-btns { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.ga-draw { flex: 1; flex-direction: column; gap: 0; min-height: 58px; padding: 4px 6px; }
.ga-draw .btn-lb { font-size: 17px; }
.ga-draw .btn-gold { font-size: 15px; }
.ga-draw .btn-gold img { width: 18px; height: 18px; object-fit: contain; }
.ga-odds { flex: none; min-width: 64px; min-height: 58px; padding: 4px 8px; }
.ga-sub { margin-top: 8px; text-align: center; font: 700 13px var(--font); color: #9a7484; }
@keyframes gaPop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gaFloat { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
@keyframes gaFloat2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* cards (reveal + summary) */
.ga-grid { display: grid; gap: 6px; justify-content: center; }
.ga-grid.c5 { grid-template-columns: repeat(5, 70px); }
.ga-grid.c4 { grid-template-columns: repeat(4, 72px); }
.ga-grid.c1 { grid-template-columns: 190px; }
.ga-card { --rc: #9ecbff; position: relative; height: 104px; border-radius: 12px; perspective: 600px; }
.ga-grid.c1 .ga-card { height: 270px; }
.ga-face, .ga-back { position: absolute; inset: 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 4px 2px 2px; overflow: hidden; }
.ga-face { background: linear-gradient(180deg, #fffdf8, #fde9ee); border: 3px solid var(--rc); box-shadow: 0 0 6px var(--rc); }
.ga-card.r-SR { --rc: #c58be0; } .ga-card.r-R { --rc: #6fa8d8; } .ga-card.r-N { --rc: #9fb7a8; }
.ga-card.r-SSR { --rc: #f0b44a; } .ga-card.r-SSR .ga-face { box-shadow: 0 0 12px #f7d977; background: linear-gradient(180deg, #fffbe8, #fbe3a8); }
.ga-card.r-UR { --rc: #e8504a; } .ga-card.r-UR .ga-face { border-color: transparent; background: linear-gradient(#fff6e6, #ffe0cf) padding-box, linear-gradient(120deg, #d8322e, #f6c24a, #ffe9a0, #d8322e) border-box; background-size: 100% 100%, 300% 100%; animation: gaUR 2.5s linear infinite; box-shadow: 0 0 14px #e8504a, 0 0 6px #f6c24a; }
@keyframes gaUR { to { background-position: 0 0, -300% 0; } }
.ga-face img.ga-pic { width: 100%; height: 52px; object-fit: contain; flex: none; }
.ga-grid.c1 .ga-face img.ga-pic { height: 170px; }
.ga-nm { font: 800 12px/1.2 var(--font); color: var(--ink); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ga-grid.c1 .ga-nm { font-size: 18px; margin-top: 4px; }
.ga-st { font: 800 9px/1.1 var(--font); color: #6b8a7d; max-width: 100%; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ga-grid.c1 .ga-st { font-size: 14px; line-height: 1.25; }
.ga-newb { position: absolute; top: 46px; left: 2px; z-index: 2; padding: 0 5px; border-radius: 8px; box-shadow: 0 1px 0 #fff; background: #e8504a; color: #fff; font: 900 11px/16px var(--font); animation: gaBlink 1s infinite; }
.ga-grid.c1 .ga-newb { top: 152px; left: 6px; font-size: 15px; line-height: 22px; padding: 0 9px; }
@keyframes gaBlink { 50% { transform: scale(1.12); } }
.ga-face .rar { position: absolute; top: 2px; right: 2px; font-size: 11px; padding: 0 5px; }
.ga-back { background: radial-gradient(circle at 50% 40%, #b58ae0, #5a3a8a); border: 3px solid #e5d3ff; justify-content: center; }
.ga-back img { width: 44px; height: 44px; object-fit: contain; opacity: .9; }
.ga-card.back .ga-face { display: none; }
.ga-card:not(.back) .ga-back { display: none; }
.ga-card.flipin .ga-face { animation: gaFlip .34s cubic-bezier(.2,1.4,.4,1); }
@keyframes gaFlip { from { transform: rotateY(90deg) scale(.8); } to { transform: none; } }
.ga-modal { width: 372px; padding: 18px 12px 14px; }

/* reveal overlay */
.ga-reveal { background: radial-gradient(circle at 50% 40%, #4a2a72, #1a0c2e 75%); z-index: 850; overflow: hidden; }
.ga-rv-bg { position: absolute; inset: 0; background: url(../assets/gacha-bg.webp) center/cover; opacity: .22; }
.ga-rv-stage { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.ga-rays { position: absolute; left: 50%; top: 330px; width: 700px; height: 700px; margin: -350px 0 0 -350px; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,120,.55) 0 8deg, rgba(255,214,120,0) 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 68%); mask: radial-gradient(circle, #000 10%, transparent 68%); }
.ga-rays.on { animation: gaRays 5s linear infinite, gaFadeIn .4s forwards; }
@keyframes gaRays { to { transform: rotate(360deg); } }
@keyframes gaFadeIn { to { opacity: 1; } }
.ga-cap { --gc: #9ecbff; position: absolute; left: 50%; top: 260px; width: 140px; height: 140px; margin-left: -70px; object-fit: contain; filter: drop-shadow(0 0 22px var(--gc)) drop-shadow(0 0 40px var(--gc));
  animation: gaDrop .6s cubic-bezier(.3,1.4,.5,1) both, gaShake .9s .6s ease-in-out; }
.ga-cap.ur { --gc: #ff7a4a; filter: drop-shadow(0 0 24px #e8504a) drop-shadow(0 0 44px #f6c24a); }
.ga-cap.gone { display: none; }
@keyframes gaDrop { from { transform: translateY(-400px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gaShake { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-12deg); } 30% { transform: rotate(12deg); } 45% { transform: rotate(-9deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-4deg) scale(1.1); } }
.ga-cards { position: absolute; left: 0; right: 0; top: 0; bottom: 90px; display: flex; align-items: center; justify-content: center; }
.ga-rv-btns { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 10px; z-index: 5; }
.ga-rv-btns .btn { min-height: 48px; min-width: 120px; }
.ga-rv-ok { animation: gaPop .25s cubic-bezier(.2,1.6,.4,1); }
