/* 「スリーカード」Cute & スタイリッシュ ニュアンスカラースタイル定義 */

:root {
  --bg-primary: radial-gradient(circle at top left, #fff1f3 0%, #fffbf2 50%, #f0f7ff 100%);
  --bg-table: radial-gradient(circle at center, #ffd2d2 0%, #ecd0ec 50%, #d2e2f5 100%);
  --bg-table-border: #cca8b5;
  --accent-gold: #cfa87b;           /* マイルドなビスケットゴールド */
  --accent-gold-glow: rgba(207, 168, 123, 0.25);
  --accent-blue: #a3b8cc;           /* ダスティブルー */
  --accent-blue-glow: rgba(163, 184, 204, 0.25);
  --accent-red: #d9a0a0;            /* ダスティピンク（Cute！） */
  --accent-red-glow: rgba(217, 160, 160, 0.25);
  
  /* キャラクター・イメージカラー */
  --color-chichi: #7ba88a;          /* ちち：緑 */
  --color-mama: #dfb87c;            /* ママ：黄 */
  --color-hiiro: #7ea4c4;           /* ひいろ：青 */
  --color-iro: #cc8b8b;             /* いろちゃん：ピンク */
  
  --text-main: #4a3e3d;             /* ココアブラウン */
  --text-muted: #8c7e7d;            /* くすみブラウン */
  --text-white: #fffdfa;            /* オフホワイト */
  --card-bg: #fffdfa;               
  --card-border: #e6ded8;
  --card-width: 96px;
  --card-height: 154px;
  --card-border-radius: 18px;       
  --glass-bg: rgba(255, 255, 255, 0.7); 
  --glass-border: rgba(255, 255, 255, 0.5);
  --transition-speed: 0.25s;
}

/* 全体初期化 & 画面ピッタリ固定・ユラユラ防止 (ネイティブアプリ化) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* 🚫 画像が指でドラッグされてユラユラ動くのを100%防止 */
img, .card, .player-avatar, .bg-pattern, .bg-glow {
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
  pointer-events: auto;
}

html, body {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  height: -webkit-fill-available !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  touch-action: none !important; /* ブラウザ標準のユラユラ動くバウンススクロールを完全に遮断 */
  overscroll-behavior: none !important;
  overscroll-behavior-x: none !important;
  overscroll-behavior-y: none !important;
}

body {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
}

#app-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  height: -webkit-fill-available !important;
  overflow: hidden !important;
  touch-action: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 背景グロー */
.bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vmax;
  height: 90vmax;
  background: radial-gradient(circle, rgba(217, 160, 160, 0.15) 0%, rgba(207, 168, 123, 0.05) 40%, rgba(242, 235, 225, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* パターングリッド */
.bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: radial-gradient(rgba(140, 126, 125, 0.15) 1.5px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* 音響設定ボタン */
#sound-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
}

.sound-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(74, 62, 61, 0.05);
  backdrop-filter: blur(5px);
  transition: all var(--transition-speed);
}

.sound-btn:hover {
  background: #fff;
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

/* ターン切り替えトースト */
.turn-toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* 背景ボカシ・暗さを完全に撤廃 */
  z-index: 150;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  backdrop-filter: none; /* ボカシなし */
}

.turn-toast-overlay.active {
  opacity: 1;
}

.toast-content {
  background: #fffdfa;
  border: 4px solid var(--accent-gold);
  border-radius: 28px;
  padding: 12px 36px;
  box-shadow: 0 12px 28px rgba(74, 62, 61, 0.18), 0 0 15px rgba(255,255,255,0.8);
  transform: scale(0) rotate(-10deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* ポップで可愛い吹き出し風の装飾 */
.toast-content::after {
  content: '✨';
  position: absolute;
  top: -12px;
  right: -12px;
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.toast-content::before {
  content: '🎉';
  position: absolute;
  bottom: -12px;
  left: -12px;
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.turn-toast-overlay.active .toast-content {
  transform: scale(1) rotate(0deg);
}

#toast-player-name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-main);
  text-align: center;
  display: block;
  text-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* スクリーンの基本設計 */
.screen {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* 決定ボタン (POP ＆ キュート) */
.glow-btn {
  background: linear-gradient(135deg, #d8cfc4 0%, #c5bcae 100%);
  color: #786c6a;
  border: none;
  border-radius: 30px;
  padding: 14px 40px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.5px;
  opacity: 0.85;
}

/* 活性化準備完了状態 (キャラクター選択時) */
.glow-btn.ready, .glow-btn:not(#start-game-btn) {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(255, 117, 140, 0.45) !important;
  opacity: 1 !important;
}

.glow-btn.ready:hover, .glow-btn:not(#start-game-btn):hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 117, 140, 0.6) !important;
}

.glow-btn.ready:active, .glow-btn:not(#start-game-btn):active {
  transform: translateY(1px) scale(0.99);
}

.text-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 20px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.text-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: var(--text-main);
}

/* === 1. セットアップ画面 === */
#setup-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
  overscroll-behavior: contain;
  padding: 10px 8px;
  box-sizing: border-box;
}

#setup-screen::before,
#setup-screen::after {
  content: '';
  flex-grow: 1;
}

.setup-card {
  background: rgba(255, 253, 250, 0.88);
  border: 3.5px solid #fffdfa;
  border-radius: 36px;
  padding: 40px;
  width: 90%;
  max-width: 660px;
  box-shadow: 0 20px 60px rgba(217, 160, 160, 0.16);
  backdrop-filter: blur(24px);
  text-align: center;
  animation: fadeIn 0.6s ease;
}

/* 2D ぷよぷよニュアンスカラータイトルブロック */
.cube-title-container {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 25px;
}

.title-block {
  width: 56px;
  height: 56px;
  background: var(--bg-color);
  border: 3.5px solid #fffdfa; /* 太めの白フチ */
  border-radius: 18px; /* 角丸を丸くしてツルンと表現 */
  color: #fffdfa;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 0 16px rgba(255, 255, 255, 0.6), 
    0 6px 12px rgba(74, 62, 61, 0.1);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  
  /* プよプよアニメーション停止・ピタッと固定 */
  animation: none !important;
  transform: none !important;
}

/* つるつるした光沢ハイライト */
.title-block::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}

/* ぷよぷよアニメーション定義 */
@keyframes puyopuyo {
  0%, 100% {
    transform: scale(1) translateY(0);
    border-radius: 18px;
  }
  20% {
    transform: scale(1.12, 0.88) translateY(3px);
    border-radius: 14px 22px 14px 22px;
  }
  45% {
    transform: scale(0.88, 1.12) translateY(-6px);
    border-radius: 22px 14px 22px 14px;
  }
  70% {
    transform: scale(1.06, 0.94) translateY(1px);
    border-radius: 16px 20px 16px 20px;
  }
  85% {
    transform: scale(0.97, 1.03) translateY(-1px);
    border-radius: 19px 17px 19px 17px;
  }
}

/* タイトルブロックディレイ */
.title-block:nth-child(1) { animation-delay: 0s; }
.title-block:nth-child(2) { animation-delay: 0.15s; }
.title-block:nth-child(3) { animation-delay: 0.3s; }
.title-block:nth-child(4) { animation-delay: 0.45s; }
.title-block:nth-child(5) { animation-delay: 0.6s; }
.title-block:nth-child(6) { animation-delay: 0.75s; }

.game-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 30px;
}

.setup-section {
  margin-bottom: 28px;
  text-align: left;
}

.setup-section h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* ダイヤセレクター */
.diamond-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.diamond-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--card-border);
  border-radius: 20px;
  padding: 20px 14px 14px 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  opacity: 0.78;
}

.diamond-btn:hover {
  background: #ffffff;
  transform: translateY(-3px);
  opacity: 1;
  box-shadow: 0 10px 20px rgba(74, 62, 61, 0.08);
}

.diamond-btn.active {
  opacity: 1 !important;
  background: #ffffff !important;
  border-color: var(--accent-gold) !important;
  border-width: 3.5px !important;
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 14px 35px rgba(207, 168, 123, 0.65) !important;
}

/* ダイヤ選択中タグバッジ */
.diamond-selected-tag {
  display: none;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d49545 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(207, 168, 123, 0.4);
  white-space: nowrap;
  z-index: 5;
}

.diamond-btn.active .diamond-selected-tag {
  display: block;
  animation: tagPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.diamond-icon {
  font-size: 20px;
}

.diamond-text {
  font-weight: 700;
}

/* 大会優勝者報酬バッジ */
.tournament-reward-badge {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 237, 213, 0.7);
  border: 1.5px solid #f97316;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.15);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.tournament-reward-badge.hot-reward {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  border-color: #ea580c;
  color: #9a3412;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
  animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
  0% { transform: scale(1); box-shadow: 0 3px 8px rgba(234, 88, 12, 0.25); }
  100% { transform: scale(1.04); box-shadow: 0 5px 14px rgba(234, 88, 12, 0.45); }
}

.diamond-btn.active .tournament-reward-badge {
  background: #ffedd5;
  border-color: #ea580c;
  color: #9a3412;
  font-weight: 900;
}

.game-speed {
  font-size: 10px;
  color: var(--text-muted);
}

/* キャラクターセレクター */
.character-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.char-select-card {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--card-border);
  border-radius: 22px;
  padding: 14px 10px 10px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  opacity: 0.78;
}

.char-select-card:hover {
  background: #ffffff;
  transform: translateY(-3px);
  opacity: 1;
  box-shadow: 0 10px 20px rgba(74, 62, 61, 0.08);
}

.char-select-card.active {
  opacity: 1 !important;
  background: #ffffff !important;
  transform: translateY(-6px) scale(1.04);
}

/* 選択中タグバッジ */
.char-selected-tag {
  display: none;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff7f00 0%, #ff5500 100%);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(255, 127, 0, 0.4);
  white-space: nowrap;
  z-index: 5;
}

.char-select-card.active .char-selected-tag {
  display: block;
  animation: tagPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tagPopIn {
  0% { transform: translateX(-50%) scale(0.3); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* プレイヤーカラーごとの表示 (カードの配色と完全に同期) */
.char-select-card[data-char="chichi"] {
  border-color: var(--color-chichi);
  background: #f6faf7;
}
.char-select-card[data-char="chichi"] .char-name {
  color: var(--color-chichi);
}
.char-select-card[data-char="chichi"].active {
  border-color: var(--color-chichi) !important;
  border-width: 3.5px !important;
  box-shadow: 0 14px 35px rgba(123, 168, 138, 0.65) !important;
}
.char-select-card[data-char="chichi"].active .char-selected-tag {
  background: linear-gradient(135deg, #7ba88a 0%, #4a805c 100%);
  box-shadow: 0 3px 8px rgba(123, 168, 138, 0.5);
}

.char-select-card[data-char="mama"] {
  border-color: var(--color-mama);
  background: #fffdf7;
}
.char-select-card[data-char="mama"] .char-name {
  color: var(--color-mama);
}
.char-select-card[data-char="mama"].active {
  border-color: var(--color-mama) !important;
  border-width: 3.5px !important;
  box-shadow: 0 14px 35px rgba(223, 184, 124, 0.65) !important;
}
.char-select-card[data-char="mama"].active .char-selected-tag {
  background: linear-gradient(135deg, #dfb87c 0%, #b88a44 100%);
  box-shadow: 0 3px 8px rgba(223, 184, 124, 0.5);
}

.char-select-card[data-char="hiiro"] {
  border-color: var(--color-hiiro);
  background: #f6fafd;
}
.char-select-card[data-char="hiiro"] .char-name {
  color: var(--color-hiiro);
}
.char-select-card[data-char="hiiro"].active {
  border-color: var(--color-hiiro) !important;
  border-width: 3.5px !important;
  box-shadow: 0 14px 35px rgba(126, 164, 196, 0.65) !important;
}
.char-select-card[data-char="hiiro"].active .char-selected-tag {
  background: linear-gradient(135deg, #7ea4c4 0%, #4a759c 100%);
  box-shadow: 0 3px 8px rgba(126, 164, 196, 0.5);
}

.char-select-card[data-char="iro"] {
  border-color: var(--color-iro);
  background: #fffbfb;
}
.char-select-card[data-char="iro"] .char-name {
  color: var(--color-iro);
}
.char-select-card[data-char="iro"].active {
  border-color: var(--color-iro) !important;
  border-width: 3.5px !important;
  box-shadow: 0 14px 35px rgba(204, 139, 139, 0.65) !important;
}
.char-select-card[data-char="iro"].active .char-selected-tag {
  background: linear-gradient(135deg, #cc8b8b 0%, #a05a5a 100%);
  box-shadow: 0 3px 8px rgba(204, 139, 139, 0.5);
}

.char-select-img-container {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.03);
}

.char-select-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  transition: color 0.3s;
}

/* === 2. ゲームプレイ画面 === */
#game-screen {
  background: var(--bg-primary);
  background-image: 
    radial-gradient(rgba(255, 182, 193, 0.3) 15%, transparent 16%),
    radial-gradient(rgba(173, 216, 230, 0.25) 15%, transparent 16%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.game-header {
  height: 60px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 10;
  backdrop-filter: blur(5px);
}

.table-round-badge-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0;
  margin-top: -4px;
  position: relative;
  z-index: 40;
  pointer-events: none;
}

.table-round-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #ffffff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), 0 0 10px rgba(99, 102, 241, 0.35);
  border: 1.5px solid #f59e0b;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.round-indicator {
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #e11d48, #9333ea);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
  font-size: 13px;
  white-space: nowrap;
  display: inline-block;
}

#game-message {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 700;
}

/* ゲームテーブルレイアウト */
.game-table-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 10px 20px 30px 20px;
  margin-top: -25px;
}

.game-table {
  width: 92vw;
  height: 46vh;
  max-width: 960px;
  max-height: 420px;
  background: var(--bg-table);
  border: 14px solid var(--bg-table-border);
  box-shadow: 0 15px 40px rgba(74, 62, 61, 0.15), inset 0 0 80px rgba(0, 0, 0, 0.2);
  border-radius: 200px / 120px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ❄️ フローズン (HARD難易度) 専用テーマレイアウト */
#game-screen.stage-theme-frozen {
  background: radial-gradient(circle at center, #0284c7 0%, #0369a1 40%, #0c4a6e 85%, #021427 100%) !important;
  position: relative;
  overflow: hidden;
}

#game-screen.stage-theme-frozen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(rgba(224, 242, 254, 0.4) 15%, transparent 16%),
    radial-gradient(rgba(186, 230, 253, 0.3) 15%, transparent 16%);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  opacity: 0.8;
  pointer-events: none;
  animation: frozenFrostShimmer 6s infinite ease-in-out alternate;
}

@keyframes frozenFrostShimmer {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0.9; transform: scale(1.02); }
}

.game-table.stage-theme-frozen {
  background: radial-gradient(circle at center, #38bdf8 0%, #0284c7 50%, #0369a1 100%) !important;
  border: 14px solid #bae6fd !important;
  box-shadow: 
    0 0 60px rgba(56, 189, 248, 0.8), 
    inset 0 0 80px rgba(224, 242, 254, 0.6), 
    0 20px 50px rgba(2, 132, 199, 0.5) !important;
  transition: all 0.5s ease;
}

.stage-theme-frozen .table-round-badge {
  background: linear-gradient(135deg, #0c4a6e, #0284c7) !important;
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 6px 25px rgba(2, 132, 199, 0.6), 0 0 20px rgba(56, 189, 248, 0.8) !important;
}

.stage-theme-frozen .deck-pile {
  border: 2px solid #7dd3fc !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7) !important;
}

/* 💣 タイムボム (鬼難易度) 専用テーマレイアウト */
#game-screen.stage-theme-time-bomb {
  background: radial-gradient(circle at center, #7f1d1d 0%, #450a0a 45%, #180505 85%, #050000 100%) !important;
  position: relative;
  overflow: hidden;
}

#game-screen.stage-theme-time-bomb::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(rgba(245, 158, 11, 0.25) 15%, transparent 16%),
    radial-gradient(rgba(239, 68, 68, 0.3) 15%, transparent 16%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  opacity: 0.85;
  pointer-events: none;
  animation: bombPulseWarning 2s infinite ease-in-out;
}

@keyframes bombPulseWarning {
  0%, 100% { opacity: 0.6; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.25); }
}

.game-table.stage-theme-time-bomb {
  background: radial-gradient(circle at center, #ef4444 0%, #b91c1c 50%, #7f1d1d 100%) !important;
  border: 14px solid #fde047 !important;
  box-shadow: 
    0 0 70px rgba(239, 68, 68, 0.9), 
    inset 0 0 90px rgba(245, 158, 11, 0.7), 
    0 20px 60px rgba(127, 29, 29, 0.6) !important;
  animation: tableDangerPulse 1.8s infinite ease-in-out;
  transition: all 0.5s ease;
}

@keyframes tableDangerPulse {
  0%, 100% { box-shadow: 0 0 60px rgba(239, 68, 68, 0.8), inset 0 0 80px rgba(245, 158, 11, 0.6); }
  50% { box-shadow: 0 0 90px rgba(255, 68, 68, 1), inset 0 0 110px rgba(255, 200, 0, 0.9); }
}

.stage-theme-time-bomb .table-round-badge {
  background: linear-gradient(135deg, #450a0a, #991b1b) !important;
  border: 2px solid #fde047 !important;
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.7), 0 0 20px rgba(253, 224, 71, 0.8) !important;
}

.stage-theme-time-bomb .deck-pile {
  border: 2px solid #fde047 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.8) !important;
}

/* プレイヤーパネル */
.player-panel {
  position: absolute;
  background: rgba(255, 253, 250, 0.95);
  border: 2.5px solid var(--glass-border); 
  border-radius: 22px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 290px !important;
  box-sizing: border-box !important;
  box-shadow: 0 8px 25px rgba(74, 62, 61, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
  z-index: 3;
}

/* プレイヤーパネルの位置調整 (中央固定・山札衝突防止) */
.pos-top { position: absolute !important; top: -72px !important; left: 50% !important; transform: translateX(-50%) !important; }
.pos-left { position: absolute !important; left: -30px !important; top: 50% !important; transform: translateY(-50%) !important; }
.pos-right { position: absolute !important; right: -30px !important; top: 50% !important; transform: translateY(-50%) !important; }
.pos-bottom { position: absolute !important; bottom: -65px !important; left: 50% !important; transform: translateX(-50%) !important; }

/* 🎨 ふんわりプレーヤーカラー (ちち:緑, ママ:黄, ひいろ:青, いろちゃん:ピンク) */
.player-panel.color-chichi {
  background: linear-gradient(135deg, rgba(232, 245, 235, 0.96) 0%, rgba(206, 236, 213, 0.96) 100%) !important;
  border-color: #559f6d !important;
}

.player-panel.color-mama {
  background: linear-gradient(135deg, rgba(255, 251, 230, 0.96) 0%, rgba(254, 238, 188, 0.96) 100%) !important;
  border-color: #d9a54c !important;
}

.player-panel.color-hiiro {
  background: linear-gradient(135deg, rgba(232, 243, 252, 0.96) 0%, rgba(205, 230, 248, 0.96) 100%) !important;
  border-color: #5992c0 !important;
}

.player-panel.color-iro {
  background: linear-gradient(135deg, rgba(253, 238, 243, 0.96) 0%, rgba(252, 212, 222, 0.96) 100%) !important;
  border-color: #c97585 !important;
}

/* 各キャラの手番拍動グローアニメーション (位置非依存) */
.player-panel.color-chichi.active-turn {
  border-color: var(--color-chichi);
  animation: pulseChichi 1.6s infinite ease-in-out;
}
@keyframes pulseChichi {
  0% { box-shadow: 0 0 15px rgba(123, 168, 138, 0.3); }
  50% { box-shadow: 0 0 30px rgba(123, 168, 138, 0.7); }
  100% { box-shadow: 0 0 15px rgba(123, 168, 138, 0.3); }
}

.player-panel.color-mama.active-turn {
  border-color: var(--color-mama);
  animation: pulseMama 1.6s infinite ease-in-out;
}
@keyframes pulseMama {
  0% { box-shadow: 0 0 15px rgba(223, 184, 124, 0.3); }
  50% { box-shadow: 0 0 30px rgba(223, 184, 124, 0.7); }
  100% { box-shadow: 0 0 15px rgba(223, 184, 124, 0.3); }
}

.player-panel.color-hiiro.active-turn {
  border-color: var(--color-hiiro);
  animation: pulseHiiro 1.6s infinite ease-in-out;
}
@keyframes pulseHiiro {
  0% { box-shadow: 0 0 15px rgba(126, 164, 196, 0.3); }
  50% { box-shadow: 0 0 30px rgba(126, 164, 196, 0.7); }
  100% { box-shadow: 0 0 15px rgba(126, 164, 196, 0.3); }
}

.player-panel.color-iro.active-turn {
  border-color: var(--color-iro);
  animation: pulseIro 1.6s infinite ease-in-out;
}
@keyframes pulseIro {
  0% { box-shadow: 0 0 15px rgba(204, 139, 139, 0.3); }
  50% { box-shadow: 0 0 30px rgba(204, 139, 139, 0.7); }
  100% { box-shadow: 0 0 15px rgba(204, 139, 139, 0.3); }
}

/* 手番時もパネル位置を絶対固定！(グラグラ・ズレ・ピクつき完全防止) */
.pos-top.active-turn { transform: translateX(-50%) !important; }
.pos-bottom.active-turn { transform: translateX(-50%) !important; }
.pos-left.active-turn { transform: translateY(-50%) !important; }
.pos-right.active-turn { transform: translateY(-50%) !important; }

.player-panel.active-turn .turn-badge {
  display: inline-block;
  background: var(--text-main);
  color: var(--text-white);
}

/* アバター画像コンテナ */
.player-avatar-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-avatar-wrapper img, .player-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50% !important;
  object-fit: cover;
  box-sizing: border-box !important;
  display: block;
}

.player-panel.active-turn .player-avatar-wrapper::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  border: 2px dashed var(--accent-gold);
  border-radius: 50%;
  animation: rotateAvatarRing 6s linear infinite;
  pointer-events: none;
}

@keyframes avatarTurnGlow {
  0% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 2px rgba(255,215,0,0.4)); }
  100% { transform: scale(1.12); filter: brightness(1.22) drop-shadow(0 0 12px rgba(255,215,0,0.85)); }
}

@keyframes rotateAvatarRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.player-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* プレイヤー効果状態 (透視) */
.status-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: all 0.3s;
}

.player-panel.peeking .status-overlay {
  background: rgba(163, 184, 204, 0.15);
  box-shadow: inset 0 0 10px var(--accent-blue);
}

.player-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.turn-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  display: none;
}

.player-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.font-diamond {
  font-weight: 700;
  color: #c99359;
}

/* 中央エリア */
.table-center {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
  margin-top: 10px !important;
}

/* 山札 */
.deck-wrapper {
  position: relative;
  width: 90px;
  height: 135px;
  cursor: pointer;
  perspective: 600px;
}

.card-back-3d {
  width: 100%;
  height: 100%;
  border-radius: var(--card-border-radius);
  background: linear-gradient(135deg, #abbfae 0%, #839686 100%);
  border: 3px solid var(--text-white);
  box-shadow: 0 6px 12px rgba(74, 62, 61, 0.15);
  position: relative;
  transition: transform 0.2s;
}

.deck-wrapper:hover .card-back-3d {
  transform: translateY(-6px) translateZ(15px);
  box-shadow: 0 12px 25px rgba(171, 191, 174, 0.6);
}

.card-back-design {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-design::after {
  content: '♥';
  color: var(--text-white);
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.deck-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-blue);
  color: var(--text-white);
  font-weight: 800;
  font-size: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-table-border);
}

