/* ガチャの演出（WebGL の動画・保留・10連の伏せ札・最後の1枚・発表・一覧）。画面の組み立ては js/screens/gacha.js
   （2026-09-30 社長「回している過程であたり要素が演出として変わっていってぞくぞくするように」「もっときれいに、ゴージャスに」
     「10連ガチャとかならノーマルとかも1つずつ出していって、最後にレアが何か、というワクワクする演出」）
   光の点滅は1秒に3回まで。文字の金属の色は background-clip:text（影は text-shadow だと色の上に乗るので、包んだ span の drop-shadow で付ける） */

/* ---- 1. 塔の動画 ---- */
.gprod { --lc: #4d8cff; }
.gprod[data-c="green"] { --lc: #45f07a; }
.gprod[data-c="red"] { --lc: #ff4038; }
.gprod[data-c="gold"] { --lc: #ffc53d; }
.gprod[data-c="rainbow"] { --lc: #ff4fd8; }
.g3d { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* 動画そのものは見せない（色は canvas で付ける）。display:none だと iPhone で再生が止まることがあるので、小さく透明にして置く */
.g3d-src { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* 保留のランプ: ひし形の宝石が4つ。拍ごとに左から灯る */
.ghold { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 7vh); z-index: 3; display: flex; gap: clamp(14px, 4vw, 24px); translate: -50% 0; pointer-events: none; }
.ghold i { --g: #4d8cff; position: relative; display: block; width: clamp(20px, 5.4vw, 32px); aspect-ratio: 1; rotate: 45deg; border-radius: 4px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.6); }
.ghold i b { position: absolute; inset: 16%; border-radius: 2px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 55%); opacity: 0; }
.ghold i[data-c="green"] { --g: #45f07a; }
.ghold i[data-c="red"] { --g: #ff4038; }
.ghold i[data-c="gold"] { --g: #ffc53d; }
.ghold i[data-c="rainbow"] { --g: #ff4fd8; }
.ghold i.on { background: radial-gradient(circle at 32% 30%, #fff 0 10%, var(--g) 46%, color-mix(in srgb, var(--g) 35%, #000) 100%); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 12px var(--g), 0 0 30px var(--g); animation: glamp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.ghold i.on b { opacity: 0.9; }
.ghold i.on[data-c="rainbow"] { background: radial-gradient(circle at 32% 30%, #fff 0 10%, transparent 40%), conic-gradient(#ff4fd8, #ffd34d, #6dffb4, #4fa8ff, #c070ff, #ff4fd8); animation: glamp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5) both, ghue 1.2s linear infinite; }
.ghold i.on.flip { animation-delay: 0s; }
@keyframes glamp { from { scale: 2.4; filter: brightness(3); } to { scale: 1; filter: none; } }

/* 色が上がったときの文字（チャンス!!・激アツ!!・確定!!） */
.gcall3 { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 15%); z-index: 3; text-align: center; font-size: clamp(42px, min(14vw, 13vh), 108px); line-height: 1.15; pointer-events: none; }
.gcall3 b { display: inline-block; padding: 0 0.22em; font-weight: 900; font-style: italic; letter-spacing: 0.04em; opacity: 0; }
.gcall3.in b { animation: gcall3 1.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.gcall3 span { display: inline-block; padding: 0 0.1em; color: transparent; -webkit-background-clip: text; background-clip: text; }
.gcall3 .c-red span { background-image: linear-gradient(180deg, #fff 0%, #ffd6cc 24%, #ff4a3a 47%, #8a0606 53%, #ff5a40 74%, #ffe2d6 100%); filter: drop-shadow(0 0 10px #ff2a1a) drop-shadow(0 0 26px rgba(255, 40, 20, 0.7)) drop-shadow(0 4px 0 #3a0000); }
.gcall3 .c-gold span { background-image: linear-gradient(180deg, #fffbe6 0%, #ffe89a 24%, #ffc53d 47%, #8a5006 53%, #ffd34d 72%, #fff6d0 100%); filter: drop-shadow(0 0 10px #ffb31a) drop-shadow(0 0 30px rgba(255, 190, 40, 0.75)) drop-shadow(0 4px 0 #3a2000); }
.gcall3 .c-rainbow span { background-image: linear-gradient(100deg, #ff4fd8, #ffd34d 22%, #6dffb4 40%, #4fa8ff 60%, #c070ff 80%, #ff4fd8); background-size: 200% 100%; filter: drop-shadow(0 0 10px rgba(255, 79, 216, 0.95)) drop-shadow(0 0 30px rgba(122, 27, 255, 0.7)) drop-shadow(0 4px 0 #1a0030); animation: gcallrb 1s linear infinite; }
@keyframes gcall3 { 0% { opacity: 0; transform: scale(2.6) skewX(-8deg); } 14% { opacity: 1; transform: scale(0.94) skewX(-8deg); } 22% { transform: scale(1.04) skewX(-8deg); } 30%, 76% { opacity: 1; transform: scale(1) skewX(-8deg); } 100% { opacity: 0; transform: scale(1.12) translateY(-14px) skewX(-8deg); } }
@keyframes gcallrb { to { background-position: -200% 0; } }
/* 描き文字の絵（img/ui/call_*.webp）。絵がもう前のめりなので、傾けずに少し回すだけ。出る瞬間は白く光らせる */
.gcall3 b.pic { padding: 0; line-height: 0; }
.gcall3 b.pic img { display: block; width: min(98vw, 60vh, 660px); height: auto; margin: 0 auto; }
.gcall3.in b.pic { animation: gcall3i 1.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes gcall3i { 0% { opacity: 0; transform: scale(2.8) rotate(-7deg); filter: brightness(4); } 14% { opacity: 1; transform: scale(0.93) rotate(-4deg); filter: brightness(2.2); } 22% { transform: scale(1.06) rotate(-4deg); filter: brightness(1.4); } 30%, 76% { opacity: 1; transform: scale(1) rotate(-4deg); filter: brightness(1); } 100% { opacity: 0; transform: scale(1.14) translateY(-14px) rotate(-4deg); filter: brightness(1.6); } }

/* 動画が流せないときの光の玉（WebGL が無い・自動再生が止められた） */
.gfall3 { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(60% 45% at 50% 45%, color-mix(in srgb, var(--lc) 38%, #05020c), #05020c 80%); }
/* 回る光の筋とぼかした背景は、画面と同じ大きさの canvas に描く（js/gacha3d.js の backdrop）。
   180〜200vmax の conic-gradient＋mask を CSS で回すと、iPhone で1枚 100MB を超える層になり、SSR の発表で WebView が落ちた（2026-09-30） */
.gfx { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.gfall3 { --cx: 50%; --cy: 45%; }
.gorb3 { --rc: #4d8cff; position: relative; width: min(46vw, 34vh, 280px); aspect-ratio: 1; margin-top: -10vh; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff 0 7%, var(--rc) 34%, color-mix(in srgb, var(--rc) 30%, #05020c) 82%); box-shadow: 0 0 30px var(--rc), 0 0 90px var(--rc), inset 0 -12px 30px rgba(0, 0, 0, 0.45); }
.gorb3.pop { animation: gorbpop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.gprod[data-c="rainbow"] .gorb3 { background: radial-gradient(circle at 36% 30%, #fff 0 7%, transparent 30%), conic-gradient(#ff4fd8, #ffd34d, #6dffb4, #4fa8ff, #c070ff, #ff4fd8); animation: gorbpop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.4) both, spin 1.6s linear 0.4s infinite; }

/* ---- 2. 10連の伏せ札 ---- */
.gflip { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; container-type: size; background: #05020c; cursor: pointer; }
.gflip-bg { position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 48%, #2c0f52, #05020c 82%); }
.gflip-cir { position: absolute; left: 50%; top: 48%; width: 140vmin; height: 140vmin; translate: -50% -50%; opacity: 0.16; animation: spin 70s linear infinite; pointer-events: none; }
/* 縦の画面は4列（4・4・2）。横の画面は5列×2段。札の幅は高さにも合わせる */
.gflip-grid { --cw: min(calc((94cqw - 30px) / 4), calc((100cqh - var(--safe-t) - var(--safe-b) - 150px) / 3 * 0.716), 132px); position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: calc(var(--cw) * 4 + 30px); }
@media (orientation: landscape) {
  .gflip-grid { --cw: min(calc((90cqw - 40px) / 5), calc((100cqh - var(--safe-t) - var(--safe-b) - 96px) / 2 * 0.716), 150px); width: calc(var(--cw) * 5 + 40px); }
}
.gflip-hint { position: relative; font-size: 13px; font-weight: 800; color: rgba(255, 255, 255, 0.8); text-shadow: 0 1px 4px #000; animation: pulse 1.6s ease-in-out infinite; }

.gfc { --rc: #9aa3b8; position: relative; flex: none; width: var(--cw); aspect-ratio: 63 / 88; perspective: 900px; animation: gfcin 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) calc(0.25s + var(--k, 0) * 0.06s) both; }
@keyframes gfcin { from { opacity: 0; transform: translateY(60vh) rotate(-24deg) scale(0.5); } 70% { opacity: 1; } to { opacity: 1; transform: none; } }
.gfc-in { position: absolute; inset: 0; }
.gfc-back, .gfc-front { position: absolute; inset: 0; }
.gfc-front { opacity: 0; }
/* 裏: 紺の地に金の縁と塔の紋章。光が斜めに走る */
.gfc-back { overflow: hidden; border-radius: 4.8% / 3.4%; background: radial-gradient(90% 70% at 50% 40%, #3b1b6e, #120824 72%); box-shadow: inset 0 0 0 2px #e0bb62, inset 0 0 0 4px #3a2200, inset 0 0 0 5px rgba(255, 222, 140, 0.55), 0 4px 12px rgba(0, 0, 0, 0.6); transition: box-shadow 0.25s; }
.gfc-emb { position: absolute; inset: 16% 10%; background: linear-gradient(160deg, #fff3c8, #d9a53a 45%, #7a4a0a); -webkit-mask: url(/img/gacha/circle.webp) center / contain no-repeat; mask: url(/img/gacha/circle.webp) center / contain no-repeat; opacity: 0.9; }
/* 細い帯を走らせる（札の 2.6 倍の幅の層を動かさない） */
.gfc-shine { position: absolute; left: 0; top: -20%; bottom: -20%; width: 52%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42) 50%, transparent); transform: translateX(-190%) skewX(-15deg); animation: gfcshine 2.6s ease-in-out calc(var(--k, 0) * 0.12s) infinite; }
@keyframes gfcshine { 0%, 55% { transform: translateX(-190%) skewX(-15deg); } 100% { transform: translateX(300%) skewX(-15deg); } }
/* SR 以上: めくる前に裏がレアの色に光って震える */
.gfc.hint .gfc-back { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 5px var(--rc), inset 0 0 18px var(--rc), 0 0 18px var(--rc), 0 0 40px var(--rc); animation: gfchint 0.4s ease-in-out both; }
@keyframes gfchint { 0%, 100% { transform: none; } 20% { transform: translateX(-2px) rotate(-2deg); } 40% { transform: translateX(2px) rotate(2deg); } 60% { transform: translateX(-2px) rotate(-1deg); } 80% { transform: translateX(1px); } }
/* めくる: 真横を向いたところで表に替える（3D の裏面の扱いが端末で違うので、表と裏は透明度で切り替える） */
.gfc.open .gfc-in { animation: gfcflip 0.46s cubic-bezier(0.3, 0, 0.3, 1) both; }
.gfc.open .gfc-back, .gfin.leak .gfc.open .gfc-back { animation: gfcoff 0.46s linear both; }
.gfc.open .gfc-front { animation: gfcon 0.46s linear both; }
@keyframes gfcflip { 0% { transform: rotateY(0deg) scale(1); } 50% { transform: rotateY(90deg) scale(1.14); } 50.1% { transform: rotateY(-90deg) scale(1.14); } 100% { transform: rotateY(0deg) scale(1); } }
@keyframes gfcoff { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes gfcon { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
/* めくった瞬間の光。レアが上がるほど大きく */
.gfc::after { content: ""; position: absolute; inset: -12%; z-index: 1; border-radius: 50%; pointer-events: none; opacity: 0; }
.gfc.open::after { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.75), color-mix(in srgb, var(--rc) 60%, transparent) 50%, transparent 76%); mix-blend-mode: screen; animation: gfcburst 0.5s ease-out 0.22s both; }
.gfc.open.k-n::after { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.45), transparent 70%); }
.gfc.open.k-sr::after, .gfc.open.k-ssr::after, .gfc.open.k-ur::after { inset: -45%; animation-duration: 0.75s; }
.gfc.open.k-sr .gfc-front, .gfc.open.k-ssr .gfc-front, .gfc.open.k-ur .gfc-front { filter: drop-shadow(0 0 6px var(--rc)) drop-shadow(0 0 16px var(--rc)); }
@keyframes gfcburst { from { opacity: 1; transform: scale(0.5); } to { opacity: 0; transform: scale(1.7); } }

/* ---- 3. 最後の1枚: 真ん中でためてからめくる ---- */
.gfin { --lc: #4d8cff; --cx: 50%; --cy: 42%; position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; container-type: size; }
.gfin-aura { position: absolute; left: 50%; top: 42%; width: min(130cqw, 95cqh); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, var(--lc), color-mix(in srgb, var(--lc) 30%, transparent) 45%, transparent 72%); opacity: 0.35; transition: opacity 0.3s; }
.gfin.leak .gfin-aura { opacity: 0.8; animation: gaura 0.45s ease-in-out infinite alternate; }
.gfin.opened .gfin-aura { opacity: 0.6; background: radial-gradient(closest-side, var(--rc), color-mix(in srgb, var(--rc) 30%, transparent) 45%, transparent 72%); animation: none; }
@keyframes gaura { to { scale: 1.12; } }
.gfin[data-c="rainbow"] .gfin-aura { animation: spin 5s linear infinite, ghue 1.2s linear infinite; }
.gfc.big { --cw: min(60cqw, 52cqh * 0.716, 340px); margin-top: -14cqh; animation: none; }
.gfc.big .gfc-back { box-shadow: inset 0 0 0 3px #e0bb62, inset 0 0 0 6px #3a2200, inset 0 0 0 7px rgba(255, 222, 140, 0.55), 0 0 24px var(--lc), 0 0 60px color-mix(in srgb, var(--lc) 60%, transparent); }
.gfc.big.beat { animation: gbeat 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes gbeat { 0% { transform: scale(1); filter: brightness(1); } 22% { transform: scale(1.1); filter: brightness(1.6); } 100% { transform: scale(1); filter: brightness(1); } }
/* 光が漏れる: 縁が白く燃えて小刻みに震える（金以上） */
.gfin.leak .gfc.big .gfc-back { box-shadow: inset 0 0 0 3px #fff, inset 0 0 24px var(--lc), 0 0 0 2px #fff, 0 0 30px var(--lc), 0 0 100px var(--lc); animation: gleak 0.09s linear infinite; }
@keyframes gleak { 0% { translate: 0 0; } 25% { translate: -1.5px 1px; } 50% { translate: 1.5px -1px; } 75% { translate: -1px -1px; } }
.gfin.opened .gfc.big .gfc-front { filter: drop-shadow(0 0 10px var(--rc)) drop-shadow(0 0 30px var(--rc)); }
.gfin-info { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 12px); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 14px; }
.gfin-foot { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 520px; min-height: 48px; }
.gfin-foot .gacts { width: 100%; animation: sayin 0.25s ease-out; }
.gfin-foot .gacts .btn { min-width: 0; }
@media (orientation: landscape) {
  .gfc.big { --cw: min(34cqw, 76cqh * 0.716, 340px); margin: 0 0 0 -30cqw; }
  .gfin { --cx: 35%; --cy: 50%; }
  .gfin-aura { left: 35%; top: 50%; }
  .gfin-info { left: auto; top: 0; width: min(46%, 440px); justify-content: center; padding: calc(var(--safe-t) + 8px) calc(env(safe-area-inset-right, 0px) + 16px) calc(var(--safe-b) + 8px) 8px; }
}

/* ---- 4. 発表（SSR 以上とキャラ）: 影絵 → 光の爆発 → 魔法陣・ルーン・光の筋・★・名前 ---- */
.grev3 { z-index: 5; } /* めくりの場（3）と最後の1枚（4）の上。スキップ（6）より下 */
/* ための入り: 黒い幕を 0.35 秒で下ろす。めくった札と光の筋が透けて残り、真っ黒のコマを挟まない */
.grev3.pre { animation: grevdim 0.35s ease-out both; }
@keyframes grevdim { from { background-color: transparent; } }
.grev3 .grev-fig { position: absolute; inset: 0; z-index: 1; }
.grev3 .grev-art, .grev3 .grev-full { animation: none; }
.grev3.go .grev-art { animation: gartin 0.6s cubic-bezier(0.15, 0.85, 0.3, 1) both; }
.grev3.go .grev-full { animation: gfullin 0.5s cubic-bezier(0.15, 0.85, 0.3, 1) both, gbob 3.2s ease-in-out 0.6s infinite alternate; }
@keyframes gbob { to { translate: 0 -1.2%; } }
/* ため: 絵は影絵に縁の光。ほかの層は伏せておく */
.grev3.pre .grev-full { filter: brightness(0) drop-shadow(0 0 1px #fff) drop-shadow(0 0 12px var(--rc)); animation: gsil 0.85s ease-out both; }
.grev3.pre .grev-art { opacity: 0; }
.grev3.go .grev-sil { display: none; }
.grev3 .gburst .coin { top: 102%; } /* 下の角から噴き上げる（左右の位置は gacha.js の burst） */
@keyframes gsil { from { opacity: 0.3; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
.grev3.pre .grev-info, .grev3.pre .grev-zoom { display: none; }
/* 後光 */
.grev-halo { position: absolute; left: var(--cx); top: var(--cy); width: var(--s); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, #fff 0%, var(--rc) 20%, color-mix(in srgb, var(--rc) 40%, transparent) 48%, transparent 72%); opacity: 0; pointer-events: none; }
.grev3.pre .grev-halo { animation: ghalopre 0.85s ease-out both; }
.grev3.go .grev-halo { animation: ghalogo 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) both, ghalobr 2.6s ease-in-out 1.1s infinite alternate; }
.grev3.k-ur.go .grev-halo { animation: ghalogo 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) both, ghue 2.4s linear infinite; }
@keyframes ghalopre { from { opacity: 0.4; scale: 0.2; } to { opacity: 0.85; scale: 0.5; } }
@keyframes ghalogo { 0% { opacity: 1; scale: 0.5; } 40% { opacity: 0.95; scale: 1.3; } 100% { opacity: 0.55; scale: 1; } }
@keyframes ghalobr { from { opacity: 0.55; scale: 1; } to { opacity: 0.75; scale: 1.06; } }
/* 魔法陣とルーンの輪（形は img/gacha/circle.webp・runering.webp の透明度。色は gacha3d.js の stamp が canvas に焼く。
   CSS の mask と mix-blend-mode は、同じ大きさの層を余分に持つので使わない） */
.grev-circle, .grev-runes { position: absolute; left: var(--cx); top: var(--cy); aspect-ratio: 1; translate: -50% -50%; pointer-events: none; opacity: 0; }
.grev-circle { width: calc(var(--s) * 0.95); height: calc(var(--s) * 0.95); }
.grev-runes { width: calc(var(--s) * 1.18); height: calc(var(--s) * 1.18); }
.grev3.pre .grev-circle { animation: gcirpre 0.85s cubic-bezier(0.3, 0, 0.4, 1) both; }
.grev3.go .grev-circle { animation: gcirgo 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both, spin 40s linear 0.7s infinite; }
.grev3.go .grev-runes { animation: grunego 0.8s ease-out 0.1s both, spinr 60s linear 0.9s infinite; }
.grev3.art .grev-runes { z-index: 2; }
@keyframes gcirpre { from { opacity: 0.35; transform: scale(0.3) rotate(-120deg); } to { opacity: 0.9; transform: scale(0.72) rotate(0deg); } }
@keyframes gcirgo { from { opacity: 1; transform: scale(0.72); } to { opacity: 0.55; transform: scale(1); } }
@keyframes grunego { from { opacity: 0; transform: scale(1.4) rotate(40deg); } to { opacity: 0.6; transform: scale(1) rotate(0deg); } }
@keyframes spinr { to { transform: rotate(-360deg); } }
/* 光の筋は2層（太い筋と細い白い筋が逆に回る）。gacha.js の reveal が backdrop に渡す */
/* 光の粒（js/gacha3d.js の sparks） */
.grev3.art .grev-pc { z-index: 2; } /* 一枚絵は背景つきで後ろの粒が隠れるので前に */
.grev-pc { position: absolute; inset: 0; z-index: 1; display: block; /* 立ち絵（.grev-fig・あとに並ぶ）の後ろ。光の後光になる */ width: 100%; height: 100%; pointer-events: none; }
/* ホロの光が画面を斜めに1回走る */
.grev-sheen { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
/* 細い帯を走らせる（前は画面の2倍の幅の層を動かしていた）。走り終わったら gacha.js が消す */
.grev-sheen::before { content: ""; position: absolute; left: 0; top: -20%; width: 46%; height: 140%; opacity: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5) 35%, color-mix(in srgb, var(--rc) 55%, #fff) 50%, rgba(255, 255, 255, 0.5) 65%, transparent); }
.grev3.go .grev-sheen::before { animation: gsheen 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; }
@keyframes gsheen { from { opacity: 0.8; transform: translateX(-160%) skewX(-24deg); } 99% { opacity: 0.8; } to { opacity: 0; transform: translateX(380%) skewX(-24deg); } }
/* 衝撃の輪2つと、横に伸びる光（レンズの光） */
.grev-shock { position: absolute; left: var(--cx); top: var(--cy); z-index: 2; width: 40vmin; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; opacity: 0; pointer-events: none; box-shadow: 0 0 0 3px #fff, 0 0 18px 6px var(--rc), inset 0 0 18px 6px var(--rc); }
.grev-shock.b { box-shadow: 0 0 0 1.5px #fff, 0 0 30px 10px var(--rc); }
.grev3.go .grev-shock { animation: gshock 0.75s cubic-bezier(0.1, 0.7, 0.3, 1) both; }
.grev3.go .grev-shock.b { animation-duration: 1s; animation-delay: 0.14s; }
@keyframes gshock { from { opacity: 1; scale: 0.1; } to { opacity: 0; scale: 4.2; } }
.grev-flare { position: absolute; left: 50%; top: var(--cy); z-index: 2; width: 180vmax; height: clamp(3px, 0.8vmin, 8px); translate: -50% -50%; border-radius: 50%; opacity: 0; pointer-events: none; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rc) 70%, #fff) 30%, #fff 50%, color-mix(in srgb, var(--rc) 70%, #fff) 70%, transparent); box-shadow: 0 0 18px 4px var(--rc); }
.grev3.go .grev-flare { animation: gflare 1s ease-out both; }
@keyframes gflare { 0% { opacity: 1; scale: 0.1 1; } 25% { opacity: 1; scale: 1 1.5; } 100% { opacity: 0; scale: 1.1 0.4; } }
.grev3 .grev-info { z-index: 3; }
.grev3 .grev-head { z-index: 3; }
/* ★が1つずつ付く */
.grev-stars { display: flex; gap: 4px; font-size: clamp(22px, 6vw, 34px); line-height: 1; }
.grev-stars i { font-style: normal; color: #ffd34d; text-shadow: 0 0 8px #ffd34d, 0 0 20px #ff9f1c, 0 2px 0 rgba(0, 0, 0, 0.6); animation: gstar 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.5) calc(0.55s + var(--j, 0) * 0.12s) both; }
.k-ur .grev-stars i { color: #fff; text-shadow: 0 0 8px #ff4fd8, 0 0 20px #7a1bff, 0 2px 0 rgba(0, 0, 0, 0.6); }
@keyframes gstar { from { opacity: 0; transform: scale(3) rotate(-90deg); } to { opacity: 1; transform: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  .grev-stars { font-size: 20px; }
}

/* ---- 5. 一覧（トレカの札・高いレアから） ---- */
.gshow3 { background: radial-gradient(70% 50% at 50% 40%, color-mix(in srgb, var(--rc) 22%, #1a0830), #05020c 80%); }
.gsum { display: flex; flex: none; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 480px; }
/* 縦の画面の10連: 3・4・3 の段。幅は4枚ぶん、高さは3段が画面に収まる方の小さい方（収まらないと下のボタンが札に重なった） */
.gsum:not(.one) { row-gap: 5px; }
.gsum:not(.one) > .tc { flex: none; width: min(calc((100% - 30px) / 4), calc((100dvh - var(--safe-t) - var(--safe-b) - var(--gsum-rest, 240px)) / 3 * 0.716)); margin-bottom: 5px; }
.gshow3.has-head { --gsum-rest: 285px; }
.gsum-br { flex: none; width: 100%; height: 0; }
.gsum.one { max-width: 240px; }
.gsum.one > .tc { flex: none; width: 100%; }
.gshow3 .gacts { padding-top: 10px; background: linear-gradient(rgba(5, 2, 12, 0), rgba(5, 2, 12, 0.92) 40%); }
@media (min-width: 600px) {
  .gsum:not(.one) { max-width: 760px; row-gap: 10px; }
  .gsum:not(.one) > .tc { width: calc((100% - 40px) / 5); margin-bottom: 0; }
  .gsum-br { display: none; }
}
/* 低い横の画面（スマホ横）: 2段だと下のセリフがボタンの帯に隠れた（844x390）。10枚を1列に */
@media (orientation: landscape) and (max-height: 520px) {
  .gsum:not(.one) { max-width: 100%; flex-wrap: nowrap; gap: 6px; }
  .gsum:not(.one) > .tc { flex: 0 1 auto; width: min(calc((100% - 54px) / 10), calc((100vh - var(--safe-t) - var(--safe-b) - var(--gsum-rest-l, 215px)) * 0.716)); min-width: 0; margin-bottom: 0; }
  .gshow3.has-head { --gsum-rest-l: 255px; }
  .gsum-br { display: none; }
  /* 小さい札（667x375 で 58px 幅）は名前が3行になって絵を隠した。題名は1行に */
  @container (max-width: 66px) { .gsum .tc-title { -webkit-line-clamp: 1; overflow-wrap: normal; word-break: keep-all; white-space: nowrap; text-overflow: ellipsis; display: block; } }
  .gsum.one { max-width: min(200px, calc((100vh - 170px) * 0.716)); }
}

/* 揺れ（発表の .grev は app.css で揺らしている） */
.gwrap.shake > .gflip, .gwrap.shake > .gfin { animation: gshake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

@media (prefers-reduced-motion: reduce) {
  .gwrap.shake > .gflip, .gwrap.shake > .gfin, .gflip-cir, .gfc-shine, .gfin-aura, .gfin.leak .gfc.big .gfc-back, .gcall3 .c-rainbow span, .ghold i.on[data-c="rainbow"], .gprod[data-c="rainbow"] .gorb3 { animation: none !important; }
  .gfc, .gfc.big.beat, .ghold i.on, .gcall3.in b, .grev3 .grev-halo, .grev3 .grev-circle, .grev3 .grev-runes, .grev3 .grev-full, .grev3 .grev-art, .grev-shock, .grev-flare, .grev-sheen::before, .grev-stars i { animation-duration: 0.01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