/* 捨て札場 */
.discard-wrapper {
  width: 90px;
  height: 135px;
  border: 2.5px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--card-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.discard-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 700;
}

/* === 3. 手札操作エリア === */
.player-hand-container {
  height: 210px;
  background: rgba(255, 255, 255, 0.88);
  border: 3px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 -10px 30px rgba(74, 62, 61, 0.08), 0 10px 25px rgba(0,0,0,0.05);
  border-radius: 24px 24px 24px 24px;
  margin: 0 auto;
  width: 96%;
  max-width: 1040px;
  position: relative;
  bottom: 12px;
  z-index: 10;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 30px;
}

#phase-instruction {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.hand-and-controls {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1000px;
  justify-content: center;
}

.hand-list {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* === カード全体のデザイン === */
.card {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-border-radius);
  background: var(--card-bg);
  border: 2.5px solid var(--card-border);
  box-shadow: 0 4px 12px rgba(74, 62, 61, 0.05);
  position: relative;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.2s, 
              box-shadow 0.2s, 
              height 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* イメージカラーに応じたカード背景とボーダー */
.card.char-chichi { border-color: var(--color-chichi); background: #f6faf7; }
.card.char-chichi .card-top { background: rgba(123, 168, 138, 0.15); }
.card.char-chichi .card-score { background: var(--color-chichi); }

.card.char-mama { border-color: var(--color-mama); background: #fffdf7; }
.card.char-mama .card-top { background: rgba(223, 184, 124, 0.15); }
.card.char-mama .card-score { background: var(--color-mama); }

.card.char-hiiro { border-color: var(--color-hiiro); background: #f6fafd; }
.card.char-hiiro .card-top { background: rgba(126, 164, 196, 0.15); }
.card.char-hiiro .card-score { background: var(--color-hiiro); }

.card.char-iro { border-color: var(--color-iro); background: #fffbfb; }
.card.char-iro .card-top { background: rgba(204, 139, 139, 0.15); }
.card.char-iro .card-score { background: var(--color-iro); }

/* 選択状態 */
.card.selected {
  border-color: var(--accent-blue);
  box-shadow: 0 8px 20px var(--accent-blue-glow);
  transform: translateY(-25px);
}

/* ホバー挙動 (PC・マウス操作時のみ有効にし、スマホ実機でのユラユラ跳ね上がりを防止) */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-26px) scale(1.02);
    box-shadow: 0 12px 24px rgba(74, 62, 61, 0.12);
    border-color: var(--accent-gold);
    z-index: 5;
  }
}

/* 📱 タッチ操作端末（スマホ）での固定化（タップしたカードのみ選択位置へピシッと移動） */
@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(74, 62, 61, 0.05);
  }
  .card.selected {
    transform: translateY(-20px) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 8px 20px var(--accent-blue-glow) !important;
  }
}

/* カードヘッダー */
.card-top {
  padding: 3px 6px 1px 6px; /* 上部の余白を極限まで詰め、下側も引き締める */
  display: flex;
  flex-direction: column;
  align-items: center; /* 要素を左右中央揃えにする */
  justify-content: flex-start;
  min-height: 32px; /* 高さを32pxにまで削減して文字をさらに上へ寄せる */
  z-index: 2;
  border-bottom: 1px solid rgba(0,0,0,0.02);
}

.card-score {
  color: var(--text-white);
  font-weight: 800;
  font-size: 13px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card.character-joker .card-score {
  background: var(--accent-red);
}

.card-title {
  font-size: 11px;
  font-weight: 800; /* 太字を強調 */
  color: var(--text-main);
  white-space: normal;
  word-break: break-all;
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
  margin-top: 1px; /* 数字（スコア）との間隔を最小限にして上に配置 */
  text-align: center; /* タイトルテキストを中央揃えにする */
  line-height: 1.15;
  width: 100%; /* 横幅いっぱいに広げてセンタリングを確実にする */
}

/* カード画像 */
.card-img-container {
  flex: 1;
  width: 100%; /* 横幅いっぱいに広げる */
  background: #fff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* 余計なインライン隙間を排除 */
  margin: 0 auto;  /* 左右中央マージンを強制 */
  transition: transform 0.3s;
}

/* カードフッター (ホバーせり上がり説明文システム) */
.card-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.95);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 5;
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none; /* マウスイベントを透過してホバーを邪魔しない */
}

/* カードホバー時にフッターをスッと上にスライドイン */
.card:hover .card-bottom {
  transform: translateY(0);
}

.card-bottom p {
  font-size: 9px;
  line-height: 1.25;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.25s;
}

/* ホバー時にフッター拡大 */
.card:hover .card-bottom {
  height: 90px;
  background: #fffdfa;
  border-top-color: var(--accent-gold);
}

.card:hover .card-bottom p {
  -webkit-line-clamp: unset;
  font-size: 10.5px;
  color: var(--text-main);
}

/* スキルカード (ブラックベース) */
.card.type-skill {
  border-color: #383838;
  background: #1c1c1c;
}
.card.type-skill .card-top {
  background: #2b2b2b;
  border-bottom-color: rgba(255,255,255,0.06);
}
.card.type-skill .card-title {
  color: #fffdfa;
}
.card.type-skill .card-score {
  background: #444444;
  color: #fffdfa;
}
.card.type-skill .card-img-container {
  background: #141414;
}
.card.type-skill .card-bottom {
  background: rgba(28, 28, 28, 0.96) !important;
  border-top-color: rgba(255,255,255,0.12) !important;
}
.card.type-skill .card-bottom p {
  color: #b0a5a4;
}
.card.type-skill:hover .card-bottom {
  background: #1c1c1c;
  border-top-color: var(--accent-gold);
}
.card.type-skill:hover .card-bottom p {
  color: #fffdfa;
}

/* ジョーカー (ブラックベース) */
.card.character-joker {
  border-color: #592525;
  background: #241414;
}
.card.character-joker .card-top {
  background: #381c1c;
  border-bottom-color: rgba(255,255,255,0.06);
}
.card.character-joker .card-title {
  color: #fffdfa;
}
.card.character-joker .card-score {
  background: var(--accent-red);
  color: #fffdfa;
}
.card.character-joker .card-img-container {
  background: #1f0d0d;
}
.card.character-joker .card-bottom {
  background: rgba(43, 24, 24, 0.96) !important;
  border-top-color: rgba(255,255,255,0.12) !important;
}
.card.character-joker .card-bottom p {
  color: #e3bcbc;
}
.card.character-joker:hover .card-bottom {
  background: rgba(36, 20, 20, 0.98) !important;
  border-top-color: var(--accent-red) !important;
}
.card.character-joker:hover .card-bottom p {
  color: #fffdfa;
}

/* 捨て札 */
.discard-wrapper .card {
  position: absolute;
  cursor: default;
}
.discard-wrapper .card:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(74, 62, 61, 0.05);
}
.discard-wrapper .card:hover .card-bottom {
  height: 42px;
}

/* ボタン群 */
.action-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--card-border);
  color: var(--text-main);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(74, 62, 61, 0.03);
}

.action-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* アクション決定ボタン */
.select-action-btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #8ea5b8 100%);
  color: var(--text-white);
  border: none;
  box-shadow: 0 4px 12px var(--accent-blue-glow);
}

.select-action-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #b3c7d6 0%, #8ea5b8 100%);
  box-shadow: 0 6px 16px var(--accent-blue);
}

.action-btn.skill-btn {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b89265 100%);
  color: var(--text-white);
  border: none;
  box-shadow: 0 4px 12px var(--accent-gold-glow);
}

.action-btn.skill-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e0be96 0%, #b89265 100%);
  box-shadow: 0 6px 16px var(--accent-gold);
}

/* あがり宣言ボタン (赤・金グラデーションで激しく脈動) */
.win-declare-btn {
  background: linear-gradient(135deg, #d96868 0%, #d4a373 100%) !important;
  color: #fffdfa !important;
  border: 3.5px solid #fffdfa !important;
  box-shadow: 0 0 20px rgba(217, 104, 104, 0.6) !important;
  padding: 16px 28px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  border-radius: 16px !important;
  animation: pulseWinBtn 1.2s infinite alternate !important;
}

@keyframes pulseWinBtn {
  0% { transform: scale(0.98); box-shadow: 0 0 10px rgba(217, 104, 104, 0.5); }
  100% { transform: scale(1.06); box-shadow: 0 0 28px rgba(217, 104, 104, 0.95); }
}

/* === 4. 結果画面 === */
#result-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 12px 30px;
  box-sizing: border-box;
  z-index: 1000;
}

.result-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 20px 18px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 15px 40px rgba(74, 62, 61, 0.12);
  backdrop-filter: blur(20px);
  text-align: center;
  animation: fadeIn 0.5s ease;
  margin: auto 0;
  box-sizing: border-box;
}

#result-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

#result-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.result-standings {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(0,0,0,0.03);
}

.standing-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  align-items: center;
  font-size: 14px;
}

.standing-row.header {
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid rgba(0,0,0,0.06);
  font-size: 12px;
}

.standing-row:last-child {
  border-bottom: none;
}

.standing-row .rank {
  font-weight: 800;
}

.standing-row .rank.rank-1 { color: var(--accent-gold); }
.standing-row .rank.rank-2 { color: #888888; }
.standing-row .rank.rank-3 { color: #b07040; }

.standing-row .player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.standing-row .player-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* === モーダル === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(74, 62, 61, 0.35);
  z-index: 100;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fffdfa;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(74, 62, 61, 0.1);
  animation: scaleUp 0.3s ease;
}

.modal-content h3 {
  color: var(--text-main);
  margin-bottom: 6px;
}

#target-skill-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.target-players-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.target-player-btn {
  background: rgba(255,255,255,0.7);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.target-player-btn:hover {
  background: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 10px rgba(74,62,61,0.03);
}

.target-player-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* === トレード相手の手札選択モーダル === */
.trade-modal-content {
  max-width: 500px;
}

.trade-cards-selector {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.trade-card-back {
  width: 90px;
  height: 135px;
  border-radius: 14px;
  background: linear-gradient(135deg, #abbfae 0%, #839686 100%);
  border: 3px solid #fffdfa;
  box-shadow: 0 6px 14px rgba(74, 62, 61, 0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trade-card-back:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 20px rgba(131, 150, 134, 0.4);
}

.trade-card-back::after {
  content: '？';
  color: #fffdfa;
  font-size: 28px;
  font-weight: 800;
}

/* === 割り込みオーバーレイ === */
.interrupt-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(74, 62, 61, 0.4);
  z-index: 90;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.interrupt-overlay.active {
  display: flex;
}

.interrupt-box {
  background: #fffdfa;
  border: 3px solid var(--accent-gold);
  border-radius: 24px;
  padding: 30px;
  width: 90%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(74, 62, 61, 0.15);
  animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.interrupt-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.discard-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.discard-preview-container p {
  font-size: 14px;
  color: var(--text-muted);
}

/* タイマーバー */
.timer-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 24px;
}

.timer-bar {
  height: 100%;
  background: var(--accent-gold);
  width: 100%;
  border-radius: 3px;
}

.timer-bar.shrink {
  animation: shrinkTimer 3s linear forwards;
}

.interrupt-btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.interrupt-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.interrupt-btn.pickup {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #8ea5b8 100%);
  color: var(--text-white);
  box-shadow: 0 4px 12px var(--accent-blue-glow);
}

.interrupt-btn.pickup:hover {
  box-shadow: 0 6px 16px var(--accent-blue);
}

.interrupt-btn.force-pickup {
  background: linear-gradient(135deg, var(--accent-red) 0%, #ba7272 100%);
  color: var(--text-white);
  box-shadow: 0 4px 12px var(--accent-red-glow);
}

.interrupt-btn.force-pickup:hover {
  box-shadow: 0 6px 16px var(--accent-red);
}

.interrupt-btn.pass {
  background: rgba(0,0,0,0.03);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.interrupt-btn.pass:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text-main);
}

/* === 5. カットイン演出 === */
.cutin-layer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 200;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  backdrop-filter: none;
}

.cutin-layer.active {
  display: flex;
  animation: cutinFadeInOut 1.2s forwards;
}

.cutin-content {
  text-align: center;
  transform: scale(0.6);
  opacity: 0;
}

.cutin-layer.active .cutin-content {
  animation: cutinZoomInOut 1.2s forwards;
}

.cutin-title {
  font-size: 54px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 3px;
  text-shadow: 0 4px 15px rgba(74, 62, 61, 0.25);
  margin-bottom: 20px;
}

.cutin-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 4px solid var(--text-white);
  box-shadow: 0 10px 30px rgba(74, 62, 61, 0.15);
}

.cutin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cutin-message {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
}

.win-celebration-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65) !important;
  z-index: 300;
  justify-content: center;
  align-items: center;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: auto;
}

.win-celebration-overlay.active {
  display: flex;
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: none !important;
}

.celebration-content {
  text-align: center;
  z-index: 310;
  max-height: 92vh;
  overflow-y: auto;
  padding: 15px 20px 25px 20px;
  box-sizing: border-box;
  animation: zoomShake 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes zoomShake {
  0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  50% { transform: scale(1.15) rotate(10deg); }
  70% { transform: scale(0.95) rotate(-5deg); }
  80% { transform: scale(1.03) rotate(3deg); }
  90% { transform: scale(0.98) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.celebration-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 25px;
  letter-spacing: 1px;
}

.celebration-yaku {
  font-size: 76px;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 
    0 0 35px rgba(255, 215, 0, 0.6), 
    0 4px 15px rgba(0,0,0,0.6),
    0 8px 30px rgba(255, 215, 0, 0.4),
    0 -2px 0 #fff; /* 白の輪郭を追加して浮き上がらせる */
  display: inline-block;
  margin-bottom: 16px;
  letter-spacing: 3px;
  animation: yakuZoom 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.38) both;
}

.celebration-winner-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

@keyframes yakuZoom {
  0% { transform: scale(0.5); opacity: 0; filter: blur(5px); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

.celebration-quote-bubble {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  background: #fffdfa;
  color: var(--text-main);
  border: 3px solid var(--accent-gold);
  border-radius: 16px;
  padding: 8px 18px;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  z-index: 320;
  animation: bubbleFloat 1.2s infinite alternate ease-in-out;
}

.celebration-quote-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px 9px 0;
  border-style: solid;
  border-color: #fffdfa transparent;
  display: block;
  width: 0;
  z-index: 1;
}

.celebration-quote-bubble::before {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: var(--accent-gold) transparent;
  display: block;
  width: 0;
  z-index: 0;
}

@keyframes bubbleFloat {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-5px); }
}

.celebration-avatar-wrapper {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 6px solid #fffdfa;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  margin: 0 auto 25px;
  position: relative;
}

.celebration-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 閉じる✕ボタンのくっきり表示指定 */
#close-celebration-btn,
.close-celebration-btn,
#defeat-close-btn,
.defeat-close-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 9999999 !important;
}

.celebration-badge {
  position: absolute !important;
  top: -18px !important;
  bottom: auto !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) rotate(0deg) scale(0.9) !important;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  padding: 3px 12px !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6), 0 0 10px rgba(255, 255, 255, 0.8) !important;
  border: 1.5px solid #ffffff !important;
  z-index: 100 !important;
  white-space: nowrap !important;
  animation: badgeCrownPulse 1s infinite alternate;
}

@keyframes badgeCrownPulse {
  0% { transform: translateX(-50%) scale(0.95); }
  100% { transform: translateX(-50%) scale(1.08); }
}

.celebration-score {
  font-size: 34px;
  font-weight: 800;
  color: var(--accent-gold);
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  margin-bottom: 8px;
  animation: scorePulse 1.2s infinite ease-in-out alternate;
}

@keyframes scorePulse {
  0% { transform: scale(0.95); text-shadow: 0 0 12px rgba(255,215,0,0.4); }
  100% { transform: scale(1.1); text-shadow: 0 0 25px rgba(255,215,0,0.8), 0 0 40px rgba(255,215,0,0.3); color: #ffe680; }
}

.celebration-detail {
  font-size: 15px;
  color: var(--text-white);
  opacity: 0.95;
  text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 紙吹雪 */
.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 305;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 12px;
  background: var(--bg);
  opacity: 0.85;
  border-radius: 2px;
  animation: confettiFall 4.5s linear infinite;
}

.star-piece {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: starSpin 3.5s linear infinite !important;
}

@keyframes starSpin {
  0% { transform: translateY(-50px) rotate(0deg) scale(0.7); opacity: 1; }
  50% { transform: translateY(50vh) rotate(360deg) scale(1.2); }
  100% { transform: translateY(105vh) rotate(720deg) scale(0.7); opacity: 0; }
}

@keyframes confettiFall {
  0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* === スキル弾道エフェクト (光の弾) === */
.skill-projectile {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color);
  box-shadow: 0 0 20px var(--glow);
  pointer-events: none;
  z-index: 100;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* === ダイヤモンド移動エフェクト === */
.diamond-particle {
  position: fixed;
  font-size: 22px;
  pointer-events: none;
  z-index: 250;
  transition: transform 0.9s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.9s;
}

/* === アニメーション === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  80% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shrinkTimer {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes drawCardAnimation {
  from {
    transform: translateY(120px) rotate(20deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

@keyframes cutinFadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes cutinZoomInOut {
  0% { transform: scale(0.6); opacity: 0; }
  12% { transform: scale(1.1); opacity: 1; }
  18% { transform: scale(1.0); }
  85% { transform: scale(1.0); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}



/* カード配りパーティクル */
.dealt-card-particle {
  position: fixed;
  width: 48px;
  height: 72px;
  background: linear-gradient(135deg, #abbfae 0%, #8ca190 100%);
  border: 2px solid #fffdfa;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(74, 62, 61, 0.15);
  pointer-events: none;
  z-index: 999;
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.28s;
  transform-origin: center;
}

/* アバター直上の吹き出し */
.player-bubble {
  position: absolute;
  top: -76px;
  left: 10px;
  background: #fffdfa;
  color: var(--text-main);
  border: 3px solid var(--accent-gold);
  border-radius: 16px;
  padding: 10px 18px;
  font-size: 26px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(74, 62, 61, 0.2);
  z-index: 100;
  animation: bubbleFadeIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

.player-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 24px;
  border-width: 7px 7px 0;
  border-style: solid;
  border-color: #fffdfa transparent;
  display: block;
  width: 0;
  z-index: 1;
}

.player-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 23px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: var(--accent-gold) transparent;
  display: block;
  width: 0;
  z-index: 0;
}

@keyframes bubbleFadeIn {
  0% { transform: translateY(10px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* プラス5発動中のブーストオーラ */
.player-panel.boost-active {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 25px rgba(223, 184, 124, 0.7), inset 0 0 15px rgba(223, 184, 124, 0.4) !important;
  animation: boostGlowPulse 1.0s infinite alternate ease-in-out !important;
}

@keyframes boostGlowPulse {
  0% { 
    transform: translateY(0) scale(1); 
    box-shadow: 0 0 15px rgba(223, 184, 124, 0.5), inset 0 0 10px rgba(223, 184, 124, 0.3); 
  }
  100% { 
    transform: translateY(-4px) scale(1.03); 
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.8), 0 0 15px rgba(223, 184, 124, 0.4), inset 0 0 15px rgba(255, 215, 0, 0.3); 
    border-color: #ffd700 !important;
  }
}

/* あがり直前の台のピカピカ警告オーラ */
.player-panel.winning-aura-active {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 35px var(--accent-red), inset 0 0 20px var(--accent-red) !important;
  animation: winningAuraFlash 0.25s infinite alternate ease-in-out !important;
  z-index: 105;
}

@keyframes winningAuraFlash {
  0% { transform: scale(1.05); filter: brightness(1); }
  100% { transform: scale(1.12); filter: brightness(1.45); box-shadow: 0 0 45px #ff3b30, 0 0 20px #ffcc00; }
}

/* あがり時のお祝いカードリスト */
.celebration-cards-list {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 15px auto 25px;
  perspective: 1000px;
}

.celebration-cards-list .card {
  width: 90px;
  height: 135px;
  cursor: default;
  pointer-events: none;
  animation: cardReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.celebration-cards-list .card:nth-child(1) { animation-delay: 0.1s; transform: rotate(-5deg) translateY(5px); }
.celebration-cards-list .card:nth-child(2) { animation-delay: 0.25s; transform: rotate(0deg); }
.celebration-cards-list .card:nth-child(3) { animation-delay: 0.4s; transform: rotate(5deg) translateY(5px); }
.celebration-cards-list .card:nth-child(4) { animation-delay: 0.55s; transform: rotate(10deg) translateY(10px); }

@keyframes cardReveal {
  0% { transform: scale(0.3) rotateY(90deg); opacity: 0; }
  100% { opacity: 1; }
}

/* ==========================================
   10点以上・15点以上の強演出・激しいアピール
   ========================================== */

/* 1. 画面全体のゴゴゴゴ揺れ (10点以上) */
body.shake-heavy {
  animation: bodyShakeHeavy 1.5s ease-in-out;
}
@keyframes bodyShakeHeavy {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-3px, 2px) rotate(-0.5deg); }
  20%, 40%, 60%, 80% { transform: translate(3px, -2px) rotate(0.5deg); }
}

/* 2. 画面全体の超絶ズドオオオン大揺れ (15点以上) */
body.shake-extreme {
  animation: bodyShakeExtreme 1.5s ease-in-out;
}
@keyframes bodyShakeExtreme {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  5%, 25%, 45%, 65%, 85% { transform: translate(-8px, 6px) rotate(-1.5deg) scale(1.02); }
  15%, 35%, 55%, 75% { transform: translate(8px, -6px) rotate(1.5deg) scale(0.98); }
  95% { transform: translate(0, 0) scale(1.0); }
}

/* 3. 超絶ストロボフラッシュ用オーバーレイ (15点以上) */
.extreme-flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}
.extreme-flash-overlay.active {
  animation: extremeStrobe 1.5s ease-out;
}
@keyframes extremeStrobe {
  0% { opacity: 0; }
  4%, 12%, 20%, 28%, 36%, 44% { opacity: 0.95; }
  8%, 16%, 24%, 32%, 40%, 48% { opacity: 0; }
  60% { opacity: 0.75; }
  100% { opacity: 0; }
}

/* 4. 10点以上の強い発光オーラ */
.player-panel.winning-aura-active-strong {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 45px var(--accent-gold), inset 0 0 25px var(--accent-gold) !important;
  animation: winningAuraFlashStrong 0.2s infinite alternate ease-in-out !important;
  z-index: 105;
}
@keyframes winningAuraFlashStrong {
  0% { transform: scale(1.08); filter: brightness(1.1); }
  100% { transform: scale(1.16); filter: brightness(1.6); box-shadow: 0 0 55px #ffcc00, 0 0 25px #ff9500; }
}

/* 5. 15点以上の極限発光オーラ */
.player-panel.winning-aura-active-extreme {
  border-color: #ff3b30 !important;
  box-shadow: 0 0 60px #ff3b30, inset 0 0 35px #ff3b30 !important;
  animation: winningAuraFlashExtreme 0.12s infinite alternate ease-in-out !important;
  z-index: 105;
}
@keyframes winningAuraFlashExtreme {
  0% { transform: scale(1.1); filter: brightness(1.2) hue-rotate(0deg); }
  100% { transform: scale(1.22); filter: brightness(1.8) hue-rotate(360deg); box-shadow: 0 0 75px #ff3b30, 0 0 35px #ffd700; }
}

/* ==========================================
   対人戦 (PVP) マルチプレイヤー用スタイル
   ========================================== */

/* プレイモード選択 */
.mode-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

/* ==========================================
   💥 20点以上『オーバーキル！！！！！』カットイン演出 💥
   ========================================== */
.overkill-cutin-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  z-index: 25000;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
}

.overkill-cutin-overlay.active {
  display: flex;
  animation: overkillBgGlow 2.1s forwards;
}

@keyframes overkillBgGlow {
  0% { background: rgba(255, 255, 255, 0.95); }
  5% { background: rgba(180, 0, 30, 0.92); }
  100% { background: rgba(15, 5, 8, 0.9); }
}

.overkill-stage-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  position: relative;
  z-index: 25002;
}

.overkill-stamp {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 4px;
  opacity: 0;
  transform: scale(3) rotate(-10deg);
  text-shadow: 
    0 0 20px #ff4757,
    0 0 40px #ff6b81,
    0 4px 15px rgba(0, 0, 0, 0.9);
  color: #fffdfa;
  background: linear-gradient(180deg, #ffffff 0%, #ff4757 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 71, 87, 0.8));
}

.overkill-stamp-1.pop-in {
  animation: overkillStampPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.4) forwards;
}

.overkill-stamp-2.pop-in {
  animation: overkillStampPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.4) forwards;
}

@keyframes overkillStampPop {
  0% { opacity: 0; transform: scale(3.5) rotate(-15deg); filter: blur(10px); }
  70% { transform: scale(0.92) rotate(3deg); opacity: 1; filter: blur(0); }
  100% { transform: scale(1.0) rotate(0deg); opacity: 1; filter: blur(0); }
}

.overkill-banner-main {
  opacity: 0;
  transform: scale(0.2) rotate(15deg);
  background: linear-gradient(135deg, #1e0505 0%, #4a0000 50%, #1e0505 100%);
  border: 4px solid #ffd700;
  box-shadow: 
    0 0 50px #ff3b30,
    0 0 100px #ffd700,
    inset 0 0 30px #ff4757;
  border-radius: 28px;
  padding: 24px 48px;
  text-align: center;
  margin-top: 15px;
}

.overkill-banner-main.pop-in {
  animation: overkillBannerExplode 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.35) forwards;
}

@keyframes overkillBannerExplode {
  0% { opacity: 0; transform: scale(0.2) rotate(15deg); filter: blur(15px); }
  60% { transform: scale(1.15) rotate(-3deg); opacity: 1; filter: blur(0); }
  100% { transform: scale(1.0) rotate(0deg); opacity: 1; filter: blur(0); }
}

.overkill-title-text {
  font-size: 54px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 
    0 0 25px #ffd700,
    0 0 50px #ff4757,
    0 4px 10px rgba(0,0,0,0.8);
  letter-spacing: 4px;
  margin-bottom: 8px;
  animation: textPulseGlow 0.8s infinite alternate;
}

@keyframes textPulseGlow {
  0% { transform: scale(0.98); filter: brightness(1); }
  100% { transform: scale(1.04); filter: brightness(1.3); }
}

.overkill-sub-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.overkill-particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25001;
}

.overkill-spark-particle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 15px currentColor;
  opacity: 1;
  animation: particleExplode 0.9s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes particleExplode {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.1); opacity: 0; }
}

.mode-btn {
  flex: 1;
  padding: 10px 12px;
  min-height: 58px;
  border-radius: 20px;
  border: 2px solid var(--card-border);
  background: rgba(255, 255, 255, 0.7);
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
}

.mode-btn .mode-btn-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.mode-btn .mode-btn-sub {
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.85;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.mode-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 62, 61, 0.06);
  color: var(--text-main);
}

.mode-btn.active {
  background: linear-gradient(135deg, #a3b8cc 0%, #7ea4c4 100%) !important;
  border-color: #7ea4c4 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(126, 164, 196, 0.45) !important;
  transform: translateY(-1px);
}

/* マルチプレイ設定エリア */
#multiplay-setup-area {
  margin-top: 15px;
  padding: 18px;
  background: rgba(126, 164, 196, 0.05);
  border-radius: 16px;
  border: 1.5px dashed rgba(126, 164, 196, 0.3);
  animation: slideDownIn 0.3s ease-out;
}

@keyframes slideDownIn {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.multi-setup-row button.action-btn {
  padding: 12px 16px;
  height: 48px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(126, 164, 196, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background: #6891b5;
  transform: translateY(-1px);
}
.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.multi-setup-divider {
  text-align: center;
  margin: 10px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
}

/* Cuteな入力フォーム専用スタイル */
.cute-input-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  text-align: left;
  letter-spacing: 0.5px;
}

.cute-room-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px !important;
  height: 54px !important;
  border-radius: 18px !important;
  border: 2.5px solid #a3b8cc !important;
  background: #ffffff !important;
  font-family: 'Outfit', 'Noto Sans JP', sans-serif !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--accent-blue) !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
  outline: none;
  box-shadow: 0 5px 16px rgba(163, 184, 204, 0.28), inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.cute-room-input:focus {
  border-color: #d4a5a5 !important;
  box-shadow: 0 8px 22px rgba(212, 165, 165, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.01) !important;
  transform: translateY(-2px);
}

.cute-room-input::placeholder {
  font-size: 13px !important;
  letter-spacing: 0px !important;
  font-weight: 600 !important;
  color: #a8b6c8 !important;
  text-transform: none !important;
}

.btn-secondary {
  background: var(--text-main);
  color: #fff;
}
.btn-secondary:hover:not(:disabled) {
  background: #333;
  transform: translateY(-1px);
}

/* 待機ロビー画面 */
.lobby-card {
  max-width: 460px !important;
}

.lobby-room-info {
  background: #fff;
  border: 2px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  margin: 18px 0;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
}

.lobby-room-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.selectable-id {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--accent-blue);
  display: block;
  margin-top: 4px;
  user-select: all;
  cursor: pointer;
}

.lobby-tip {
  font-size: 11px !important;
  color: #a0aab8 !important;
  margin-top: 6px !important;
}

.lobby-players-container {
  text-align: left;
  margin-bottom: 22px;
}

.lobby-players-container h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.lobby-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lobby-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.lobby-player-row.is-me {
  border-color: var(--accent-blue);
  background: #fff;
}

.lobby-player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  object-fit: cover;
}

.lobby-player-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
}

.lobby-player-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-host {
  background: rgba(255, 215, 0, 0.2);
  color: #d4a017;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.badge-cpu {
  background: rgba(160, 170, 184, 0.15);
  color: #7b8ea8;
  border: 1px solid rgba(160, 170, 184, 0.3);
}

.badge-ready {
  background: rgba(123, 168, 138, 0.15);
  color: var(--color-chichi);
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================
   ガチャ ＆ コレクション・レア度別スタイル
   ========================================== */

/* コレクション ＆ ヘッダーボタン */
.collection-nav-btn {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4) !important;
  border: none !important;
  padding: 8px 14px !important;
}
.collection-nav-btn:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.6) !important;
}

/* ==========================================
   豪華版レア度枠線 (外側ネオンオーラ ＆ レアバッジ)
   ========================================== */

.player-avatar-wrapper, .icon-item-frame, .gacha-result-icon-frame {
  position: relative !important;
  display: inline-block;
}

/* レア度バッジタグは完全非表示 */
.rarity-badge-tag {
  display: none !important;
}

/* N: 白枠 */
.rarity-frame-n img {
  border: 3.5px solid #ffffff !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* R: 青枠 */
.rarity-frame-r img {
  border: 3.5px solid #3b82f6 !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

/* SR: 黄色枠 */
.rarity-frame-sr img {
  border: 3.5px solid #eab308 !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.5) !important;
}

/* SSR: 赤枠 */
.rarity-frame-ssr img {
  border: 3.5px solid #ef4444 !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5) !important;
}

/* UR: 虹 */
.rarity-frame-ur img {
  border: 4px solid transparent !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff) border-box !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  transform: scale(1.12) !important;
}

/* 🏷️ マイコレクション用 レア度バッジタグ */
.rarity-badge-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 5;
  color: #ffffff;
}
.rarity-badge-tag.rarity-n { background: #f8fafc; color: #0f172a; border: 1.5px solid #94a3b8; }
.rarity-badge-tag.rarity-r { background: #3b82f6; color: #ffffff; border: 1.5px solid #60a5fa; }
.rarity-badge-tag.rarity-sr { background: #eab308; color: #0f172a; border: 1.5px solid #fef08a; }
.rarity-badge-tag.rarity-ssr { background: #ef4444; color: #ffffff; border: 1.5px solid #f87171; }
.rarity-badge-tag.rarity-ur { background: linear-gradient(135deg, #ff0000, #ffff00, #00ff00, #0000ff); color: #ffffff; border: 1.5px solid #ffffff; text-shadow: 0 1px 2px #000; }

/* レコー/* 💀 裏ガチャモード (最高級・超プレミアムなダークゴールド＆パープルネオンテーマ！) */
.gacha-modal-content.back-mode {
  background: linear-gradient(145deg, #090514 0%, #170a2c 50%, #2e1065 100%) !important;
  border: 3.5px solid #a855f7 !important;
  color: #f3e8ff !important;
  box-shadow: 0 25px 70px rgba(168, 85, 247, 0.65), inset 0 0 30px rgba(168, 85, 247, 0.25) !important;
}

.gacha-modal-content.back-mode .cute-title {
  color: #fbbf24 !important;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.9), 0 0 25px rgba(168, 85, 247, 0.8) !important;
}

.gacha-modal-content.back-mode .ticket-status-pill {
  background: rgba(168, 85, 247, 0.25) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4) !important;
}

.gacha-modal-content.back-mode .gacha-type-tabs {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.gacha-modal-content.back-mode .gacha-type-tab-btn {
  color: #c084fc !important;
}

.gacha-modal-content.back-mode .gacha-type-tab-btn.active {
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.6) !important;
  border: 1px solid #c084fc !important;
}

.gacha-modal-content.back-mode .gacha-char-btn {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1.5px solid #6b21a8 !important;
  color: #e9d5ff !important;
}

.gacha-modal-content.back-mode .gacha-char-btn.active {
  background: linear-gradient(135deg, #9333ea 0%, #c084fc 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #f0abfc !important;
  box-shadow: 0 4px 18px rgba(192, 132, 252, 0.5) !important;
}

.gacha-modal-content.back-mode .gacha-machine-box {
  background: rgba(9, 5, 20, 0.75) !important;
  border: 2px solid #a855f7 !important;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.3) !important;
}

.gacha-modal-content.back-mode .gacha-capsule-glow-ring {
  background: linear-gradient(135deg, #a855f7, #dc2626, #7e22ce, #eab308) !important;
  animation: capsuleRingRotate 2.5s linear infinite !important;
}

/* 💀 裏ガチャ専用の特製ハイエンドボタン */
.btn-back-single {
  background: linear-gradient(135deg, #7e22ce 0%, #581c87 100%) !important;
  border: 2px solid #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(126, 34, 206, 0.6) !important;
}
.btn-back-single:hover {
  box-shadow: 0 12px 30px rgba(192, 132, 252, 0.8) !important;
}

.btn-back-multi {
  background: linear-gradient(135deg, #b45309 0%, #78350f 50%, #9333ea 100%) !important;
  border: 2px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 26px rgba(251, 191, 36, 0.55) !important;
}
.btn-back-multi:hover {
  box-shadow: 0 12px 35px rgba(251, 191, 36, 0.85) !important;
}

/* 裏ガチャの高確率プレミアピル */
.rarity-pill.ur-super {
  background: linear-gradient(135deg, #ff0000, #ffff00, #00ff00, #0000ff) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8) !important;
}
.rarity-pill.ssr-super {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8) !important;
} */
/* 🎰 TOP画面のヒマナイガチャ / マイコレクション専用スタイリッシュナビボタン */
.top-cute-nav-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
}

.top-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px !important;
  border-radius: 24px !important;
  border: 2px solid #ffffff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap !important;
}

.top-nav-btn:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}

.top-nav-btn.gacha-btn {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
}

.top-nav-btn.collection-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
}

/* モーダル内部スタイル */
.gacha-modal-content {
  max-width: 490px !important;
  padding: 24px !important;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 28px !important;
}

/* 🎰 通常ガチャ (上品で清潔感あふれる 白ニュアンスベース＆エレガントポップテーマ！) */
.gacha-modal-content.fancy-gacha-stage {
  background: linear-gradient(145deg, #ffffff 0%, #fff0f6 45%, #f3e8ff 100%) !important;
  border: 3.5px solid #f0abfc !important;
  color: #1e293b !important;
  box-shadow: 0 20px 60px rgba(240, 171, 252, 0.45) !important;
}

.fancy-gacha-stage .cute-title {
  color: #c084fc !important;
  text-shadow: 0 2px 8px rgba(192, 132, 252, 0.3) !important;
  font-size: 1.35rem !important;
  white-space: nowrap !important;
}

.fancy-gacha-stage .ticket-status-pill {
  background: #ffffff !important;
  border: 1.5px solid #d8b4fe !important;
  color: #475569 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  white-space: nowrap !important;
}

.ticket-status-pill.compact-status-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  border-radius: 20px !important;
  white-space: nowrap !important;
  margin-right: 32px !important;
}

.ticket-status-pill.compact-status-pill span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* 🎵 画面右上に常に美しく固定表示されるBGMタイトルバッジ (最前面表示確定！) */
#global-bgm-toast,
.global-bgm-toast {
  position: fixed !important;
  top: 18px !important;
  right: 20px !important;
  z-index: 9999999 !important;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
  border: 1.5px solid #a855f7 !important;
  color: #ffffff !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4), 0 2px 8px rgba(0,0,0,0.5) !important;
  pointer-events: none !important;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  white-space: nowrap !important;
}

#global-bgm-toast.show,
.global-bgm-toast.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
  display: block !important;
}

/* 🌈 ユーザーご指定：特製レコードBGM3曲（COLOR LEAF / ZARI ZARI / Can I look at your phone?）のレインボー枠スタイリング */
.global-bgm-toast.rainbow-bgm-toast {
  border: 2px solid transparent !important;
  background-image: linear-gradient(#1e1b4b, #1e1b4b), linear-gradient(135deg, #ff007f, #7928ca, #00dfd8, #ff4500, #ff007f) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  box-shadow: 0 0 20px rgba(0, 223, 216, 0.6), 0 0 35px rgba(255, 0, 127, 0.5) !important;
  animation: rainbowBgmPulse 3s infinite linear !important;
}

@keyframes rainbowBgmPulse {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes bgmPillGlow {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

/* 通常/裏ガチャ切り替えタブ */
.gacha-type-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.gacha-type-tab-btn {
  flex: 1;
  border: none !important;
  background: transparent;
  padding: 9px 14px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer;
  color: #64748b !important;
  transition: all 0.25s ease;
  white-space: nowrap !important;
}

.gacha-type-tab-btn.active {
  background: #ffffff !important;
  color: #a855f7 !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2) !important;
}

/* キャラクター選択タブ */
.gacha-char-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.9) !important;
  padding: 5px !important;
  border-radius: 20px !important;
  border: 1.5px solid #f5d0fe !important;
  box-shadow: 0 4px 14px rgba(240, 171, 252, 0.2) !important;
}

.gacha-char-btn {
  flex: 1;
  padding: 8px 10px !important;
  border-radius: 14px !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  cursor: pointer;
  transition: all 0.25s ease !important;
  white-space: nowrap !important;
}

.gacha-char-btn.active {
  background: linear-gradient(135deg, #e879f9 0%, #ec4899 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35) !important;
}

/* ステージボックス */
.gacha-machine-box {
  background: #ffffff !important;
  border: 2px solid #f5d0fe !important;
  border-radius: 24px !important;
  padding: 18px !important;
  text-align: center;
  box-shadow: 0 6px 20px rgba(240, 171, 252, 0.15) !important;
}

/* 💀 裏ガチャモード (最高級・超プレミアムなダークゴールド＆パープルネオンテーマ！) */
.gacha-modal-content.back-mode {
  background: linear-gradient(145deg, #090514 0%, #170a2c 50%, #2e1065 100%) !important;
  border: 3.5px solid #a855f7 !important;
  color: #f3e8ff !important;
  box-shadow: 0 25px 70px rgba(168, 85, 247, 0.65), inset 0 0 30px rgba(168, 85, 247, 0.25) !important;
}

.gacha-modal-content.back-mode .cute-title {
  color: #fbbf24 !important;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.9), 0 0 25px rgba(168, 85, 247, 0.8) !important;
  white-space: nowrap !important;
}

.gacha-modal-content.back-mode .ticket-status-pill {
  background: rgba(168, 85, 247, 0.25) !important;
  border: 1.5px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4) !important;
  white-space: nowrap !important;
}

.gacha-modal-content.back-mode .gacha-type-tabs {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.gacha-modal-content.back-mode .gacha-type-tab-btn {
  color: #c084fc !important;
}

.gacha-modal-content.back-mode .gacha-type-tab-btn.active {
  background: linear-gradient(135deg, #7e22ce 0%, #9333ea 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.6) !important;
  border: 1px solid #c084fc !important;
}

.gacha-modal-content.back-mode .gacha-char-btn {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1.5px solid #6b21a8 !important;
  color: #e9d5ff !important;
}

.gacha-modal-content.back-mode .gacha-char-btn.active {
  background: linear-gradient(135deg, #9333ea 0%, #c084fc 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #f0abfc !important;
  box-shadow: 0 4px 18px rgba(192, 132, 252, 0.5) !important;
}

.gacha-modal-content.back-mode .gacha-machine-box {
  background: rgba(9, 5, 20, 0.75) !important;
  border: 2px solid #a855f7 !important;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.3) !important;
}

.gacha-modal-content.back-mode .gacha-capsule-glow-ring {
  background: linear-gradient(135deg, #a855f7, #dc2626, #7e22ce, #eab308) !important;
  animation: capsuleRingRotate 2.5s linear infinite !important;
}

/* 中央のカプセルアバター演出 */
.gacha-stage-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.gacha-avatar-capsule-wrap {
  position: relative;
  width: 95px;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gacha-capsule-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff);
  animation: capsuleRingRotate 4s linear infinite;
  filter: blur(4px);
  opacity: 0.85;
}

@keyframes capsuleRingRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#gacha-target-avatar {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3.5px solid #ffffff;
  object-fit: cover;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* スタイリッシュなネオンレア度ピルバー */
.gacha-rarity-badge-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.rarity-pill {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 12px;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  white-space: nowrap !important;
}
.rarity-pill.ur { background: linear-gradient(135deg, #a855f7, #ec4899); border: 1px solid #ffffff; }
.rarity-pill.ssr { background: #eab308; color: #0f172a; border: 1px solid #ffffff; }
.rarity-pill.sr { background: #ef4444; border: 1px solid #ffffff; }
.rarity-pill.r { background: #3b82f6; border: 1px solid #ffffff; }
.rarity-pill.n { background: #64748b; border: 1px solid #ffffff; }

/* 🌟 ご指定の「1回まわす」「10回まわす」の横並びボタンコンテナ */
.gacha-btn-group-side {
  display: flex;
  gap: 12px;
  width: 100%;
}

.gacha-side-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px !important;
  border-radius: 20px !important;
  border: 2px solid #ffffff !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15) !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.gacha-side-btn:hover {
  transform: translateY(-3px) scale(1.03) !important;
}

.gacha-side-btn .btn-main-title {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap !important;
}

.gacha-side-btn .btn-sub-cost {
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.95;
  margin-top: 3px;
  white-space: nowrap !important;
}

/* 1回まわすボタン (華やかなピンク・パープル) */
.gacha-side-btn.btn-single {
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.35) !important;
}

/* 10回まわすボタン (熱いゴールド・オレンジネオン) */
.gacha-side-btn.btn-multi {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35) !important;
}

/* 💀 裏ガチャ専用の特製ハイエンドボタン */
.btn-back-single {
  background: linear-gradient(135deg, #7e22ce 0%, #581c87 100%) !important;
  border: 2px solid #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(126, 34, 206, 0.6) !important;
}
.btn-back-single:hover {
  box-shadow: 0 12px 30px rgba(192, 132, 252, 0.8) !important;
}

.btn-back-multi {
  background: linear-gradient(135deg, #b45309 0%, #78350f 50%, #9333ea 100%) !important;
  border: 2px solid #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 26px rgba(251, 191, 36, 0.55) !important;
}
.btn-back-multi:hover {
  box-shadow: 0 12px 35px rgba(251, 191, 36, 0.85) !important;
}

/* 裏ガチャの高確率プレミアピル */
.rarity-pill.ur-super {
  background: linear-gradient(135deg, #ff0000, #ffff00, #00ff00, #0000ff) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8) !important;
}
.rarity-pill.ssr-super {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8) !important;
}

/* スタイリッシュなネオンレア度ピルバー */
.gacha-rarity-badge-bar {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.rarity-pill {
  font-size: 11px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 12px;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.rarity-pill.ur { background: linear-gradient(135deg, #a855f7, #ec4899); border: 1px solid #ffffff; }
.rarity-pill.ssr { background: #eab308; color: #0f172a; border: 1px solid #ffffff; }
.rarity-pill.sr { background: #ef4444; border: 1px solid #ffffff; }
.rarity-pill.r { background: #3b82f6; border: 1px solid #ffffff; }
.rarity-pill.n { background: #64748b; border: 1px solid #ffffff; }

/* 🌟 ご指定の「1回まわす」「10回まわす」の横並びボタンコンテナ */
.gacha-btn-group-side {
  display: flex;
  gap: 12px;
  width: 100%;
}

.gacha-side-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px !important;
  border-radius: 22px !important;
  border: 2px solid #ffffff !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

.gacha-side-btn:hover {
  transform: translateY(-3px) scale(1.03) !important;
}

.gacha-side-btn .btn-main-title {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.gacha-side-btn .btn-sub-cost {
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.9;
  margin-top: 2px;
}

/* 1回まわすボタン (華やかなピンク・パープル) */
.gacha-side-btn.btn-single {
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(236, 72, 153, 0.5) !important;
}

/* 10回まわすボタン (熱いゴールド・オレンジネオン) */
.gacha-side-btn.btn-multi {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.5) !important;
}

.gacha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.gacha-header h2 {
  margin: 0;
  font-size: 18px;
}
.ticket-status-pill {
  background: rgba(255, 215, 0, 0.2);
  border: 1.5px solid #ffd700;
  color: #333;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
}

/* タブ切り替え (カプセルピル型POP＆キュート) */
.gacha-tab-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  background: rgba(245, 230, 230, 0.6) !important;
  padding: 6px !important;
  border-radius: 24px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

.collection-tab-btn, .gacha-tab-btn {
  flex: 1;
  padding: 10px 16px !important;
  border-radius: 20px !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-shadow: none !important;
}

.collection-tab-btn:hover, .gacha-tab-btn:hover {
  color: #1e293b !important;
  transform: translateY(-2px);
}

.collection-tab-btn.active, .gacha-tab-btn.active {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(255, 117, 140, 0.4) !important;
  transform: translateY(-2px) scale(1.02);
}

.gacha-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
}

/* キャラクター選択タブ (ぷっくりカラフルピル) */
.icon-char-selector, .gacha-char-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.8) !important;
  padding: 6px !important;
  border-radius: 22px !important;
  box-shadow: 0 4px 14px rgba(212, 165, 165, 0.18) !important;
}

.icon-char-tab, .gacha-char-btn {
  flex: 1;
  padding: 9px 8px !important;
  border-radius: 16px !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  cursor: pointer;
  transition: all 0.25s ease !important;
}

.icon-char-tab:hover, .gacha-char-btn:hover {
  color: #1e293b !important;
  transform: translateY(-1px);
}

.icon-char-tab.active, .gacha-char-btn.active {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35) !important;
  transform: scale(1.03);
}

.gacha-machine-box {
  background: #fff;
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
}

.gacha-machine-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
#gacha-target-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-blue);
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.gacha-rarity-rate-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
}
.rate-ur { color: #a855f7; }
.rate-ssr { color: #d97706; }
.rate-sr { color: #dc2626; }
.rate-r { color: #2563eb; }
.rate-n { color: #64748b; }
.rate-record { color: #d97706; font-weight: 800; background: #fef3c7; padding: 2px 6px; border-radius: 4px; margin-top: 2px; }

.gacha-draw-btn {
  width: 100%;
  padding: 12px !important;
  font-size: 15px !important;
}

/* TOP中央の枠なしCuteナビゲーションボタン */
.top-cute-nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 14px 0 20px;
}

.cute-center-icon-btn {
  background: transparent !important;
  border: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reset-icon {
  transition: transform 0.4s ease !important;
}
.cute-center-icon-btn:hover .reset-icon {
  transform: rotate(180deg) scale(1.15) !important;
}

.cute-center-icon-btn:hover {
  transform: translateY(-5px) scale(1.08);
}

.ability-table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ability-table-btn:hover {
  transform: scale(1.08);
}
.dokkiri-btn {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: #ffffff;
  border: 1.5px solid #f0abfc;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.85);
  font-weight: 900;
  animation: dokkiriBtnPulse 1.6s infinite ease-in-out;
}

@keyframes dokkiriBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(168, 85, 247, 0.6); }
  50% { transform: scale(1.06); box-shadow: 0 0 20px rgba(240, 171, 252, 0.95); }
}

.frozen-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  border: 1.5px solid #bae6fd;
}

.cute-icon-badge {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(212, 165, 165, 0.4));
  transition: transform 0.25s ease;
}
.cute-center-icon-btn:hover .cute-icon-badge {
  transform: rotate(-8deg) scale(1.1);
}

.cute-btn-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.cute-ticket-badge {
  background: #fef08a;
  border: 1.5px solid #f59e0b;
  color: #78350f;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 3px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* POPでキュート＆スタイリッシュ ニュアンスカラー コレクションカード */
.icon-collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-height: 270px;
  overflow-y: auto;
  padding: 8px;
}

.icon-item-card {
  background: linear-gradient(145deg, #ffffff 0%, #fff0f3 100%);
  border: none !important;
  border-radius: 22px !important;
  padding: 14px 8px !important;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  box-shadow: 0 8px 20px rgba(212, 165, 165, 0.22);
}

.icon-item-card:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 28px rgba(212, 165, 165, 0.35);
}

.icon-item-card.selected {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%) !important;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3) !important;
}

.icon-item-frame {
  width: 58px;
  height: 58px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-item-frame img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.equipped-tag {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  padding: 3px 9px !important;
  border-radius: 12px !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4) !important;
  z-index: 10 !important;
}

/* 🏷️ マイコレクション用 レア度バッジタグ */
.rarity-badge-tag {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  padding: 3px 10px !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  z-index: 10 !important;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.rarity-badge-tag.rarity-n { background: #64748b !important; color: #ffffff !important; border: 1.5px solid #ffffff !important; }
.rarity-badge-tag.rarity-r { background: #3b82f6 !important; color: #ffffff !important; border: 1.5px solid #ffffff !important; }
.rarity-badge-tag.rarity-sr { background: #eab308 !important; color: #0f172a !important; border: 1.5px solid #ffffff !important; }
.rarity-badge-tag.rarity-ssr { background: #ef4444 !important; color: #ffffff !important; border: 1.5px solid #ffffff !important; }
.rarity-badge-tag.rarity-ur { background: linear-gradient(135deg, #ff0000, #ffff00, #00ff00, #0000ff) !important; color: #ffffff !important; border: 1.5px solid #ffffff !important; text-shadow: 0 1px 2px #000 !important; }

/* ⚡ アビリティ専用スタイル (ボタン・装備枠・エフェクト) */

/* 卓上アクションボタンコンテナ (プレイヤーパネルの上部スペースに浮遊配置) */
.table-ability-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  position: absolute;
  top: -38px;
  right: 0px;
  z-index: 25;
}

.ability-table-btn {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.ability-table-btn:hover {
  transform: scale(1.08);
}
.dokkiri-btn {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: #ffffff;
  border: 2px solid #f0abfc;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.7);
  font-weight: 900;
  animation: dokkiriBtnPulse 1.8s infinite ease-in-out;
}

@keyframes dokkiriBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(168, 85, 247, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 22px rgba(240, 171, 252, 0.95); }
}

.frozen-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  border: 1.5px solid #bae6fd;
}

/* パネル上のアビリティバッジ & 氷漬け・盾演出 */
.player-ability-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
  white-space: nowrap;
  display: inline-block;
}
.badge-challenge { background: #fef08a; color: #854d0e; border: 1px solid #eab308; }
.badge-mighty { background: #e0f2fe; color: #0369a1; border: 1px solid #38bdf8; }
.badge-bomb { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; }
.badge-idol { background: #fce7f3; color: #9d174d; border: 1px solid #f472b6; }
.badge-frozen { background: #e0f2fe; color: #0284c7; border: 1px solid #0284c7; animation: pulse 1s infinite; }

/* 💣 タイムボム発動中 プレイヤーパネル視覚効果 */
.player-panel.time-bomb-active {
  position: relative;
  border: 2.5px solid #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.85), inset 0 0 20px rgba(239, 68, 68, 0.35) !important;
  animation: timeBombPanelPulse 1.2s infinite alternate ease-in-out;
}

@keyframes timeBombPanelPulse {
  0% { box-shadow: 0 0 15px rgba(239, 68, 68, 0.6), inset 0 0 10px rgba(239, 68, 68, 0.3); border-color: #ef4444 !important; }
  100% { box-shadow: 0 0 35px rgba(239, 68, 68, 1), inset 0 0 25px rgba(239, 68, 68, 0.6); border-color: #b91c1c !important; }
}

@keyframes timeBombPulse {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(239,68,68,0.7); }
  100% { transform: scale(1.04); box-shadow: 0 0 15px rgba(239,68,68,1); }
}

/* ❄️ 高品質・美麗フローズン氷漬けエフェクト (テキストなし・完全視覚演出) */
.player-panel.frozen-active {
  position: relative;
  overflow: hidden !important;
  border: 3px solid #38bdf8 !important;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.9), inset 0 0 25px rgba(224, 242, 254, 0.9) !important;
  animation: frozenPulseGlow 1.5s infinite alternate ease-in-out;
}

@keyframes frozenPulseGlow {
  0% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.6), inset 0 0 15px rgba(224, 242, 254, 0.7); }
  100% { box-shadow: 0 0 35px rgba(6, 182, 212, 1), inset 0 0 30px rgba(224, 242, 254, 1); }
}

/* リアル氷結晶ブロック・フロストガラスオーバーレイ */
.player-panel.frozen-active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    linear-gradient(135deg, rgba(186, 230, 253, 0.75) 0%, rgba(56, 189, 248, 0.55) 50%, rgba(3, 105, 161, 0.65) 100%),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 18px;
  z-index: 20;
  pointer-events: auto; /* 凍結中は操作を物理遮断 */
}

/* 氷の閃光光沢シマーアニメーション */
.player-panel.frozen-active::after {
  content: '';
  position: absolute;
  top: -100%; left: -100%; width: 300%; height: 300%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 60%
  );
  z-index: 21;
  pointer-events: none;
  animation: iceGlintShimmer 3s infinite linear;
}

@keyframes iceGlintShimmer {
  0% { transform: translate(-30%, -30%) rotate(0deg); }
  100% { transform: translate(30%, 30%) rotate(0deg); }
}

/* 💥 氷爆発割れ散る粒子アニメーション */
.ice-shard-particle {
  position: fixed;
  pointer-events: none;
  z-index: 35000;
  width: 14px;
  height: 24px;
  background: linear-gradient(135deg, #ffffff, #7dd3fc, #0284c7);
  clip-path: polygon(50% 0%, 100% 70%, 70% 100%, 0% 80%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
  border-radius: 2px;
  animation: iceShardFly 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes iceShardFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(var(--rot));
  }
}

/* 🛡️ マイティーガード 演出エフェクト */
.mighty-shield-barrier-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.45) 0%, rgba(3, 105, 161, 0.75) 100%);
  border: 3.5px solid #38bdf8;
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.95), inset 0 0 30px rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 25;
  backdrop-filter: blur(4px);
  animation: mightyShieldPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes mightyShieldPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.mighty-shield-barrier-overlay.shatter {
  animation: mightyShieldShatter 0.4s ease-out forwards;
}

@keyframes mightyShieldShatter {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15) rotate(3deg); filter: brightness(2); }
  100% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
}

.mighty-shield-emblem {
  font-size: 38px;
  filter: drop-shadow(0 0 12px #38bdf8);
  animation: floatShield 1s infinite alternate ease-in-out;
}

@keyframes floatShield {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.mighty-shield-title {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px #0284c7, 0 2px 4px rgba(0,0,0,0.8);
}

.mighty-shield-spark {
  font-size: 12px;
  font-weight: 900;
  color: #fef08a;
  margin-top: 4px;
  text-shadow: 0 0 8px #f59e0b;
}

.panel.shield-impact-flash, .player-panel.shield-impact-flash {
  animation: shieldImpactFlash 0.4s ease-out;
}

@keyframes shieldImpactFlash {
  0% { transform: scale(1); }
  30% { transform: scale(1.06); filter: brightness(1.6); }
  100% { transform: scale(1); }
}

/* 🛡️ 盾割れパティクル粒子 */
.shield-shard-particle {
  position: fixed;
  pointer-events: none;
  z-index: 35000;
  width: 12px;
  height: 20px;
  background: linear-gradient(135deg, #ffffff, #38bdf8, #f59e0b);
  clip-path: polygon(30% 0%, 100% 40%, 70% 100%, 0% 60%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 1);
  border-radius: 2px;
  animation: shieldShardFly 0.75s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes shieldShardFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.1) rotate(var(--rot)); }
}

.action-btn.frozen-action-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #7dd3fc !important;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.5) !important;
  font-weight: 900 !important;
  animation: frozenBtnPulse 1.5s infinite alternate ease-in-out !important;
}

.action-btn.dokkiri-action-btn {
  background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #f472b6 !important;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.5) !important;
  font-weight: 900 !important;
  animation: dokkiriBtnPulse 1.5s infinite alternate ease-in-out !important;
}

@keyframes dokkiriBtnPulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(236, 72, 153, 0.5); }
  100% { transform: scale(1.05); box-shadow: 0 0 20px rgba(217, 70, 239, 0.95); }
}

@keyframes frozenBtnPulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }
  100% { transform: scale(1.05); box-shadow: 0 0 20px rgba(56, 189, 248, 0.95); }
}

/* 禍々しい紫オーラ (キス・ザ・ジョーカー) */
.player-panel.purple-aura-active {
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.8), inset 0 0 15px rgba(147, 51, 234, 0.6) !important;
  border-color: #a855f7 !important;
  animation: pulsePurpleAura 1.5s infinite ease-in-out;
}
@keyframes pulsePurpleAura {
  0% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.5); }
  50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.9); }
  100% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.5); }
}

/* ⚡【マイコレクションモーダル】一見で見渡せる（スクロール不要）2列グリッド最適化 */
#collection-modal .modal-content {
  max-width: 680px !important;
  width: 95vw !important;
  padding: 16px 20px !important;
  max-height: 92vh !important;
  overflow: visible !important;
}

#collection-modal .gacha-header h2 {
  font-size: 1.25rem !important;
  margin-bottom: 4px !important;
}

#collection-modal .gacha-subtitle {
  font-size: 11px !important;
  margin-top: 2px !important;
  margin-bottom: 8px !important;
}

#collection-modal .gacha-tab-selector {
  margin-bottom: 10px !important;
}

#ability-collection-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  max-height: none !important;
  overflow-y: visible !important;
}

@media (max-width: 580px) {
  #ability-collection-list {
    grid-template-columns: 1fr !important;
  }
}

/* 所有アビリティカードアイテム (2スロット装備対応・コンパクト化) */
.ability-item-card {
  background: linear-gradient(145deg, #ffffff 0%, #fff7ed 100%);
  border: 2px solid #fdba74;
  border-radius: 12px !important;
  padding: 8px 10px !important;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px !important;
  cursor: pointer;
}
.ability-item-card.equipped-slot-1 {
  border-color: #ec4899 !important;
  background: linear-gradient(145deg, #fdf2f8 0%, #fbcfe8 100%) !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}
.ability-item-card.equipped-slot-2 {
  border-color: #3b82f6 !important;
  background: linear-gradient(145deg, #eff6ff 0%, #bfdbfe 100%) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.ability-slot-tag {
  position: static !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  padding: 1.5px 7px !important;
  border-radius: 8px !important;
  color: #fff;
  display: inline-block;
}
.slot-1-bg { background: #ec4899; }
.slot-2-bg { background: #3b82f6; }

.ability-count-badge {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #475569;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 1px 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 3px !important;
}

.ability-count-badge .count-num {
  font-size: 11.5px !important;
  font-weight: 900;
  color: #0f172a;
}

.ability-count-badge.awakening-glow {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #f97316;
  color: #c2410c;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.25);
}

.awakening-sparkle-tag {
  font-size: 9.5px !important;
  font-weight: 900;
  color: #ea580c;
  background: #ffedd5;
  padding: 1px 5px !important;
  border-radius: 6px !important;
  border: 1px solid #fdba74;
}

.ability-item-card.awakening-ready {
  border-color: #f97316 !important;
}

.ability-item-card.ability-locked {
  opacity: 0.55;
  filter: grayscale(0.8);
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

/* BGMコレクション表示 */
.bgm-collection-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  max-height: none !important;
  overflow-y: visible !important;
}

.bgm-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(145deg, #ffffff 0%, #fff0f3 100%);
  border: none !important;
  border-radius: 20px !important;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(212, 165, 165, 0.2);
}
.bgm-item-row.selected {
  background: linear-gradient(145deg, #fefce8 0%, #fef08a 100%) !important;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.3) !important;
}
.bgm-item-row.locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.bgm-item-disc {
  font-size: 24px;
}
.bgm-item-info {
  flex: 1;
  text-align: left;
}
.bgm-item-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.bgm-item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ガチャ結果演出カットイン */
.gacha-result-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none; /* デフォルトは完全に非表示にすることで前面クリック遮断を防ぐ */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.gacha-result-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gacha-result-banner {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 10px #ff9500;
  margin-bottom: 14px;
}

.gacha-result-icon-frame {
  width: 110px;
  height: 110px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gacha-result-icon-frame img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================
   イキナリあがり！ 雷イナズマ演出エフェクト
   ========================================== */
.thunder-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  display: none;
  background: rgba(255, 255, 255, 0);
}

.thunder-overlay.active {
  display: block;
  animation: thunderFlash 0.9s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes thunderFlash {
  0% { background: rgba(255, 255, 255, 0.95); }
  15% { background: rgba(255, 240, 150, 0.8); }
  30% { background: rgba(255, 255, 255, 0.9); }
  50% { background: rgba(255, 220, 100, 0.4); }
  100% { background: rgba(255, 255, 255, 0); }
}

.lightning-bolt {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 30px #ffff00, 0 0 60px #ff3b30, 0 0 100px #ffffff;
  transform: translateX(-50%) rotate(15deg);
  opacity: 0;
}

.thunder-overlay.active .lightning-bolt {
  animation: boltStrike 0.6s ease-out forwards;
}

@keyframes boltStrike {
  0% { opacity: 1; transform: translateX(-50%) rotate(-12deg) scaleY(0); }
  20% { opacity: 1; transform: translateX(-50%) rotate(15deg) scaleY(1); }
  40% { opacity: 0.8; transform: translateX(-48%) rotate(-10deg) scaleY(1); }
  60% { opacity: 1; transform: translateX(-52%) rotate(18deg) scaleY(1); }
  100% { opacity: 0; transform: translateX(-50%) rotate(0deg) scaleY(1); }
}

/* ==========================================
   ラストザムライ！ 一閃刀剣スラッシュ演出
   ========================================== */
.slash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

.slash-overlay.active {
  display: block;
}

.slash-line {
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 6px;
  background: linear-gradient(90deg, transparent 0%, #ffffff 50%, transparent 100%);
  box-shadow: 0 0 20px #ffffff, 0 0 40px #60a5fa, 0 0 60px #3b82f6;
  transform: translateY(-50%) rotate(-35deg) scaleX(0);
  opacity: 0;
}

.slash-overlay.active .slash-line {
  animation: samuraiSlash 0.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes samuraiSlash {
  0% { opacity: 1; transform: translateY(-50%) rotate(-35deg) scaleX(0); }
  40% { opacity: 1; transform: translateY(-50%) rotate(-35deg) scaleX(1); height: 12px; }
  70% { opacity: 0.9; transform: translateY(-50%) rotate(-35deg) scaleX(1); height: 2px; }
  100% { opacity: 0; transform: translateY(-50%) rotate(-35deg) scaleX(1); height: 0px; }
}

/* 美しいストロボフラッシュ演出 */
.gacha-flash-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #ffffff !important;
  z-index: 999999 !important;
  pointer-events: none !important;
  opacity: 0;
  display: none;
}
.gacha-flash-overlay.active {
  display: block !important;
  animation: gachaStrobeFlash 1.2s ease-out forwards !important;
}

@keyframes gachaStrobeFlash {
  0% { opacity: 0; }
  5% { opacity: 1; }
  10% { opacity: 0.15; }
  15% { opacity: 0.95; }
  22% { opacity: 0.2; }
  30% { opacity: 0.9; }
  45% { opacity: 0.1; }
  60% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* ==========================================
   🎰 ガチャ特設宇宙フィールド & 3Dコロコロカプセル
   ========================================== */
.gacha-universe-field {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: radial-gradient(circle, #1a1c29 0%, #08090f 100%) !important;
  z-index: 999998 !important;
  display: none; /* デフォルトは完全に非表示にすることで前面クリック遮断を防ぐ */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

/* 宇宙星くず背景 */
.gacha-stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 150px 100px, #ffd700, rgba(0,0,0,0)),
    radial-gradient(3px 3px at 250px 350px, #60a5fa, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 400px 180px, #ff7f00, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 500px 500px;
  animation: starsTwinkle 3s infinite alternate;
}
@keyframes starsTwinkle {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ガチャマシン本体 */
.gacha-machine-container {
  position: relative;
  width: 220px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  transform: scale(0.9);
  animation: machinePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes machinePop {
  0% { transform: scale(0.3) translateY(100px); opacity: 0; }
  100% { transform: scale(0.9) translateY(0); opacity: 1; }
}

/* ドーム（カプセル透明ケース） */
.gacha-machine-dome {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.1) 60%, rgba(0, 0, 0, 0.4) 100%);
  border: 4px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gacha-capsule-glass {
  position: relative;
  width: 100%;
  height: 100%;
}

.mini-capsule {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.cap-red { top: 70px; left: 30px; background: linear-gradient(135deg, #ef4444 50%, #ffffff 50%); transform: rotate(25deg); }
.cap-blue { top: 90px; left: 80px; background: linear-gradient(135deg, #3b82f6 50%, #ffffff 50%); transform: rotate(-40deg); }
.cap-gold { top: 40px; left: 70px; background: linear-gradient(135deg, #ffd700 50%, #ffffff 50%); transform: rotate(60deg); }
.cap-rainbow { top: 100px; left: 120px; background: linear-gradient(135deg, #a855f7 50%, #ffffff 50%); transform: rotate(15deg); }

/* マシン台座 */
.gacha-machine-base {
  width: 200px;
  height: 140px;
  background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
  border-radius: 20px 20px 30px 30px;
  border: 4px solid #fecaca;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 10px 0;
}

/* ハンドルレバー */
.gacha-lever-crank {
  width: 60px;
  height: 60px;
  background: #ffffff;
  border-radius: 50%;
  border: 4px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gacha-lever-crank.spin {
  transform: rotate(360deg);
}

.lever-handle {
  width: 44px;
  height: 14px;
  background: #475569;
  border-radius: 7px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 取り出し口 */
.gacha-exit-slot {
  width: 70px;
  height: 35px;
  background: #1e293b;
  border-radius: 12px 12px 0 0;
  border: 3px solid #64748b;
  box-shadow: inset 0 5px 10px rgba(0,0,0,0.8);
}

/* 転げ出る3Dカプセル */
.gacha-rolling-capsule {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%) scale(0);
  z-index: 10;
  pointer-events: none;
}
.gacha-rolling-capsule.rolling {
  animation: gachaRollOut 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* カプセルじらし（脈動・怪光発光） */
.gacha-rolling-capsule.suspense {
  animation: capsuleSuspensePulse 0.25s infinite alternate ease-in-out !important;
}
@keyframes capsuleSuspensePulse {
  0% { transform: translate(-50%, 100px) scale(1.35) rotate(-6deg); filter: brightness(1.1) drop-shadow(0 0 15px #ffffff); }
  100% { transform: translate(-50%, 95px) scale(1.5) rotate(6deg); filter: brightness(1.8) drop-shadow(0 0 50px #ffd700); }
}

@keyframes gachaRollOut {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  50% { transform: translate(-50%, 100px) scale(1.2) rotate(360deg); opacity: 1; }
  75% { transform: translate(-50%, 80px) scale(1.3) rotate(540deg); }
  100% { transform: translate(-50%, 100px) scale(1.4) rotate(720deg); opacity: 1; }
}

.capsule-half {
  position: absolute;
  width: 70px;
  height: 35px;
  border: 3px solid #ffffff;
  box-shadow: 0 0 20px rgba(255,255,255,0.6);
  transition: all 0.4s ease;
}
.capsule-top {
  top: 0;
  border-radius: 35px 35px 0 0;
  background: #3b82f6;
}
.capsule-bottom {
  bottom: 0;
  border-radius: 0 0 35px 35px;
  background: #ffffff;
}

/* パカッ！分割オープン */
.gacha-rolling-capsule.open .capsule-top {
  transform: translateY(-40px) rotate(-25deg);
  opacity: 0.8;
}
.gacha-rolling-capsule.open .capsule-bottom {
  transform: translateY(40px) rotate(25deg);
  opacity: 0.8;
}

/* パカッの瞬間フラッシュ */
.capsule-burst-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #ffffff 0%, rgba(255,215,0,0.8) 40%, transparent 80%);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  pointer-events: none;
}
.gacha-rolling-capsule.open .capsule-burst-flash {
  animation: burstFlash 0.5s ease-out forwards;
}
@keyframes burstFlash {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(2.5); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

.gacha-cutin-layer.active {
  display: flex !important;
}

/* 演出カラー期待度別カットイン (白・赤・金・虹) */
.gacha-cutin-layer.rarity-white {
  background: rgba(255, 255, 255, 0.45) !important;
  animation: whiteExpectationGlow 0.6s ease-out forwards !important;
}
@keyframes whiteExpectationGlow {
  0% { opacity: 0; background: rgba(255, 255, 255, 0.8); }
  50% { opacity: 1; background: rgba(255, 255, 255, 0.5); }
  100% { opacity: 0; background: rgba(255, 255, 255, 0); }
}

.gacha-cutin-layer.rarity-red {
  background: rgba(255, 71, 87, 0.2) !important;
  animation: redExpectationGlow 0.8s ease-out forwards !important;
}
@keyframes redExpectationGlow {
  0% { opacity: 0; background: rgba(255, 71, 87, 0.7); }
  30% { opacity: 1; background: rgba(255, 71, 87, 0.4); }
  100% { opacity: 0; background: rgba(255, 71, 87, 0); }
}

.gacha-cutin-layer.rarity-gold {
  background: rgba(255, 215, 0, 0.25) !important;
  animation: goldExpectationFlash 0.9s cubic-bezier(0.15, 0.85, 0.35, 1) forwards !important;
}
@keyframes goldExpectationFlash {
  0% { opacity: 0; background: rgba(255, 255, 255, 0.95); }
  30% { opacity: 1; background: rgba(255, 215, 0, 0.5); }
  100% { opacity: 0; background: rgba(255, 215, 0, 0); }
}

.gacha-cutin-layer.rarity-rainbow {
  background: rgba(0, 0, 0, 0.15) !important;
  animation: rainbowExpectationGlow 1.2s ease-out forwards !important;
}
@keyframes rainbowExpectationGlow {
  0% { opacity: 0; background: linear-gradient(135deg, rgba(255,117,140,0.8) 0%, rgba(126,164,196,0.8) 50%, rgba(255,215,0,0.8) 100%); }
  50% { opacity: 1; background: linear-gradient(135deg, rgba(255,117,140,0.5) 0%, rgba(126,164,196,0.5) 50%, rgba(255,215,0,0.5) 100%); }
  100% { opacity: 0; background: linear-gradient(135deg, rgba(255,117,140,0) 0%, rgba(126,164,196,0) 50%, rgba(255,215,0,0) 100%); }
}

/* N (ノーマル): 優しいホワイト光芒 */
.gacha-cutin-layer.rarity-n {
  background: rgba(255, 255, 255, 0.35) !important;
  animation: nWhiteGlow 0.45s ease-out forwards !important;
}
@keyframes nWhiteGlow {
  0% { opacity: 0; background: rgba(255, 255, 255, 0.6); }
  50% { opacity: 1; background: rgba(255, 255, 255, 0.4); }
  100% { opacity: 0; background: rgba(255, 255, 255, 0); }
}

/* R (レア): 青いビームが右から左に発射 */
.gacha-cutin-layer.rarity-r {
  background: rgba(15, 23, 42, 0.4) !important;
}
.gacha-cutin-layer.rarity-r .r-beam-line {
  position: absolute;
  top: 50%;
  right: -100%;
  width: 140%;
  height: 14px;
  background: linear-gradient(90deg, transparent 0%, #3b82f6 30%, #ffffff 50%, #60a5fa 70%, transparent 100%);
  box-shadow: 0 0 30px #3b82f6, 0 0 60px #ffffff, 0 0 100px #2563eb;
  transform: translateY(-50%);
  animation: rBeamShoot 0.65s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes rBeamShoot {
  0% { right: -120%; opacity: 1; }
  100% { right: 120%; opacity: 0; }
}

/* SR (スーパーレア): 赤く光る画面が細かく揺れる (地鳴り) */
.gacha-cutin-layer.rarity-sr {
  background: rgba(220, 38, 38, 0.45) !important;
  animation: srRedShake 0.08s infinite alternate ease-in-out !important;
}
@keyframes srRedShake {
  0% { transform: translate(-4px, 3px); }
  25% { transform: translate(5px, -3px); }
  50% { transform: translate(-3px, -5px); }
  75% { transform: translate(4px, 4px); }
  100% { transform: translate(2px, -3px); }
}

/* SSR (ダブルスーパーレア): 画面の上から雷が落ちて黄色に光る */
.gacha-cutin-layer.rarity-ssr {
  background: rgba(255, 215, 0, 0.3) !important;
  animation: ssrYellowFlash 0.6s ease-out forwards !important;
}
.gacha-cutin-layer.rarity-ssr .ssr-lightning-down {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 50px #ffffff, 0 0 90px #ffd700, 0 0 140px #f59e0b;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  animation: ssrStrikeDown 0.55s ease-out forwards;
}
@keyframes ssrStrikeDown {
  0% { transform: translateX(-50%) scaleY(0); opacity: 1; }
  40% { transform: translateX(-50%) scaleY(1); opacity: 1; }
  100% { transform: translateX(-50%) scaleY(1); opacity: 0; }
}
@keyframes ssrYellowFlash {
  0% { background: rgba(255, 255, 255, 0.95); }
  25% { background: rgba(255, 215, 0, 0.65); }
  100% { background: rgba(255, 215, 0, 0.1); }
}

/* UR (ウルトラレア): 画面右下から虹がかかるフワッとレインボー色に */
.gacha-cutin-layer.rarity-ur {
  background: rgba(0, 0, 0, 0.25) !important;
}
.gacha-cutin-layer.rarity-ur .ur-rainbow-arch {
  position: absolute;
  bottom: -220px;
  right: -220px;
  width: 160vw;
  height: 160vw;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 38%, rgba(255,0,0,0.6) 44%, rgba(255,127,0,0.6) 49%, rgba(255,255,0,0.6) 54%, rgba(0,255,0,0.6) 59%, rgba(0,240,255,0.6) 64%, rgba(0,0,255,0.6) 69%, rgba(139,0,255,0.6) 74%, transparent 80%);
  transform: scale(0.2);
  opacity: 0;
  animation: urRainbowExpand 0.95s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
@keyframes urRainbowExpand {
  0% { transform: scale(0.15) rotate(-25deg); opacity: 0; filter: blur(8px); }
  40% { opacity: 0.95; filter: blur(0px); }
  100% { transform: scale(1.15) rotate(0deg); opacity: 0.85; filter: blur(3px); }
}

/* Record (激レアレコード): ZARI ZARIが流れる */
.gacha-cutin-layer.rarity-record {
  background: rgba(15, 23, 42, 0.85) !important;
  animation: fadeIn 0.4s ease;
}

@keyframes bannerPop {
  0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  70% { transform: scale(1.25) rotate(3deg); opacity: 1; }
  100% { transform: scale(1.1) rotate(0deg); opacity: 1; }
}

/* 所有枚数バッジ & チケット交換ボタン */
.owned-count-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.exchange-ticket-btn {
  margin-top: 6px;
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 4px 6px !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4) !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exchange-ticket-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.6) !important;
}

/* ==========================================
   追加：スキルカットインのカード画像 ＆ プラス5場置きスタイル
   ========================================== */
.cutin-avatar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 15px 0;
}

.cutin-skill-card-wrap {
  width: 90px;
  height: 126px;
  perspective: 1000px;
  animation: cardDealCutin 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  animation-delay: 0.2s;
}

.cutin-skill-card-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  transform: rotate(5deg);
  transition: transform 0.3s ease;
}

.cutin-arrow-card-wrap {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 45px;
  height: 63px;
  z-index: 10;
  animation: cardDealCutin 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.cutin-arrow-card-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  border: 1.5px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

@keyframes cardDealCutin {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) rotate(-15deg) scale(0.6);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1);
  }
}

.cutin-skill-card-wrap {
  animation: cardDealCutinNormal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes cardDealCutinNormal {
  0% {
    opacity: 0;
    transform: translateY(40px) rotate(-15deg) scale(0.6);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(5deg) scale(1);
  }
}

/* プラス5場置きミニカードのビジュアル (絶対配置で本体パネル幅を崩さない＆左右揺れ完全防止) */
.placed-plus5-area {
  position: absolute !important;
  right: -34px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 !important;
  height: 48px;
  perspective: 600px;
  pointer-events: none;
  z-index: 50;
}

.placed-plus5-card {
  width: 32px;
  height: 45px;
  background-image: url('assets/cards/skill_5.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 5px;
  border: 1.5px solid #ff007f;
  box-shadow: 0 6px 12px rgba(255, 0, 127, 0.5), 0 0 8px rgba(255, 0, 127, 0.3);
  transform: rotateX(20deg) rotateY(-10deg);
  animation: none !important; /* ユラユラ浮遊を停止してピタッと固定 */
  cursor: pointer;
  position: relative;
}

.placed-plus5-card::after {
  content: '⚡ +5 BOOST';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 900;
  color: #ff007f;
  text-shadow: 0 0 4px rgba(255,0,127,0.4);
  white-space: nowrap;
}

@keyframes floatMiniCard {
  0% {
    transform: rotateX(20deg) rotateY(-10deg) translateY(0);
    box-shadow: 0 4px 10px rgba(255, 0, 127, 0.4);
  }
  100% {
    transform: rotateX(20deg) rotateY(-10deg) translateY(-4px);
    box-shadow: 0 8px 18px rgba(255, 0, 127, 0.6), 0 0 12px rgba(255, 0, 127, 0.5);
  }
}

/* --- 20秒制限タイマーバーのスタイル --- */
.turn-timer-container {
  position: absolute !important;
  top: -22px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 90% !important;
  max-width: 480px !important;
  margin: 0 !important;
  background: rgba(18, 28, 45, 0.85) !important;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  z-index: 15;
}
.turn-timer-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.turn-timer-seconds-flash {
  animation: timerSecondsWarning 0.5s ease infinite alternate;
}
.turn-timer-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.turn-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00f2fe 0%, #4facfe 100%);
  border-radius: 3px;
  transition: width 0.1s linear, background-color 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}
.turn-timer-bar.warning {
  background: linear-gradient(90deg, #ff0844 0%, #ffb199 100%);
  box-shadow: 0 0 10px rgba(255, 8, 68, 0.8);
  animation: timerBarFlash 0.5s infinite alternate;
}

@keyframes timerBarFlash {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}
@keyframes timerSecondsWarning {
  0% { color: #ff0844; transform: scale(1); }
  100% { color: #fff; transform: scale(1.15); }
}

/* --- プラス5の2枚重ねビジュアル --- */
.placed-plus5-stack {
  position: absolute !important;
  right: -38px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 48px;
  height: 55px;
  margin: 0 !important;
  perspective: 400px;
  pointer-events: none;
  z-index: 50;
}
.placed-plus5-stack .placed-plus5-card {
  position: absolute;
  top: 0;
  left: 0;
}
.placed-plus5-stack .placed-plus5-card:nth-child(1) {
  transform: rotateX(20deg) rotateY(-20deg) translateZ(-5px) translateX(-5px);
  z-index: 1;
  opacity: 0.85;
}
.placed-plus5-stack .placed-plus5-card:nth-child(2) {
  transform: rotateX(20deg) rotateY(-5deg) translateY(-2px) translateX(5px) rotate(8deg);
  z-index: 2;
  border-color: #ffd700;
  box-shadow: 0 8px 16px rgba(255, 215, 0, 0.6), 0 0 10px rgba(255, 215, 0, 0.4);
}
.placed-plus5-stack::after {
  content: '⚡ +10 BOOST';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
  white-space: nowrap;
}

/* --- 対戦ヘッダー中のぷよぷよブロック --- */
.play-status-container {
  gap: 8px !important;
  margin: 0 !important;
  transform: scale(1.0) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.play-status-block {
  width: 44px !important;
  height: 44px !important;
  font-size: 21px !important;
  line-height: 38px !important;
  border: 3px solid #fffdfa !important;
  border-radius: 13px !important;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12) !important;
}

/* --- ターン切替トースト通知のアバターアピール --- */
.toast-avatar-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--text-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 12px;
  transform: scale(0.9);
  animation: toastAvatarPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.toast-player-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes toastAvatarPop {
  0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.toast-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- 🎈 風船お祝いアニメーション --- */
.balloon-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.balloon-piece {
  position: absolute;
  bottom: -100px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  animation: floatUp 7s linear forwards;
  box-shadow: inset -5px -5px 15px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.15);
}
.balloon-piece::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 25%;
  height: 25%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
}
.balloon-thread {
  position: absolute;
  bottom: -35px;
  left: 50%;
  width: 2px;
  height: 35px;
  background: rgba(0,0,0,0.18);
  transform: translateX(-50%);
}
@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.95;
  }
  90% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(-115vh) rotate(15deg);
    opacity: 0;
  }
}

/* --- 👑 優勝者アバター特別大アピール --- */
.result-winner-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  animation: winnerAvatarPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.result-winner-avatar-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid #fffdfa;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
  transition: all 0.3s ease;
}
.result-winner-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-winner-name-badge {
  color: #fffdfa;
  font-size: 14px;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border: 1.5px solid #fffdfa;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
@keyframes winnerAvatarPop {
  0% { transform: scale(0.4) translateY(50px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* --- ⚡ 雷フラッシュエフェクト --- */
.thunder-flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  pointer-events: none;
  animation: thunderFlash 0.6s ease-out forwards;
}
@keyframes thunderFlash {
  0% { opacity: 0.9; }
  15% { opacity: 0; }
  30% { opacity: 0.8; }
  45% { opacity: 0.05; }
  60% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* --- ⚔️ スラッシュ（斬撃）エフェクト --- */
.slash-effect-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slash-line {
  width: 150%;
  height: 15px;
  background: linear-gradient(90deg, transparent 0%, #ffffff 50%, transparent 100%);
  box-shadow: 0 0 25px #ffffff, 0 0 10px #74b9ff;
  transform: rotate(-35deg) scaleX(0);
  animation: slashCut 0.5s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}
@keyframes slashCut {
  0% {
    transform: rotate(-35deg) scaleX(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: rotate(-35deg) scaleX(1.2);
    opacity: 0;
  }
}

/* --- 🎁 リザルト獲得アイテムのグラフィカル表示 --- */
.result-rewards-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.reward-item-card {
  min-width: 170px;
  width: auto;
  height: 105px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 12px 18px;
  box-sizing: border-box;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border: 3.5px solid #fffdfa;
  white-space: nowrap;
  word-break: keep-all;
  animation: rewardCardPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* 通常チケットバナー */
.reward-item-card.ticket-normal {
  background: linear-gradient(135deg, #ff9f43 0%, #ff5252 100%);
  box-shadow: 0 10px 25px rgba(255, 159, 67, 0.35);
}
.reward-item-card.ticket-normal .reward-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  pointer-events: none;
}

/* 裏チケットバナー */
.reward-item-card.ticket-back {
  background: linear-gradient(135deg, #2d3436 0%, #4834d4 100%);
  box-shadow: 0 10px 30px rgba(72, 52, 212, 0.5);
  border-color: #a29bfe;
  animation: rewardCardPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both, backTicketPulse 2.5s infinite ease-in-out;
}
.reward-item-card.ticket-back .reward-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(162, 155, 254, 0.5) 0%, transparent 65%);
  pointer-events: none;
}

/* アイコンとテキスト情報 */
.reward-icon {
  font-size: 40px;
  margin-right: 12px;
  text-shadow: 0 3px 6px rgba(0,0,0,0.2);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
.reward-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #ffffff;
  white-space: nowrap;
  word-break: keep-all;
}
.reward-label {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.95;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
  word-break: keep-all;
}
.reward-count {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  white-space: nowrap;
  word-break: keep-all;
}

@keyframes rewardCardPop {
  0% { transform: scale(0) rotate(-8deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes backTicketPulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(72, 52, 212, 0.5), 0 0 15px rgba(162, 155, 254, 0.3);
    border-color: #a29bfe;
  }
  50% {
    box-shadow: 0 10px 40px rgba(162, 155, 254, 0.8), 0 0 25px rgba(72, 52, 212, 0.6);
    border-color: #dff9fb;
  }
}

/* ==========================================
   📱 モバイル（スマホ）用レスポンシブ調整 (1vs1 余裕を持ったフル画面設計)
   ========================================== */
@media (max-width: 768px) {
  :root {
    --card-width: 70px !important;
    --card-height: 105px !important;
  }

  body {
    overflow: hidden !important;
  }

  /* 🔊 BGMボタン ＆ トーストのスマホ幅収容 */
  #sound-controls {
    position: fixed !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 9999999 !important;
  }
  #bgm-toggle-btn {
    padding: 5px 10px !important;
    font-size: 10.5px !important;
    border-radius: 14px !important;
  }
  #global-bgm-toast, .global-bgm-toast {
    top: 8px !important;
    right: 8px !important;
    padding: 5px 10px !important;
    font-size: 10.5px !important;
    max-width: 170px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* 1. TOP画面のスマホ完全収容 ＆ 完全中央揃え */
  #setup-screen {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }
  .cube-title-container {
    gap: 8px !important;
    margin-bottom: 12px !important;
    justify-content: center !important;
  }
  .title-block {
    width: 38px !important;
    height: 38px !important;
    font-size: 20px !important;
    border-radius: 12px !important;
  }
  .game-subtitle {
    font-size: 11.5px !important;
    margin-bottom: 14px !important;
    text-align: center !important;
    padding: 0 10px !important;
  }
  .setup-card {
    width: 100% !important;
    max-width: 360px !important;
    padding: 16px 14px !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }
  .character-selector {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .char-select-card {
    padding: 8px 6px !important;
  }
  .char-select-img-container {
    width: 52px !important;
    height: 52px !important;
  }
  .mode-selector {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* 2. 対局前アビリティモーダルのスマホ縦並び化 */
  #side-by-side-cards-container {
    flex-direction: column !important;
    gap: 12px !important;
    overflow-y: auto !important;
    max-height: 68vh !important;
    width: 100% !important;
    align-items: center !important;
  }
  .ability-select-outer-wrap {
    width: 94vw !important;
    max-width: 370px !important;
    height: auto !important;
    max-height: 92vh !important;
    padding: 14px !important;
  }

  /* 3. 1vs1対局画面の全面刷新（4人制の無駄を省き、縦全体の余裕あるレイアウトへ） */
  #game-screen {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100dvh !important;
    height: 100vh !important;
    padding: env(safe-area-inset-top, 6px) 10px env(safe-area-inset-bottom, 8px) 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
  }

  /* 4人制の左右席（無駄）を完全消去 */
  #player-cpu1, #player-cpu3 {
    display: none !important;
  }

  /* 最上部：1行コンパクトヘッダー */
  .game-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 2px 4px !important;
    min-height: 36px !important;
    height: auto !important;
    z-index: 100 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .table-round-badge-container {
    position: static !important;
    transform: none !important;
    margin: 0 auto !important;
  }
  .table-round-badge {
    font-size: 11px !important;
    padding: 3px 10px !important;
    white-space: nowrap !important;
    border-radius: 12px !important;
  }

  /* 中央：1vs1専用対戦卓コンテナ（画面全体の高さに応じてゆったり拡張） */
  .game-table-container {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
  }

  /* 卓（紫のグラデーションエリア）：縦並び3段構成（相手・中央・自分）でゆったり配置！ */
  .game-table {
    width: 100% !important;
    max-width: 360px !important;
    height: 98% !important;
    max-height: 440px !important;
    border: 4px solid var(--bg-table-border) !important;
    border-radius: 28px !important;
    padding: 10px 12px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* 上段：相手プレイヤー（CPU2）パネル */
  #player-cpu2 {
    position: static !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 336px !important;
    height: 40px !important;
    max-height: 40px !important;
    margin: 0 auto !important;
    padding: 4px 10px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  #player-cpu2 .player-avatar-wrapper {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
  #player-cpu2 .player-details {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 !important;
    margin-left: 8px !important;
    text-align: left !important;
    overflow: hidden !important;
  }
  #player-cpu2 .player-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  #player-cpu2 .player-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    max-width: 70px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #player-cpu2 .player-stats {
    display: flex !important;
    gap: 6px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
  }

  /* 中段：山札 ＆ 捨て札場（卓の中央にゆったり配置） */
  .table-center {
    display: flex !important;
    flex-direction: row !important;
    gap: 28px !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    margin: auto 0 !important;
    z-index: 5 !important;
    width: 100% !important;
  }
  .deck-wrapper, .discard-wrapper {
    width: 68px !important;
    height: 100px !important;
  }

  /* 下段：自分プレイヤーパネル */
  #player-human {
    position: static !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 336px !important;
    height: 40px !important;
    max-height: 40px !important;
    margin: 0 auto !important;
    padding: 4px 10px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  #player-human .player-avatar-wrapper {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
  #player-human .player-details {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 !important;
    margin-left: 8px !important;
    text-align: left !important;
    overflow: hidden !important;
  }
  #player-human .player-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  #player-human .player-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    max-width: 60px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #player-human .player-stats {
    display: flex !important;
    gap: 6px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
  }
  .table-ability-buttons {
    display: flex !important;
    gap: 4px !important;
  }

  /* アビリティバッジのスマホ最適化（横並びコンパクト表示） */
  .player-equipped-abilities-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    align-items: center !important;
    margin: 0 !important;
    max-width: 140px !important;
    overflow: hidden !important;
  }
  .equipped-ability-badge, .active-ability-badge {
    font-size: 9.5px !important;
    padding: 2px 5px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.2 !important;
    max-width: 70px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 最下段：自分の手札 ＆ 操作エリア（下の無駄な余白を完全解消し、最下部まで吸着） */
  .player-hand-container {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 180px !important;
    padding: 6px 8px 12px 8px !important;
    border-radius: 20px 20px 0 0 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    bottom: 0 !important;
  }
  #phase-instruction {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin-bottom: 4px !important;
    text-align: center !important;
  }
  .hand-and-controls {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
  }
  #player-hand {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 2px auto !important;
    gap: 6px !important;
    padding: 0 !important;
  }
  #player-hand .card {
    width: 64px !important;
    height: 96px !important;
    border-radius: 10px !important;
  }
  .action-btn-group {
    margin-top: 4px !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 350px !important;
    gap: 6px !important;
  }
  .action-btn-group .action-btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    flex: 1 !important;
  }

  /* ターン切り替えトースト */
  .toast-card {
    padding: 12px 25px !important;
    border-radius: 20px !important;
  }
  .toast-card h2 {
    font-size: 20px !important;
  }
  
  /* 7. ガチャモーダルのスマホ対応 */
  .gacha-modal-content {
    width: 95% !important;
    padding: 16px !important;
  }
  .gacha-header h2 {
    font-size: 18px !important;
  }
  .gacha-char-selector {
    gap: 4px !important;
  }
  .gacha-char-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
  .gacha-machine-preview img {
    width: 60px !important;
    height: 60px !important;
  }
  .gacha-rarity-rate-info {
    font-size: 11px !important;
  }
  
  /* 8. 設定画面（セットアップ）のスマホ対応 (画面内にすっきり100%収める) */
  .setup-card {
    padding: 14px 12px !important;
    width: 95% !important;
    max-width: 420px !important;
    max-height: 94dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    margin: auto !important;
  }
  .char-select-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .char-select-card {
    padding: 10px !important;
  }
  .char-select-img-container {
    width: 60px !important;
    height: 60px !important;
  }

  /* 9. 対戦中ぷよぷよブロック */
  .play-status-block {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    line-height: 26px !important;
    border-radius: 9px !important;
  }
  .play-status-container {
    gap: 5px !important;
  }

  /* 10. リザルト画面の特大アバターと獲得アイテムのサイズ縮小 */
  .result-winner-avatar-wrap {
    width: 100px !important;
    height: 100px !important;
  }
  .result-winner-name-badge {
    font-size: 15px !important;
    padding: 4px 14px !important;
  }
  .reward-item-card {
    min-width: 155px !important;
    width: auto !important;
    max-width: 100% !important;
    height: 80px !important;
    padding: 8px 14px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
  .reward-icon {
    font-size: 28px !important;
    margin-right: 6px !important;
  }
  .reward-count {
    font-size: 16px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
  .reward-label {
    font-size: 10px !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
}

/* --- 直撃（ロン）を食らった時の特大雷エフェクト --- */
.direct-lightning-bolt {
  position: fixed;
  top: 0;
  width: 14px;
  background: #ffffff;
  box-shadow: 0 0 25px #ff3b30, 0 0 50px #ffcc00, 0 0 100px #ffffff;
  z-index: 9999999;
  transform-origin: top center;
  opacity: 0;
  pointer-events: none;
}

.direct-lightning-bolt.active {
  animation: directBoltStrike 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes directBoltStrike {
  0% { opacity: 1; transform: scaleY(0) skewX(-15deg); }
  20% { opacity: 1; transform: scaleY(1) skewX(12deg); }
  40% { opacity: 0.9; transform: scaleY(1) skewX(-10deg); }
  60% { opacity: 1; transform: scaleY(1) skewX(6deg); }
  100% { opacity: 0; transform: scaleY(1) skewX(0deg); }
}

.avatar-strike-shake {
  animation: strikeShake 0.5s ease-in-out forwards !important;
}

@keyframes strikeShake {
  0%, 100% { transform: translate(0, 0) scale(1); }
  15%, 55% { transform: translate(-10px, 6px) scale(1.1); filter: brightness(2.2); }
  35%, 75% { transform: translate(10px, -6px) scale(1.1); filter: brightness(2.2); }
  90% { transform: translate(0, 0) scale(1); filter: brightness(1); }
}

/* --- アバターレア枠が適用された時にラッパーのデフォルト枠線を消去する --- */
.toast-avatar-wrapper.rarity-frame-n,
.toast-avatar-wrapper.rarity-frame-r,
.toast-avatar-wrapper.rarity-frame-sr,
.toast-avatar-wrapper.rarity-frame-ssr,
.toast-avatar-wrapper.rarity-frame-ur,
.toast-avatar-wrapper.rarity-frame-record {
  border: none !important;
  overflow: visible !important;
  box-shadow: none !important;
}

.celebration-avatar-wrapper.rarity-frame-n,
.celebration-avatar-wrapper.rarity-frame-r,
.celebration-avatar-wrapper.rarity-frame-sr,
.celebration-avatar-wrapper.rarity-frame-ssr,
.celebration-avatar-wrapper.rarity-frame-ur,
.celebration-avatar-wrapper.rarity-frame-record {
  border: none !important;
  overflow: visible !important;
  box-shadow: none !important;
}

/* --- レア度別 直撃被弾演出用CSSスタイル --- */

/* R: 青い雷 */
.direct-lightning-bolt.rarity-r {
  background: #e0f2fe !important;
  box-shadow: 0 0 25px #3b82f6, 0 0 50px #00ffff, 0 0 100px #ffffff !important;
}

/* SSR: 黄色の極太雷 */
.direct-lightning-bolt.rarity-ssr {
  background: #fffbeb !important;
  box-shadow: 0 0 35px #ffd700, 0 0 70px #f59e0b, 0 0 140px #ffffff !important;
  width: 18px !important;
}

/* SR: 赤いビーム */
.direct-beam-strike {
  position: fixed;
  top: 0;
  width: 24px;
  background: #ffebeb;
  box-shadow: 0 0 30px #ef4444, 0 0 60px #ff3b30, 0 0 120px #ffffff;
  z-index: 9999999;
  transform-origin: top center;
  opacity: 0;
  pointer-events: none;
}
.direct-beam-strike.active {
  animation: directBeamStrikeAnim 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes directBeamStrikeAnim {
  0% { opacity: 0; transform: scaleX(0.1); }
  15% { opacity: 1; transform: scaleX(1.3); }
  30% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(0); }
}

/* UR: 漆黒の斬撃 */
.direct-slash-strike {
  position: fixed;
  width: 280px;
  height: 20px;
  background: #111111;
  border: 2px solid #c084fc;
  box-shadow: 0 0 20px #000000, 0 0 45px #7c3aed, 0 0 90px #ff007f;
  z-index: 9999999;
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
}
.direct-slash-strike.active {
  animation: directSlashStrikeAnim 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes directSlashStrikeAnim {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scaleX(0); }
  20% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.5) scaleY(1.6); }
  40% { opacity: 1; transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.1) scaleY(0.7); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scaleX(0) scaleY(0); }
}

/* --- 透視メガネ（のぞき見）被弾時・使用時の視覚演出スタイル --- */

/* 覗かれている（被弾）アバターの上に表示される目のインジケーターコンテナ */
.peek-indicator-container {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 100;
  pointer-events: none;
  align-items: center;
}

/* 覗いているプレイヤー別のカラーバッジ（イメージカラーで光る） */
.peek-peeker-badge {
  background: rgba(15, 23, 42, 0.9) !important;
  color: var(--peeker-color) !important;
  border: 1.5px solid var(--peeker-color) !important;
  box-shadow: 0 0 8px var(--peeker-color) !important;
  padding: 2px 6px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: bold !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
  animation: peekBadgePulse 1.5s infinite alternate;
}

@keyframes peekBadgePulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(1.05); opacity: 1; }
}

/* 覗かれているプレイヤーパネル自体のアラート枠線発光 */
.player-panel.peeking {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.7) !important;
  border: 2px solid #8b5cf6 !important;
}

/* 自分が覗いているターゲット（見ている側）のハイライト */
.player-panel.my-peeking-target {
  outline: 3px solid #00f2ff !important;
  outline-offset: 4px;
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.6) !important;
  animation: myPeekingGlow 2s infinite alternate;
}

@keyframes myPeekingGlow {
  0% { outline-color: rgba(0, 242, 255, 0.4); }
  100% { outline-color: rgba(0, 242, 255, 1); }
}

/* 自分が覗いているターゲットのパネル枠上に表示される「透視中」豪華タグ (属性バッジと一切重ならない位置) */
.peek-target-badge {
  position: absolute;
  top: -12px;
  right: 14px;
  background: linear-gradient(135deg, #00f2ff, #0072ff);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 242, 255, 0.5), 0 0 0 2px #fff;
  z-index: 20;
  animation: bounceMini 1s infinite alternate;
}

@keyframes bounceMini {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

/* --- 直撃（ロン）時のお祝いオーバーレイ特別ダークモードスタイル --- */
.win-celebration-overlay.direct-win-mode {
  background: rgba(15, 23, 42, 0.96) !important;
}

.win-celebration-overlay.direct-win-mode .confetti-piece {
  display: none !important; /* 紙吹雪を完全に無効化 */
}

/* 直撃時のお祝いタイトル文字の演出調整 */
.win-celebration-overlay.direct-win-mode .celebration-yaku {
  color: #ef4444 !important;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.7) !important;
  animation: directWinPulse 1s infinite alternate;
}

@keyframes directWinPulse {
  0% { transform: scale(0.97); }
  100% { transform: scale(1.03); }
}

/* --- アバター付近に表示される手番アピール吹き出し（Turn Bubble） --- */
.turn-bubble {
  position: absolute;
  top: -46px; /* アバターの真上に配置 */
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(15, 23, 42, 0.94) !important;
  color: #ffffff !important;
  border: 2.5px solid var(--player-color) !important;
  box-shadow: 0 0 18px var(--player-color), inset 0 0 10px rgba(255, 255, 255, 0.1) !important;
  padding: 6px 14px !important;
  border-radius: 30px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.turn-bubble.active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  animation: turnBubbleJump 1s infinite alternate;
}

@keyframes turnBubbleJump {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  100% { transform: translateX(-50%) translateY(-6px) scale(1.02); }
}

/* 吹き出しの三角矢印 */
.turn-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px 9px 0;
  border-style: solid;
  border-color: var(--player-color) transparent transparent;
  display: block;
  width: 0;
}
.turn-bubble::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 7px 0;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.94) transparent transparent;
  display: block;
  width: 0;
  z-index: 1;
}

/* 空の説明文を持つカードフッターの完全非表示化（画像サイズ復旧用） */
.card-bottom.empty-bottom {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-top: none !important;
  overflow: hidden !important;
  display: none !important;
}

/* アカウント初期化ボタン（右上配置） */
.account-reset-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 235, 235, 0.9);
  border: 1.5px solid #ff6b6b;
  color: #e63946;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.15);
  transition: all 0.2s ease;
  z-index: 9999;
  pointer-events: auto;
}

.account-reset-btn:hover {
  background: #ff6b6b;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

@media (max-width: 768px) {
  .account-reset-btn {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 4px 10px;
  }
}

/* 10連ガチャ用ミニカプセル */
.gacha-rolling-capsule.mini-capsule {
  width: 50px !important;
  height: 50px !important;
  opacity: 0;
  z-index: 9;
}
.gacha-rolling-capsule.mini-capsule .capsule-half {
  width: 50px !important;
  height: 25px !important;
}
.gacha-rolling-capsule.mini-capsule .capsule-top {
  border-radius: 25px 25px 0 0 !important;
}
.gacha-rolling-capsule.mini-capsule .capsule-bottom {
  border-radius: 0 0 25px 25px !important;
}
.gacha-rolling-capsule.mini-capsule.open .capsule-top {
  transform: translateY(-30px) rotate(-20deg) !important;
  opacity: 0.6;
}
.gacha-rolling-capsule.mini-capsule.open .capsule-bottom {
  transform: translateY(30px) rotate(20deg) !important;
  opacity: 0.6;
}

/* ミニカプセル用のばらけ飛び出しアニメーション */
.mini-capsule-1.rolling { animation: gachaMiniRoll1 0.7s ease-out forwards; }
.mini-capsule-2.rolling { animation: gachaMiniRoll2 0.72s ease-out forwards; }
.mini-capsule-3.rolling { animation: gachaMiniRoll3 0.68s ease-out forwards; }
.mini-capsule-4.rolling { animation: gachaMiniRoll4 0.75s ease-out forwards; }
.mini-capsule-5.rolling { animation: gachaMiniRoll5 0.71s ease-out forwards; }
.mini-capsule-6.rolling { animation: gachaMiniRoll6 0.74s ease-out forwards; }
.mini-capsule-7.rolling { animation: gachaMiniRoll7 0.69s ease-out forwards; }
.mini-capsule-8.rolling { animation: gachaMiniRoll8 0.73s ease-out forwards; }
.mini-capsule-9.rolling { animation: gachaMiniRoll9 0.7s ease-out forwards; }

@keyframes gachaMiniRoll1 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(-130px, 40px) scale(1) rotate(680deg); opacity: 1; }
}
@keyframes gachaMiniRoll2 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(50px, -20px) scale(1) rotate(-540deg); opacity: 1; }
}
@keyframes gachaMiniRoll3 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(-90px, 140px) scale(1) rotate(780deg); opacity: 1; }
}
@keyframes gachaMiniRoll4 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(0px, 160px) scale(1) rotate(-620deg); opacity: 1; }
}
@keyframes gachaMiniRoll5 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(-60px, -30px) scale(1) rotate(580deg); opacity: 1; }
}
@keyframes gachaMiniRoll6 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(90px, 110px) scale(1) rotate(-710deg); opacity: 1; }
}
@keyframes gachaMiniRoll7 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(-100px, 90px) scale(1) rotate(640deg); opacity: 1; }
}
@keyframes gachaMiniRoll8 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(110px, 20px) scale(1) rotate(-590deg); opacity: 1; }
}
@keyframes gachaMiniRoll9 {
  0% { transform: translate(-50%, 20px) scale(0.2) rotate(0deg); opacity: 0; }
  100% { transform: translate(-20px, 60px) scale(1) rotate(660deg); opacity: 1; }
}

.gacha-rolling-capsule.mini-capsule.suspense {
  animation: miniSuspense 0.22s infinite alternate ease-in-out !important;
}
@keyframes miniSuspense {
  0% { filter: brightness(1.1) drop-shadow(0 0 8px #ffffff); }
  100% { filter: brightness(1.6) drop-shadow(0 0 25px #ffd700); }
}

/* --- 連戦ロード ＆ アビリティ用スタイル --- */

/* アビリティ【🔥 チャレンジ中！】発光アピールタグ */
.ability-active-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1.5px solid #ffd700;
  box-shadow: 0 0 12px #ff4757, 0 0 20px #ffd700;
  white-space: nowrap;
  z-index: 100;
  animation: challengeBadgePulse 0.8s infinite alternate ease-in-out;
}

@keyframes challengeBadgePulse {
  0% { transform: translateX(-50%) scale(0.95); box-shadow: 0 0 8px #ff4757; }
  100% { transform: translateX(-50%) scale(1.1); box-shadow: 0 0 22px #ff4757, 0 0 35px #ffd700; }
}

/* 連戦ロード ヘッダー進行状況バッジ */
.road-step-badge {
  background: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
  letter-spacing: 0.5px;
}

/* スタッシュアイテムタグ */
.stash-item-pill {
  display: inline-block;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 3px 8px;
  border-radius: 12px;
  margin: 2px;
  font-weight: 700;
  font-size: 11px;
}

/* 連戦ロードボタンのスタイリング */
.mode-btn.road-mode-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #cbd5e1;
  transition: all 0.2s ease;
}

.mode-btn.road-mode-btn {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 8px 16px !important;
  line-height: 1.2 !important;
}

.mode-btn.road-mode-btn .mode-btn-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.mode-btn.road-mode-btn .mode-btn-sub {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
}

.mode-btn.road-mode-btn.active {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%) !important;
  color: #ffffff !important;
  border-color: #ffd700 !important;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4), 0 0 12px #ffd700 !important;
  transform: translateY(-2px);
}

/* 非アクティブ時のモーダル・オーバーレイの物理的クリック遮断を完全に解除 */
.modal:not(.active),
.gacha-result-overlay:not(.active) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ⚔️ VS対戦カットイン演出スタイル */
.vs-cutin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.vs-cutin-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.vs-cutin-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 800px;
  position: relative;
}

.vs-player-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.human-side {
  transform: translateX(-120px);
}
.vs-cutin-overlay.active .human-side {
  transform: translateX(0);
}

.enemy-side {
  transform: translateX(120px);
}
.vs-cutin-overlay.active .enemy-side {
  transform: translateX(0);
}

.vs-player-side img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5), 0 8px 20px rgba(0, 0, 0, 0.6);
}

.vs-name-tag {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-weight: 800;
  font-size: 16px;
  padding: 6px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.vs-badge {
  font-size: 72px;
  font-weight: 900;
  font-style: italic;
  background: linear-gradient(135deg, #ff4757 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px #ff4757);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5) 0.2s;
}

.vs-cutin-overlay.active .vs-badge {
  transform: scale(1.2);
}

.vs-step-title {
  margin-top: 40px;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);
  padding: 8px 28px;
  border-radius: 30px;
  border: 2px solid #ffd700;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.6), 0 0 10px #ffd700;
  letter-spacing: 1px;
}

/* ⚡ レア度別カーダー登場演出エフェクト ⚡ */

/* N: 白くピカピカ */
.vs-cutin-overlay.rarity-fx-N {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0%, rgba(203, 213, 225, 0.98) 100%) !important;
  animation: whitePikapika 0.4s infinite alternate ease-in-out;
}
.vs-cutin-overlay.rarity-fx-N .vs-name-tag,
.vs-cutin-overlay.rarity-fx-N .vs-step-title {
  color: #0f172a !important;
}
@keyframes whitePikapika {
  0% { filter: brightness(1); box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.8); }
  100% { filter: brightness(1.3); box-shadow: inset 0 0 150px rgba(255, 255, 255, 1); }
}

/* R: 青くビーム */
.vs-cutin-overlay.rarity-fx-R {
  background: radial-gradient(circle at center, rgba(30, 58, 138, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  overflow: hidden;
}
.vs-cutin-overlay.rarity-fx-R::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -50%;
  width: 200%;
  height: 25px;
  background: linear-gradient(90deg, transparent, #38bdf8, #ffffff, #38bdf8, transparent);
  box-shadow: 0 0 30px #38bdf8, 0 0 60px #38bdf8;
  transform: translateY(-50%) rotate(-15deg);
  animation: blueBeamSweep 0.6s infinite linear;
}
@keyframes blueBeamSweep {
  0% { transform: translateY(-50%) rotate(-15deg) translateX(-30%); }
  100% { transform: translateY(-50%) rotate(-15deg) translateX(30%); }
}

/* SR: 赤くフラッシュ */
.vs-cutin-overlay.rarity-fx-SR {
  background: radial-gradient(circle at center, rgba(153, 27, 27, 0.95) 0%, rgba(69, 10, 10, 0.98) 100%) !important;
  animation: redFlashPulse 0.25s infinite alternate ease-in-out;
}
@keyframes redFlashPulse {
  0% { filter: brightness(1) drop-shadow(0 0 20px #ef4444); }
  100% { filter: brightness(1.5) drop-shadow(0 0 80px #dc2626); }
}

/* SSR: 金色に泡 */
.vs-cutin-overlay.rarity-fx-SSR {
  background: radial-gradient(circle at center, rgba(161, 98, 7, 0.95) 0%, rgba(66, 32, 6, 0.98) 100%) !important;
  overflow: hidden;
}
.vs-cutin-overlay.rarity-fx-SSR::after {
  content: '✨ 🫧 💛 🫧 ✨ 🫧 💛 🫧';
  position: absolute;
  bottom: -20px;
  font-size: 36px;
  width: 100%;
  text-align: center;
  letter-spacing: 20px;
  animation: goldenBubblesRise 1.2s infinite ease-out;
  opacity: 0.9;
}
@keyframes goldenBubblesRise {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  100% { transform: translateY(-350px) scale(1.4); opacity: 0; }
}

/* UR: 虹がかかる */
.vs-cutin-overlay.rarity-fx-UR {
  background: radial-gradient(circle at center, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
  overflow: hidden;
}
.vs-cutin-overlay.rarity-fx-UR::before {
  content: '';
  position: absolute;
  top: 5%;
  left: -20%;
  width: 140%;
  height: 320px;
  background: linear-gradient(135deg, 
    rgba(255, 0, 0, 0.7) 0%, 
    rgba(255, 154, 0, 0.7) 16%, 
    rgba(208, 222, 33, 0.7) 33%, 
    rgba(79, 220, 74, 0.7) 50%, 
    rgba(63, 218, 216, 0.7) 66%, 
    rgba(47, 201, 226, 0.7) 83%, 
    rgba(149, 0, 255, 0.7) 100%);
  border-radius: 50%;
  filter: blur(20px);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.9);
  animation: rainbowRotate 2.5s infinite linear;
}
@keyframes rainbowRotate {
  0% { transform: rotate(0deg) scale(1); filter: blur(20px) hue-rotate(0deg); }
  100% { transform: rotate(360deg) scale(1.1); filter: blur(20px) hue-rotate(360deg); }
}

/* 🎮 対戦画面（game-screen）のレア度別背景常時エフェクト 🎮 */

/* N: 白くピカピカ */
#game-screen.game-bg-rarity-fx-N {
  box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.4);
  animation: bgWhitePulse 1.2s infinite alternate ease-in-out;
}
@keyframes bgWhitePulse {
  0% { background-color: rgba(255, 255, 255, 0.2); }
  100% { background-color: rgba(241, 245, 249, 0.8); }
}

/* R: 青くビーム */
#game-screen.game-bg-rarity-fx-R {
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.15) 0%, rgba(15, 23, 42, 0.05) 100%) !important;
  box-shadow: inset 0 0 60px rgba(56, 189, 248, 0.3);
}

/* SR: 赤くフラッシュ */
#game-screen.game-bg-rarity-fx-SR {
  animation: bgRedFlash 0.8s infinite alternate ease-in-out;
}
@keyframes bgRedFlash {
  0% { box-shadow: inset 0 0 30px rgba(239, 68, 68, 0.2); }
  100% { box-shadow: inset 0 0 80px rgba(220, 38, 38, 0.5); }
}

/* SSR: 金色に泡 */
#game-screen.game-bg-rarity-fx-SSR {
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.2) 0%, rgba(161, 98, 7, 0.05) 100%) !important;
  box-shadow: inset 0 0 70px rgba(234, 179, 8, 0.4);
}

/* UR: 虹がかかる */
#game-screen.game-bg-rarity-fx-UR {
  background: linear-gradient(135deg, 
    rgba(254, 202, 202, 0.4) 0%, 
    rgba(253, 230, 138, 0.4) 25%, 
    rgba(187, 247, 208, 0.4) 50%, 
    rgba(186, 230, 253, 0.4) 75%, 
    rgba(233, 213, 255, 0.4) 100%) !important;
  animation: bgRainbowGlow 3s infinite alternate ease-in-out;
}
/* 💔 敗北ドラマチック演出 */
.defeat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 7, 22, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: defeatFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes defeatFadeIn {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}

.defeat-modal-container {
  position: relative;
  width: 90%;
  max-width: 440px;
  background: linear-gradient(145deg, #1e112a 0%, #0d0714 100%);
  border: 2px solid rgba(225, 29, 72, 0.45);
  border-radius: 26px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(225, 29, 72, 0.3);
  overflow: hidden;
}

.defeat-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}
.defeat-close-btn:hover {
  background: #f43f5e;
  color: #fff;
  transform: rotate(90deg);
}

.defeat-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fb7185;
  background: rgba(225, 29, 72, 0.25);
  border: 1px solid rgba(225, 29, 72, 0.5);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.defeat-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fda4af;
  margin: 0 0 16px 0;
  text-shadow: 0 0 20px rgba(225, 29, 72, 0.7);
  letter-spacing: 3px;
}

.defeat-carder-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.defeat-avatar-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.6);
  margin-bottom: 10px;
}

.defeat-avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
}

.defeat-crown-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.defeat-enemy-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.defeat-speech-bubble {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 14px;
}

.defeat-stats-card {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.defeat-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 6px;
}
.defeat-stat-row:last-child { margin-bottom: 0; }

.defeat-stat-val {
  font-weight: 800;
  color: #f43f5e;
}

.defeat-action-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.defeat-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.defeat-btn-retry {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}
.defeat-btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.6);
}

.defeat-btn-top-only {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  border-radius: 16px;
  border: none;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}
.defeat-btn-top-only:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(225, 29, 72, 0.65);
}

/* ⚔️ 連戦ロード専用 超スタイリッシュ2択アクションカードボタン */
.road-action-card-btn {
  position: relative;
  width: 100%;
  padding: 16px 20px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ボタン1: バトル継続 (赤系🔶 クリムゾンレッド / フレイムオーラ) */
.road-btn-continue {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 50%, #ee5253 100%) !important;
  border: 2.5px solid #ff4757 !important;
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.55), 0 0 15px rgba(255, 107, 129, 0.4) !important;
}
.road-btn-continue:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 12px 30px rgba(255, 71, 87, 0.75), 0 0 25px rgba(255, 107, 129, 0.7) !important;
}

/* ボタン2: 持ち帰り帰還 (青系🔷 ロイヤルサファイアブルー / エレクトリックオーラ) */
.road-btn-exit {
  background: linear-gradient(135deg, #1e90ff 0%, #70a1ff 50%, #3742fa 100%) !important;
  border: 2.5px solid #70a1ff !important;
  box-shadow: 0 8px 25px rgba(30, 144, 255, 0.55), 0 0 15px rgba(112, 161, 255, 0.4) !important;
}
.road-btn-exit:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 12px 30px rgba(30, 144, 255, 0.75), 0 0 25px rgba(112, 161, 255, 0.7) !important;
}

@keyframes iconBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-6px) scale(1.1);
  }
}

/* ==========================================
   💋 キス・ザ・ジョーカー おどろおどろしい紫オーラ & ホラーピエロ演出
   ========================================== */

/* 1. -5ジョーカーカードの禍々しい紫オーラ */
.card.kiss-joker-aura {
  box-shadow: 0 0 16px #a855f7, 0 0 30px #7e22ce, inset 0 0 12px #3b0764 !important;
  border: 2px solid #c084fc !important;
  animation: kissJokerAuraPulse 1.4s infinite alternate ease-in-out !important;
  position: relative;
}

.card.kiss-joker-aura .card-top {
  background: linear-gradient(135deg, #3b0764 0%, #1e1b4b 100%) !important;
}

.card.kiss-joker-aura .card-score {
  background: #581c87 !important;
  color: #ff4d4d !important;
  box-shadow: 0 0 10px #e879f9 !important;
  border: 1.5px solid #ff4d4d !important;
  text-shadow: 0 0 6px #ff0000;
}

.card.kiss-joker-aura .card-title {
  color: #f5d0fe !important;
  text-shadow: 0 0 8px #a855f7, 0 0 3px #000;
}

@keyframes kissJokerAuraPulse {
  0% {
    box-shadow: 0 0 12px #7e22ce, 0 0 22px #3b0764, inset 0 0 8px #a855f7;
    filter: drop-shadow(0 0 5px #7e22ce);
  }
  50% {
    box-shadow: 0 0 28px #e879f9, 0 0 45px #581c87, inset 0 0 18px #f0abfc;
    filter: drop-shadow(0 0 15px #e879f9);
  }
  100% {
    box-shadow: 0 0 18px #a855f7, 0 0 32px #1e1b4b, inset 0 0 10px #6b21a8;
    filter: drop-shadow(0 0 8px #a855f7);
  }
}

/* 2. おどろおどろしいピエロ全面カットインオーバーレイ */
.kiss-joker-horror-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 35000;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(13, 2, 24, 0.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-in-out;
  overflow: hidden;
}

.kiss-joker-horror-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.horror-bg-effects {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}

.horror-vignette {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 25%, rgba(58, 7, 100, 0.85) 70%, rgba(0, 0, 0, 0.98) 100%);
}

.horror-purple-smoke {
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 60%);
  animation: horrorSmokeRotate 9s linear infinite;
}

@keyframes horrorSmokeRotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.25); }
  100% { transform: rotate(360deg) scale(1); }
}

.horror-clown-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.horror-clown-aura {
  position: absolute;
  top: 38%; left: 50%;
  transform: translate(-50%, -50%);
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, #f0abfc 0%, #9333ea 50%, transparent 75%);
  filter: blur(25px);
  animation: horrorAuraPulse 0.7s infinite alternate ease-in-out;
}

@keyframes horrorAuraPulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
}

.horror-clown-img {
  width: 240px;
  height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px #f0abfc) drop-shadow(0 0 60px #ff0000);
  transform: scale(0.2) rotate(-15deg);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.4);
}

.kiss-joker-horror-overlay.active .horror-clown-img {
  animation: horrorClownZoom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.4) forwards, horrorClownShake 0.12s infinite 0.5s alternate;
}

@keyframes horrorClownZoom {
  0% { transform: scale(0.2) rotate(-20deg); opacity: 0; }
  70% { transform: scale(1.3) rotate(6deg); opacity: 1; }
  100% { transform: scale(1.15) rotate(0deg); opacity: 1; }
}

@keyframes horrorClownShake {
  0% { transform: scale(1.15) rotate(-4deg) translate(-5px, -3px); }
  100% { transform: scale(1.18) rotate(4deg) translate(5px, 3px); }
}

.horror-title-group {
  margin-top: 15px;
  animation: horrorTextFadeUp 0.6s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes horrorTextFadeUp {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.horror-sub-text {
  font-size: 17px;
  font-weight: 900;
  color: #f43f5e;
  letter-spacing: 5px;
  text-shadow: 0 0 12px #f43f5e, 0 0 25px #a855f7;
}

.horror-main-title {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin: 6px 0 10px 0;
  text-shadow: 0 0 18px #e879f9, 0 0 35px #ff0000, 2px 2px 0 #000;
  letter-spacing: 1px;
}

.horror-detail-text {
  font-size: 15px;
  font-weight: 800;
  color: #f5d0fe;
  background: rgba(88, 28, 135, 0.7);
  padding: 6px 20px;
  border-radius: 20px;
  border: 1.5px solid #e879f9;
  display: inline-block;
  box-shadow: 0 0 15px rgba(232, 121, 249, 0.4);
}

/* 画面揺れシェイク */
.horror-camera-shake {
  animation: horrorCameraShake 0.09s infinite alternate;
}

@keyframes horrorCameraShake {
  0% { transform: translate(-4px, 3px) rotate(-0.7deg); }
  100% { transform: translate(4px, -3px) rotate(0.7deg); }
}

.road-btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.road-btn-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.road-btn-title {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.road-btn-sub {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.92;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.road-btn-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.25) 50%, transparent 55%);
  animation: roadBtnShine 3s infinite;
  pointer-events: none;
}

@keyframes roadBtnShine {
  0% { transform: translateX(-100%) rotate(45deg); }
  20%, 100% { transform: translateX(100%) rotate(45deg); }
}

/* ⚡ アビリティ発動確認モーダル (絶対最前面レイヤー z-index: 150000) */
#ability-activation-modal,
#ability-prompt-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 150000;
  display: none;
  align-items: center;
  justify-content: center;
}

#ability-activation-modal.active,
#ability-prompt-modal.active {
  display: flex !important;
}

/* ⚡ アビリティ別ポップアップモーダル演出テーマ */

/* 🏆 チャレンジタイム */
.ability-modal-card-challenge_time {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 60%, #fde68a 100%) !important;
  border: 3px solid #f59e0b !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.75), inset 0 0 20px rgba(254, 243, 199, 0.6) !important;
  animation: challengeModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-challenge_time #ability-activate-icon {
  animation: trophySpinGlow 1.5s infinite ease-in-out alternate;
}
@keyframes trophySpinGlow {
  0% { transform: scale(1) rotate(-6deg); filter: drop-shadow(0 0 6px #f59e0b); }
  100% { transform: scale(1.18) rotate(6deg); filter: drop-shadow(0 0 20px #f59e0b); }
}

/* 🤡 ドッキリテクスチャー */
.ability-modal-card-dokkiri_texture {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 60%, #e9d5ff 100%) !important;
  border: 3px solid #a855f7 !important;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.75), inset 0 0 20px rgba(243, 232, 255, 0.6) !important;
  animation: dokkiriModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-dokkiri_texture #ability-activate-icon {
  animation: clownWiggle 1.2s infinite ease-in-out;
}
@keyframes clownWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 6px #a855f7); }
  25% { transform: rotate(-14deg) scale(1.15); filter: drop-shadow(0 0 18px #c084fc); }
  75% { transform: rotate(14deg) scale(1.15); filter: drop-shadow(0 0 18px #c084fc); }
}

/* 🃏 ドッキリリカバリー */
.ability-modal-card-dokkiri_recovery {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 60%, #a7f3d0 100%) !important;
  border: 3px solid #10b981 !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.75), inset 0 0 20px rgba(209, 250, 229, 0.6) !important;
  animation: recoveryModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-dokkiri_recovery #ability-activate-icon {
  animation: emeraldBounce 1.4s infinite ease-in-out alternate;
}
@keyframes emeraldBounce {
  0% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 6px #10b981); }
  100% { transform: translateY(-7px) scale(1.14); filter: drop-shadow(0 0 22px #34d399); }
}

/* ❤️ スーパーリカバリー */
.ability-modal-card-super_recovery {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 60%, #fecdd3 100%) !important;
  border: 3px solid #f43f5e !important;
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.75), inset 0 0 20px rgba(255, 228, 230, 0.6) !important;
  animation: heartModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-super_recovery #ability-activate-icon {
  animation: heartBeatPulse 1.1s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
@keyframes heartBeatPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px #f43f5e); }
  25% { transform: scale(1.24); filter: drop-shadow(0 0 24px #fb7185); }
  45% { transform: scale(1.06); filter: drop-shadow(0 0 12px #f43f5e); }
  60% { transform: scale(1.2); filter: drop-shadow(0 0 22px #fb7185); }
}

/* 🛡️ カードシールド */
.ability-modal-card-card_shield {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 60%, #bfdbfe 100%) !important;
  border: 3px solid #3b82f6 !important;
  box-shadow: 0 0 35px rgba(59, 130, 246, 0.75), inset 0 0 20px rgba(219, 234, 254, 0.6) !important;
  animation: shieldModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-card_shield #ability-activate-icon {
  animation: shieldBarrierPulse 1.6s infinite ease-in-out alternate;
}
@keyframes shieldBarrierPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 6px #3b82f6); }
  100% { transform: scale(1.16); filter: drop-shadow(0 0 24px #60a5fa); }
}

/* ❄️ フローズン */
.ability-modal-card-frozen {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 60%, #bae6fd 100%) !important;
  border: 3px solid #38bdf8 !important;
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.85), inset 0 0 20px rgba(224, 242, 254, 0.6) !important;
  animation: frozenModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-frozen #ability-activate-icon {
  animation: iceSparkle 2s infinite linear;
}
@keyframes iceSparkle {
  0% { transform: rotate(0deg) scale(1); filter: drop-shadow(0 0 6px #38bdf8); }
  50% { transform: rotate(180deg) scale(1.18); filter: drop-shadow(0 0 22px #7dd3fc); }
  100% { transform: rotate(360deg) scale(1); filter: drop-shadow(0 0 6px #38bdf8); }
}

/* 💣 タイムボム */
.ability-modal-card-time_bomb {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 60%, #fed7aa 100%) !important;
  border: 3px solid #f97316 !important;
  box-shadow: 0 0 35px rgba(249, 115, 22, 0.8), inset 0 0 20px rgba(255, 237, 213, 0.6) !important;
  animation: bombModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-time_bomb #ability-activate-icon {
  animation: bombTicking 0.8s infinite ease-in-out alternate;
}
@keyframes bombTicking {
  0% { transform: scale(1) rotate(-4deg); filter: drop-shadow(0 0 6px #f97316); }
  100% { transform: scale(1.2) rotate(4deg); filter: drop-shadow(0 0 24px #fb923c); }
}

/* 💖 わたしのアイドル */
.ability-modal-card-my_idol {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 60%, #fecdd3 100%) !important;
  border: 3px solid #fb7185 !important;
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.7), inset 0 0 20px rgba(254, 205, 211, 0.6) !important;
  animation: oshiModalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.ability-modal-card-my_idol #ability-activate-icon {
  animation: oshiHeartFloat 1.2s infinite ease-in-out alternate;
}
@keyframes oshiHeartFloat {
  0% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 6px #fb7185); }
  100% { transform: translateY(-8px) scale(1.16); filter: drop-shadow(0 0 24px #f43f5e); }
}

.equipped-ability-badge {
  animation: badgeGlowPulse 2.5s infinite ease-in-out;
}

@keyframes badgeGlowPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.1); }
}

/* 💖 わたしのアイドル（My Idol）専用エフェクト＆デザイン */
.oshi-target-panel {
  border: 3px solid #f43f5e !important;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.75), inset 0 0 15px rgba(251, 113, 133, 0.4) !important;
  overflow: visible !important;
  animation: oshiPanelGlow 2s infinite alternate !important;
}

@keyframes oshiPanelGlow {
  0% { box-shadow: 0 0 15px rgba(244, 63, 94, 0.6); }
  100% { box-shadow: 0 0 32px rgba(244, 63, 94, 0.95); }
}

.oshi-floating-hearts-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 18px;
  z-index: 10;
}

.oshi-floating-heart {
  position: absolute;
  bottom: -10px;
  font-size: 16px;
  animation: oshiFloatUp 2.8s infinite ease-out;
  opacity: 0;
  pointer-events: none;
}

@keyframes oshiFloatUp {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 0; }
  20% { opacity: 0.95; }
  80% { opacity: 0.95; }
  100% { transform: translateY(-110px) scale(1.3) rotate(25deg); opacity: 0; }
}

/* 画面全域うっすらピンクオーラ & 泡ハート演出 */
.oshi-pink-screen-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 28000;
  background: radial-gradient(circle, rgba(251, 113, 133, 0.28) 0%, rgba(244, 63, 94, 0.18) 60%, rgba(225, 29, 72, 0.35) 100%);
  backdrop-filter: blur(2px);
  animation: oshiPinkFadeIn 0.4s ease-out;
}

@keyframes oshiPinkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.oshi-bubble-heart {
  position: fixed;
  bottom: -40px;
  font-size: 28px;
  pointer-events: none;
  z-index: 28001;
  animation: oshiBubbleRise 3.5s ease-out forwards;
}

@keyframes oshiBubbleRise {
  0% { transform: translateY(0) scale(0.4) rotate(0deg); opacity: 0; }
  15% { opacity: 0.95; }
  85% { opacity: 0.95; }
  100% { transform: translateY(-105vh) scale(1.4) rotate(360deg); opacity: 0; }
}

/* 💔 ユーザー指示❸：岩でできた「幻滅」の文字がガラガラと崩れ落ちる演出 */
.oshi-disillusion-falling-text {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 68px;
  font-weight: 900;
  letter-spacing: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 30%, #64748b 70%, #1e293b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(4px 6px 0px #0f172a) drop-shadow(-2px -2px 0px #ffffff) drop-shadow(0 0 20px rgba(0,0,0,0.9));
  pointer-events: none;
  z-index: 99999;
  animation: rockDisillusionCrumble 2.8s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes rockDisillusionCrumble {
  0% {
    opacity: 0;
    transform: translate(-50%, -60px) scale(1.4);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  30% {
    transform: translate(-51%, 2px) rotate(-3deg) scale(1.02);
  }
  45% {
    transform: translate(-49%, -2px) rotate(4deg) scale(0.98);
  }
  60% {
    opacity: 0.95;
    transform: translate(-50%, 45px) rotate(12deg) scale(0.92);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 280px) rotate(28deg) scale(0.7);
  }
}

/* 💖【ユーザー指定】手札の推しのカードだけに♡のもわもわ（ピンクオーラ＆カード内ふわふわハート）エフェクト */
.card-wrapper.oshi-card-hand-mowamowa,
.card-item.oshi-card-hand-mowamowa,
.card.oshi-card-hand-mowamowa {
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.95), 0 0 28px rgba(251, 113, 133, 0.85), 0 0 40px rgba(244, 63, 94, 0.55) !important;
  border: 2px solid #f43f5e !important;
  animation: oshiCardMowamowaPulse 1.5s infinite ease-in-out alternate !important;
  position: relative !important;
  overflow: visible !important;
}

/* 💖 右上ハートバッジ */
.card-wrapper.oshi-card-hand-mowamowa::after,
.card-item.oshi-card-hand-mowamowa::after,
.card.oshi-card-hand-mowamowa::after {
  content: '💖';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 16px;
  z-index: 10;
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.95));
  animation: oshiHeartBadgeBounce 1.2s infinite ease-in-out alternate;
}

/* 💖 カード内で下から上へふわふわ浮遊するハート */
.card-wrapper.oshi-card-hand-mowamowa::before,
.card-item.oshi-card-hand-mowamowa::before,
.card.oshi-card-hand-mowamowa::before {
  content: '💕';
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 16px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(244, 63, 94, 0.9));
  animation: oshiCardInnerHeartFloat 2.2s infinite ease-in-out;
}

@keyframes oshiCardInnerHeartFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6) rotate(-12deg);
  }
  25% {
    opacity: 0.95;
  }
  75% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(1.2) rotate(16deg);
  }
}

@keyframes oshiCardMowamowaPulse {
  0% {
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.75), 0 0 22px rgba(251, 113, 133, 0.6);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 24px rgba(244, 63, 94, 1), 0 0 38px rgba(251, 113, 133, 0.95), 0 0 52px rgba(244, 63, 94, 0.65);
    transform: scale(1.035);
  }
}

@keyframes oshiHeartBadgeBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-4px) scale(1.18); }
}

/* 💣【ユーザー指定】タイムボム特大膨張・収縮（今にも爆発しそうな）爆弾アイコン ＆ アナウンスバナー */
.time-bomb-pulsing-icon {
  font-size: 26px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  margin-right: 4px !important;
  animation: timeBombIconSwell 0.45s infinite ease-in-out alternate !important;
  filter: drop-shadow(0 0 8px #ef4444) !important;
}

@keyframes timeBombIconSwell {
  0% {
    transform: scale(0.95) rotate(-6deg);
    filter: drop-shadow(0 0 6px #ef4444);
  }
  50% {
    transform: scale(1.38) rotate(4deg);
    filter: drop-shadow(0 0 16px #f97316) drop-shadow(0 0 25px #ef4444);
  }
  100% {
    transform: scale(1.65) rotate(-8deg);
    filter: drop-shadow(0 0 22px #ef4444) drop-shadow(0 0 35px #eab308);
  }
}

@keyframes oshiBannerPop {
  0% {
    transform: translate(-50%, -40px) scale(0.6);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* 💋【ユーザー指定】キス・ザ・ジョーカー：山札が禍々しい紫のオーラで光るパルス */
@keyframes kissJokerDeckPulseGlow {
  0% {
    box-shadow: 0 0 0px rgba(168, 85, 247, 0);
  }
  50% {
    box-shadow: 0 0 35px rgba(168, 85, 247, 1), 0 0 55px rgba(147, 51, 234, 0.9), 0 0 80px rgba(88, 28, 135, 0.8);
    transform: scale(1.15);
  }
  100% {
    box-shadow: 0 0 0px rgba(168, 85, 247, 0);
    transform: scale(1);
  }
}

.kiss-joker-deck-pulse {
  animation: kissJokerDeckPulseGlow 0.4s ease-out !important;
}

/* ⚡【ユーザー指定】POPトレード交換モーダル */
.trade-pop-card-modal {
  width: 92%;
  max-width: 620px;
  padding: 28px 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%) !important;
  border-radius: 36px !important;
  border: 3.5px solid #fbbf24 !important;
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.55), 0 20px 50px rgba(0, 0, 0, 0.75) !important;
  text-align: center;
  position: relative;
  overflow: visible;
  animation: tradePopModalBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tradePopModalBounce {
  0% { transform: scale(0.4) rotate(-5deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.trade-pop-header-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.85);
  margin-bottom: 8px;
  letter-spacing: 1.5px;
}

.trade-pop-players-badge {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 5px 20px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.trade-pop-stage {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0;
  position: relative;
  min-height: 180px;
  width: 100%;
  padding: 0 30px;
  box-sizing: border-box;
}

.trade-pop-card-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  min-height: 160px;
  z-index: 10;
  position: relative;
}

.trade-cards-flex {
  display: flex;
  gap: 8px;
  transition: transform 0.75s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.trade-pop-swap-badge {
  font-size: 2.8rem;
  color: #fbbf24;
  font-weight: 900;
  filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.95));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.swap-icon-arrow {
  animation: tradeSwapPulse 0.9s infinite alternate ease-in-out;
}

.swap-icon-subtext {
  font-size: 0.75rem;
  letter-spacing: 2px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.6);
  padding: 1px 8px;
  border-radius: 10px;
  color: #fbbf24;
}

@keyframes tradeSwapPulse {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.25) rotate(180deg); }
}

/* 🔄 トレード左右プレイヤーアイコン＆ラベル */
.trade-side-user-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
  min-width: 90px;
}

.trade-side-user-name {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 2px;
}

.trade-side-role-tag {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.trade-side-role-tag.role-give {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: 1px solid #fdba74;
}

.trade-side-role-tag.role-receive {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #ffffff;
  border: 1px solid #7dd3fc;
}

/* 🔄 トレード選択モーダル上部ヘッダー */
.trade-modal-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

.trade-select-role-badge {
  font-size: 0.8rem;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 14px;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trade-select-role-badge.role-give {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

.trade-select-role-badge.role-receive {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* ⚡ スタイリッシュアビリティ選択モーダル */
.stylish-ability-modal-card {
  max-width: 420px !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  padding: 24px 22px !important;
}

.ability-choice-card-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 14px 18px !important;
  margin-bottom: 10px !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-align: left !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  position: relative !important;
  overflow: hidden !important;
}

.ability-choice-card-btn:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.ability-choice-card-btn:active {
  transform: translateY(0) scale(0.99) !important;
}

.ability-choice-card-btn.theme-idol {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%) !important;
  border: 1.5px solid #fda4af !important;
  color: #881337 !important;
}

.ability-choice-card-btn.theme-challenge {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 1.5px solid #fcd34d !important;
  color: #78350f !important;
}

.ability-choice-card-btn.theme-default {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
}

.ability-choice-badge-btn {
  padding: 6px 12px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.theme-idol .ability-choice-badge-btn {
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  color: #ffffff !important;
}

.theme-challenge .ability-choice-badge-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
}

.theme-default .ability-choice-badge-btn {
  background: linear-gradient(135deg, #64748b, #475569) !important;
  color: #ffffff !important;
}

.ability-choice-cancel-btn {
  width: 100% !important;
  padding: 11px 16px !important;
  margin-top: 6px !important;
  border-radius: 14px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.ability-choice-cancel-btn:hover {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

/* ⚡ アビリティ・ラーニング強烈表示アニメーション */
@keyframes learningGlowPulse {
  0% {
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.7), 0 0 10px rgba(254, 240, 138, 0.5);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 35px rgba(244, 63, 94, 0.95), 0 0 20px rgba(254, 240, 138, 0.85);
    transform: scale(1.02);
  }
}


/* 💋 キス・ザ・ジョーカー UR豪華オーラ & 演出エフェクト */

/* 1. 手札から出る濃い紫のまがまがしいオーラ */
.kiss-joker-hand-aura {
  position: relative !important;
  background: radial-gradient(ellipse at center, rgba(147, 51, 234, 0.45) 0%, rgba(58, 7, 100, 0.7) 70%, transparent 100%) !important;
  border-radius: 20px !important;
  padding: 12px !important;
  box-shadow: 0 0 35px #a855f7, 0 0 70px #581c87, inset 0 0 30px #3b0764 !important;
  animation: kissJokerHandAuraGlow 1.8s infinite alternate ease-in-out !important;
}

.kiss-joker-hand-aura::before {
  content: '' !important;
  position: absolute !important;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border-radius: 26px !important;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.4) 0%, rgba(88, 28, 135, 0.85) 100%) !important;
  filter: blur(10px) !important;
  z-index: -1 !important;
  animation: kissJokerHandSmoke 2.2s infinite alternate ease-in-out !important;
}

.kiss-joker-hand-aura .card {
  box-shadow: 0 0 18px #a855f7, 0 0 35px #581c87 !important;
}

@keyframes kissJokerHandAuraGlow {
  0% {
    box-shadow: 0 0 25px #9333ea, 0 0 50px #581c87, inset 0 0 20px #3b0764;
    filter: drop-shadow(0 0 8px #a855f7);
  }
  100% {
    box-shadow: 0 0 50px #f0abfc, 0 0 90px #7e22ce, inset 0 0 40px #581c87;
    filter: drop-shadow(0 0 22px #f0abfc);
  }
}

@keyframes kissJokerHandSmoke {
  0% { opacity: 0.5; transform: scale(0.97); }
  100% { opacity: 0.95; transform: scale(1.04); }
}

/* 2. プレイヤーパネルの紫怨霊オーラ */
.purple-aura-active, .kiss-joker-activator-panel {
  box-shadow: 0 0 30px #a855f7, 0 0 60px #581c87, inset 0 0 20px #3b0764 !important;
  border-color: #d8b4fe !important;
  animation: purpleAuraPulse 2s infinite alternate ease-in-out !important;
}

@keyframes purpleAuraPulse {
  0% { box-shadow: 0 0 20px #a855f7, 0 0 40px #581c87; }
  100% { box-shadow: 0 0 45px #f0abfc, 0 0 80px #7e22ce; }
}

/* 3. 卓上・画面全体の濃密紫背景 & 浮遊魂粒子 */
.kiss-joker-board-aura {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 990;
  overflow: hidden;
}

.kiss-joker-mist-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, transparent 35%, rgba(88, 28, 135, 0.4) 70%, rgba(13, 2, 24, 0.8) 100%);
  box-shadow: inset 0 0 120px rgba(168, 85, 247, 0.45);
  animation: kissJokerMistPulse 3s infinite alternate ease-in-out;
}

@keyframes kissJokerMistPulse {
  0% { opacity: 0.6; }
  100% { opacity: 0.95; }
}

.kiss-joker-particles-container {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.kiss-joker-particle {
  position: absolute;
  bottom: -20px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #f0abfc 0%, #a855f7 60%, transparent 100%);
  box-shadow: 0 0 16px #e879f9;
  opacity: 0;
  animation: kissJokerFloatParticle 5.5s infinite ease-out;
}

@keyframes kissJokerFloatParticle {
  0% { transform: translateY(0) scale(0.4); opacity: 0; }
  20% { opacity: 0.85; }
  80% { opacity: 0.65; }
  100% { transform: translateY(-105vh) scale(1.6); opacity: 0; }
}

/* 4. キスザジョーカーあがり時: 背景に笑ったピエロがうっすら浮き上がり溶けるようにうつる演出 */
.kiss-joker-victory-clown-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 15000;
  display: none;
  overflow: hidden;
}

.clown-ghost-vignette {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.45) 0%, rgba(13, 2, 24, 0.88) 100%);
}

.clown-ghost-img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 540px;
  max-width: 90vw;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 45px #f0abfc) drop-shadow(0 0 90px #a855f7) sepia(0.3) hue-rotate(240deg);
}

.kiss-joker-victory-clown-bg.fade-dissolve .clown-ghost-img {
  animation: clownGhostDissolve 4.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes clownGhostDissolve {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7) rotate(-5deg);
    filter: blur(15px) drop-shadow(0 0 20px #e879f9);
  }
  25% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(1.1) rotate(0deg);
    filter: blur(2px) drop-shadow(0 0 50px #d500f9);
  }
  65% {
    opacity: 0.35;
    transform: translate(-50%, -52%) scale(1.18) rotate(2deg);
    filter: blur(4px) drop-shadow(0 0 60px #a855f7);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -55%) scale(1.3) rotate(5deg);
    filter: blur(25px) drop-shadow(0 0 100px #3b0764);
  }
}

/* 5. キスザジョーカー効果終了アナウンス: どんよりブラックアウト＆「ひゃっひゃっひゃああああ･･･」エフェクト */
.kiss-joker-end-blackout-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: all;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.kiss-joker-end-blackout-overlay.active {
  opacity: 1;
}

.kiss-joker-end-blackout-overlay.fade-out {
  opacity: 0;
}

.blackout-curtain {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #030007;
  box-shadow: inset 0 0 150px #000000;
}

.blackout-mist-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(58, 7, 100, 0.75) 0%, rgba(3, 0, 7, 0.96) 80%);
  animation: blackoutMistPulse 3s infinite alternate ease-in-out;
}

@keyframes blackoutMistPulse {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.08); }
}

.blackout-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.blackout-clown-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 0 25px #e879f9) drop-shadow(0 0 50px #7e22ce) grayscale(0.2);
  animation: blackoutClownFloat 2s infinite alternate ease-in-out;
}

@keyframes clownMeltingAnim {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    filter: drop-shadow(0 0 25px #e879f9) drop-shadow(0 0 50px #7e22ce) hue-rotate(0deg);
    opacity: 1;
  }
  30% {
    transform: translateY(-10px) scale(1.15) rotate(-6deg);
    filter: drop-shadow(0 0 45px #f43f5e) hue-rotate(45deg);
    opacity: 1;
  }
  60% {
    transform: translateY(30px) scaleX(1.5) scaleY(0.5) rotate(6deg);
    filter: drop-shadow(0 0 55px #a855f7) hue-rotate(120deg) blur(2px);
    opacity: 0.85;
  }
  100% {
    transform: translateY(85px) scaleX(2.5) scaleY(0.05);
    filter: drop-shadow(0 0 70px #4c1d95) hue-rotate(240deg) blur(12px);
    opacity: 0;
  }
}

.blackout-clown-img.melting {
  animation: clownMeltingAnim 2.4s forwards ease-in-out !important;
}

@keyframes blackoutClownFloat {
  0% { transform: translateY(0) scale(1) rotate(-3deg); }
  100% { transform: translateY(-12px) scale(1.08) rotate(3deg); }
}

.blackout-title {
  margin-top: 18px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #f43f5e;
  text-shadow: 0 0 20px #e11d48, 0 0 40px #881337;
  animation: blackoutTextPulse 1.2s infinite alternate ease-in-out;
}

.blackout-sub {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #e879f9;
  text-shadow: 0 0 15px #c084fc;
}

@keyframes blackoutTextPulse {
  0% { opacity: 0.85; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.03); }
}

/* ⚡【ユーザー絶対指示】ゲーム内の画面揺れ演出（シェイクアニメーション）を完全全撤去 */
body.shake-heavy,
body.shake-extreme,
body.shake-light,
.shake-heavy,
.shake-extreme,
.shake-light,
.horror-camera-shake,
.avatar-strike-shake {
  animation: none !important;
  transform: none !important;
}

@keyframes bodyShakeHeavy { 0%, 100% { transform: none !important; } }
@keyframes bodyShakeExtreme { 0%, 100% { transform: none !important; } }
@keyframes horrorCameraShake { 0%, 100% { transform: none !important; } }
@keyframes strikeShake { 0%, 100% { transform: none !important; } }
@keyframes zoomShake { 0%, 100% { transform: none !important; } }
@keyframes srRedShake { 0%, 100% { transform: none !important; } }
@keyframes horrorClownShake { 0%, 100% { transform: none !important; } }
@keyframes oshiDisillusionShake { 0%, 100% { transform: none !important; } }

/* ⚡ クイックドロー2枚同時選択用CSS */
.card.quick-draw-selected {
  transform: translateY(-16px) scale(1.08) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.9), 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  z-index: 20 !important;
}

.quick-draw-num-badge {
  position: absolute;
  top: -10px;
  right: -8px;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #1e1b4b;
  font-weight: 900;
  font-size: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  z-index: 25;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ⚡⚡ 新ロン直撃演出 (N, R, SR, SSR, UR) ⚡⚡ */

/* N: アイコンに細い、白い糸/電撃が絡まりつく */
.ron-strike-n-threads {
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%);
  animation: nThreadsFade 0.8s ease-out forwards;
}
.ron-strike-n-threads svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}
@keyframes nThreadsFade {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  75% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0; }
}

/* R: 青いレーザーが上から直撃 */
.ron-strike-r-laser {
  position: fixed;
  top: 0;
  pointer-events: none;
  z-index: 999999;
  width: 14px;
  background: linear-gradient(180deg, transparent 0%, #3b82f6 40%, #ffffff 80%, #60a5fa 100%);
  box-shadow: 0 0 25px #3b82f6, 0 0 50px #ffffff;
  transform: translateX(-50%);
  animation: rLaserDown 0.7s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}
@keyframes rLaserDown {
  0% { height: 0%; opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
}

/* SR: アイコンに、斜め上から黄色い太刀筋で切られる (ズシャッ) */
.ron-strike-yellow-slash {
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  width: 380px;
  height: 26px;
  background: linear-gradient(90deg, transparent 0%, #eab308 20%, #ffffff 50%, #fef08a 80%, transparent 100%);
  box-shadow: 0 0 35px #eab308, 0 0 70px #ffffff, 0 0 110px #f59e0b;
  border-radius: 13px;
  transform: translate(-50%, -50%) rotate(-45deg) scaleX(0);
  transform-origin: center center;
  animation: yellowSlashCut 0.65s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}
@keyframes yellowSlashCut {
  0% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(0); opacity: 1; }
  35% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.35); opacity: 1; }
  75% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.45); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) rotate(-45deg) scaleX(1.45); opacity: 0; }
}

/* SSR: 赤いリングが飛んでくる */
.ron-strike-ssr-ring {
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 6px solid #ef4444;
  box-shadow: 0 0 35px #ef4444, inset 0 0 35px #ef4444;
  transform: translate(-50%, -50%) scale(2.5);
  opacity: 0;
  animation: ssrRingFly 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.ron-strike-ssr-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid #f87171;
  box-shadow: 0 0 20px #f87171;
}
@keyframes ssrRingFly {
  0% { transform: translate(-50%, -50%) scale(3.0); opacity: 0; }
  45% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.0); opacity: 0; }
}

/* UR: 黒いバツが叩きつけられる */
.ron-strike-ur-cross {
  position: fixed;
  pointer-events: none;
  z-index: 999999;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%) scale(3.5);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: urCrossSlam 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.35) forwards;
}
.ron-strike-ur-cross::before,
.ron-strike-ur-cross::after {
  content: '';
  position: absolute;
  width: 95px;
  height: 22px;
  background: #000000;
  border-radius: 11px;
  box-shadow: 0 0 20px #000000, 0 0 35px #dc2626, 0 0 50px rgba(0,0,0,0.9);
  border: 2px solid #ef4444;
}
.ron-strike-ur-cross::before {
  transform: rotate(45deg);
}
.ron-strike-ur-cross::after {
  transform: rotate(-45deg);
}
@keyframes urCrossSlam {
  0% { transform: translate(-50%, -50%) scale(4.2); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
  75% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.0); opacity: 0; }
}

/* 🌟 SSR アイコン特殊スキル演出：あがり役カードの右隣に「105px特大丸アイコン＋①バッジ」が綺麗に並ぶ */
.ssr-extra-damage-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
  vertical-align: middle;
  position: relative;
  pointer-events: none;
  animation: ssrIconPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.ssr-extra-damage-icon-only {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 25px rgba(250, 204, 21, 0.6);
  border: 3px solid #ffffff;
}

.ssr-extra-damage-icon-only img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 下部の「①」ゴールド丸バッジ */
.ssr-bonus-number-badge {
  margin-top: 6px;
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #0f172a;
  font-size: 1.4rem;
  font-weight: 900;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(250, 204, 21, 0.8);
  border: 2px solid #ffffff;
  line-height: 1;
}

@keyframes ssrIconPop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.ssr-extra-damage-badge .ssr-extra-text {
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.7);
  white-space: nowrap;
}

@keyframes ssrBadgeFlashPop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; filter: brightness(2.2); }
  60% { transform: scale(1.2) rotate(4deg); opacity: 1; filter: brightness(1.6); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; filter: brightness(1); }
}

/* 💎 UR アイコン特殊スキル演出：場のプレイヤーアイコンに「ダイヤころり (キラン✨)」 */
.ur-icon-diamond-roll {
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 99999;
  font-size: 2.2rem;
  pointer-events: none;
  filter: drop-shadow(0 0 12px #38bdf8) drop-shadow(0 0 25px #ffffff);
  animation: iconDiamondRoll 1.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes iconDiamondRoll {
  0% {
    transform: scale(0.2) rotate(-180deg) translate(-40px, -40px);
    opacity: 0;
  }
  40% {
    transform: scale(1.3) rotate(0deg) translate(0, 0);
    opacity: 1;
    filter: brightness(1.8) drop-shadow(0 0 25px #facc15);
  }
  75% {
    transform: scale(1.0) rotate(180deg) translate(0, 10px);
    opacity: 1;
  }
  100% {
    transform: scale(0.1) rotate(360deg) translate(0, 20px);
    opacity: 0;
  }
}
/* ==========================================
   📱 携帯横持ち再現 (モバイル・ランドスケーププレビュー)
   ========================================== */
body.mobile-landscape-mode {
  background: #090d16 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

body.mobile-landscape-mode #app-container {
  width: 860px !important;
  height: 440px !important;
  max-width: 95vw !important;
  max-height: 94vh !important;
  border-radius: 40px !important;
  border: 12px solid #1e293b !important;
  outline: 3px solid #334155 !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 40px rgba(168, 85, 247, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
  margin: auto !important;
  background: var(--bg-primary) !important;
}

/* 横持ちスマホのダイナミックノッチ */
body.mobile-landscape-mode #app-container::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 120px !important;
  background: #0f172a !important;
  border-top-right-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
  z-index: 999999 !important;
}

/* 📱 TOP画面のノー・スクロール全画面完璧フィット (左右真っ黒余白ゼロ・端から端まで美しいニュアンスカラー背景！) */
body.mobile-landscape-mode #setup-screen {
  overflow: hidden !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  height: 100% !important;
  width: 100% !important;
  background: transparent !important;
}

body.mobile-landscape-mode #setup-screen .setup-card {
  transform: scale(0.54) !important;
  transform-origin: center center !important;
  margin: 0 !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 1100px !important;
  box-shadow: none !important;
  background: rgba(255, 253, 250, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
  padding: 22px 36px !important;
}

body.mobile-landscape-mode #setup-screen .cube-title-container {
  margin-bottom: 4px !important;
}

body.mobile-landscape-mode #setup-screen .game-subtitle {
  margin-bottom: 10px !important;
}

body.mobile-landscape-mode #setup-screen .setup-section {
  margin-bottom: 12px !important;
}

body.mobile-landscape-mode #sound-controls {
  position: absolute !important;
  top: 6px !important;
  left: 8px !important;
  z-index: 99999999 !important;
  transform: scale(0.75) !important;
  transform-origin: top left !important;
  display: flex !important;
  gap: 6px !important;
}

/* 🎵 画面右上BGMバッジの携帯横持ち最前面固定 (右上枠内確定！) */
#global-bgm-toast,
.global-bgm-toast {
  position: absolute !important;
  top: 6px !important;
  right: 8px !important;
  z-index: 99999999 !important;
}

body.mobile-landscape-mode #global-bgm-toast,
body.mobile-landscape-mode .global-bgm-toast {
  position: absolute !important;
  top: 6px !important;
  right: 8px !important;
  z-index: 99999999 !important;
  transform: scale(0.75) !important;
  transform-origin: top right !important;
  white-space: nowrap !important;
}

/* ⚔️ 対戦バトル画面 (#game-screen) 携帯横持ち用クリーン＆パーフェクトレイアウト */
/* ⚔️ ユーザー様ご提示の2枚目黒枠図解レイアウト 100%完全再現！ */
body.mobile-landscape-mode #game-screen {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--bg-table) !important;
}

body.mobile-landscape-mode .game-header {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 40px !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
  z-index: 999999 !important;
}

body.mobile-landscape-mode .game-header * {
  pointer-events: auto !important;
}

/* リセットボタン：ヘッダー中央上 */
body.mobile-landscape-mode #quit-btn {
  position: absolute !important;
  top: 6px !important;
  left: 50% !important;
  transform: translateX(-50%) scale(0.78) !important;
  transform-origin: top center !important;
  z-index: 99999999 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* ポーカーテーブルコンテナ：画面中央を広くカバー */
body.mobile-landscape-mode #game-screen .game-table-container,
body.mobile-landscape-mode .game-table-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

/* テーブル自体の黄色い光る横長楕円枠（図解のポーカーテーブル枠） */
body.mobile-landscape-mode .game-table {
  position: absolute !important;
  top: 45% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 88% !important;
  height: 52% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 90px !important;
}

/* 1. 一番上中央右：ヘッダー・難易度バッジ (図解の「ステージ名」枠) */
body.mobile-landscape-mode #game-screen .table-round-badge-container {
  position: absolute !important;
  top: 6px !important;
  right: 145px !important;
  left: auto !important;
  transform: scale(0.70) !important;
  transform-origin: top right !important;
  z-index: 99999999 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* 2. 上プレイヤー pos-top (図解の「プレーヤー1の場」枠) - 円卓枠の上端ラインへ固定し山札被り100%追放！ */
body.mobile-landscape-mode .pos-top,
body.mobile-landscape-mode .pos-top.active-turn {
  position: absolute !important;
  top: -42px !important;
  left: 50% !important;
  transform: translateX(-50%) scale(0.58) !important;
  transform-origin: top center !important;
  z-index: 50 !important;
  margin: 0 !important;
}

/* 3. 左プレイヤー pos-left (図解の「プレーヤー3の場」枠) */
body.mobile-landscape-mode .pos-left,
body.mobile-landscape-mode .pos-left.active-turn {
  position: absolute !important;
  left: 4px !important;
  top: 40% !important;
  transform: translateY(-50%) scale(0.58) !important;
  transform-origin: left center !important;
  z-index: 50 !important;
  margin: 0 !important;
}

/* 4. 右プレイヤー pos-right (図解の「プレーヤー2の場」枠) */
body.mobile-landscape-mode .pos-right,
body.mobile-landscape-mode .pos-right.active-turn {
  position: absolute !important;
  right: 4px !important;
  top: 40% !important;
  transform: translateY(-50%) scale(0.58) !important;
  transform-origin: right center !important;
  z-index: 50 !important;
  margin: 0 !important;
}

/* 5. 中央山札・捨て札 (図解の「中央山札」) - コンパクト引き締め＆中央配置で上下の被りを完全追放！ */
body.mobile-landscape-mode .table-center {
  position: absolute !important;
  top: 36% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(0.44) !important;
  z-index: 40 !important;
  margin: 0 !important;
}

/* 6. 自分・下プレイヤー pos-bottom (図解の「自分の場」枠) - 山札の下＆手札トレーの上の安全地帯へ配置！ */
body.mobile-landscape-mode .pos-bottom,
body.mobile-landscape-mode .pos-bottom.active-turn {
  position: absolute !important;
  top: 60% !important;
  bottom: auto !important;
  left: 50% !important;
  transform: translateX(-50%) scale(0.58) !important;
  transform-origin: top center !important;
  z-index: 50 !important;
  margin: 0 !important;
}

/* 👤 全プレイヤー（敵CPU＆自分）のアバターアイコン特大拡大（丸顔写真の迫力大アップ！） */
body.mobile-landscape-mode .player-avatar-wrapper,
body.mobile-landscape-mode .cpu-panel .player-avatar-wrapper,
body.mobile-landscape-mode .human-panel .player-avatar-wrapper {
  width: 62px !important;
  height: 62px !important;
  min-width: 62px !important;
  min-height: 62px !important;
}

body.mobile-landscape-mode .player-avatar-wrapper img,
body.mobile-landscape-mode .player-avatar {
  width: 62px !important;
  height: 62px !important;
  min-width: 62px !important;
  min-height: 62px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* 7. 最下部手札トレー (図解の「ここに手札がおかれる」横長枠) - 100%切れずにコンパクト着地！ */
body.mobile-landscape-mode #game-screen .player-hand-container,
body.mobile-landscape-mode .player-hand-container {
  position: absolute !important;
  bottom: -4px !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) scale(0.68) !important;
  transform-origin: bottom center !important;
  width: 98% !important;
  max-width: 920px !important;
  height: auto !important;
  min-height: 105px !important;
  max-height: 120px !important;
  margin: 0 !important;
  padding: 3px 12px 6px 12px !important;
  z-index: 100000 !important;
  pointer-events: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  overflow: visible !important;
}

body.mobile-landscape-mode .player-hand-container #phase-instruction {
  font-size: 11px !important;
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
}

body.mobile-landscape-mode .player-hand-container .hand-and-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  width: 100% !important;
  margin-top: 0px !important;
}

body.mobile-landscape-mode .player-hand-container .hand-list {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 65px !important;
}

/* ⚡ 対局前アビリティ選択モーダルの画面いっぱいダイナミック特大表示ルール */
body.mobile-landscape-mode .ability-select-outer-wrap {
  width: 96% !important;
  max-width: 1000px !important;
  height: 92% !important;
  max-height: 410px !important;
  transform: scale(0.88) !important;
  transform-origin: center center !important;
}

body.mobile-landscape-mode #side-by-side-cards-container {
  height: calc(100% - 40px) !important;
  gap: 20px !important;
}

body.mobile-landscape-mode #side-by-side-cards-container .modal-content {
  flex: 1 !important;
  height: 100% !important;
  padding: 16px 20px !important;
}

body.mobile-landscape-mode #turn-timer-container {
  transform: scale(0.70) !important;
  margin-top: -8px !important;
  margin-bottom: 2px !important;
}

/* 💣 タイムボムやポップアップダイアログの横持ちサイズ適正化 */
body.mobile-landscape-mode .status-detail-toast {
  transform: translate(-50%, -50%) scale(0.75) !important;
}

/* 🎰 ガチャモーダル・マイコレクションモーダル・勝利/敗北/トレードモーダルの携帯横持ち全画面収まり */
body.mobile-landscape-mode .gacha-modal-content,
body.mobile-landscape-mode .collection-modal-content,
body.mobile-landscape-mode .modal-card,
body.mobile-landscape-mode .defeat-modal-container,
body.mobile-landscape-mode .trade-pop-card-modal {
  transform: scale(0.72) !important;
  transform-origin: center center !important;
  max-height: 95% !important;
}

/* 🏆 あがり勝利お祝いモーダル (#win-celebration) 携帯横持ちパーフェクトフィットスタイル */
body.mobile-landscape-mode #win-celebration {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999999 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

body.mobile-landscape-mode #win-celebration .celebration-content {
  transform: scale(0.78) !important;
  transform-origin: center center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  max-height: 98% !important;
  margin: 0 !important;
}

/* 役タイトル (スリーカードあがり等) - ヘッダー被り完全防止！ */
body.mobile-landscape-mode #win-celebration .celebration-yaku {
  font-size: 34px !important;
  margin-bottom: 2px !important;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 0 3px 10px rgba(0, 0, 0, 0.6) !important;
  white-space: nowrap !important;
}

body.mobile-landscape-mode #win-celebration .celebration-title {
  font-size: 17px !important;
  margin-bottom: 4px !important;
  white-space: nowrap !important;
}

/* 勝者アバター - コンパクトでキュートなサイズ */
body.mobile-landscape-mode #win-celebration .celebration-avatar-wrapper {
  width: 68px !important;
  height: 68px !important;
  margin-bottom: 4px !important;
}

body.mobile-landscape-mode #win-celebration .celebration-avatar-wrapper img {
  width: 68px !important;
  height: 68px !important;
}

/* あがりカード3枚提示エリア - 画面中央でくっきり全露出！！ */
body.mobile-landscape-mode #win-celebration .celebration-cards-list {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 4px 0 6px 0 !important;
}

body.mobile-landscape-mode #win-celebration .celebration-cards-list .card {
  width: 76px !important;
  height: 112px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
}

/* ダイヤ獲得・詳細スコア表記 */
body.mobile-landscape-mode #win-celebration .celebration-score {
  font-size: 22px !important;
  margin-top: 2px !important;
  margin-bottom: 0px !important;
}

body.mobile-landscape-mode #win-celebration .celebration-detail {
  font-size: 12px !important;
  margin-top: 0px !important;
}

/* 📱 画面回転誘導オーバーレイは4人制撤廃に伴い完全無効化 (縦画面で快適プレイ) */
.orientation-guide-overlay {
  display: none !important;
}

/* ✨ あがり演出 完了ボタンのタップ確実化スタイル */
#celebration-top-return-btn {
  position: relative !important;
  z-index: 350 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  margin: 14px auto 0 auto !important;
  display: inline-block !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
#celebration-top-return-btn:active {
  transform: scale(0.95) !important;
}

.orientation-guide-content {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 28px;
  padding: 30px 24px;
  max-width: 340px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone-rotate-icon {
  font-size: 3rem;
  animation: phoneRotateAnim 2s infinite ease-in-out;
}

@keyframes phoneRotateAnim {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}

