/* リセットと基本設定 */
:root {
  --theme-primary: #fbc02d;
  --theme-bg-light: #fff9c4;
  --theme-wave1: rgba(255, 235, 59, 0.4);
  --theme-wave2: rgba(253, 216, 53, 0.3);
  --theme-rgb: 255, 235, 59; /* JSでのrgba操作用 */
  --theme-btn-hover: #f9a825;
}

body.theme-blue {
  --theme-primary: #2196f3;
  --theme-bg-light: #e3f2fd;
  --theme-wave1: rgba(33, 150, 243, 0.4);
  --theme-wave2: rgba(30, 136, 229, 0.3);
  --theme-rgb: 33, 150, 243;
  --theme-btn-hover: #1976d2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* タップ時の青いハイライトを無効化 */
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
}

/* 背景アニメーション (黄色い液体) */
.liquid-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--theme-bg-light) 0%, var(--theme-primary) 100%);
  z-index: 0;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  transform-origin: center bottom;
}

/* 波の形を擬似的に表現 (border-radiusで楕円を重ねる簡易版) */
/* よりリアルな波にはSVGや画像を使うことが多いが、CSSのみで簡易表現 */
.wave::before {
  content: "";
  position: absolute;
  bottom: -50%;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 40%;
  background: rgba(255, 255, 255, 0.3);
  animation: rotate 15s linear infinite;
  will-change: transform; /* 最適化: ブラウザにアニメーションを予告 */
}

.wave1 {
  opacity: 0.5;
  bottom: 10%;
}
.wave1::before {
  width: 110%;
  height: 110%;
  background: var(--theme-wave1);
  animation: rotate 12s linear infinite;
}

.wave2 {
  opacity: 0.5;
  bottom: 20%;
}
.wave2::before {
  width: 120%;
  height: 120%;
  background: var(--theme-wave2);
  animation: rotate 18s linear infinite reverse;
}

.wave3 {
  opacity: 0.2;
  bottom: 5%;
}
.wave3::before {
  width: 130%;
  height: 130%;
  background: rgba(255, 255, 255, 0.2);
  animation: rotate 25s linear infinite;
}

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

/* 湯気ワード */
#steam-words-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* クリックを通すためにnoneにするが、子要素でautoにする */
  z-index: 1; /* 背景より上、UIより下 */
  overflow: hidden;
}

.steam-word {
  position: absolute;
  bottom: -50px; /* 画面外からスタート */
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Kiwi Maru', serif;
  font-size: 1.2rem;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  animation: floatUp 18s ease-in forwards;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto; /* クリック可能にする */
  user-select: none;
  padding: 5px 10px;
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを無効化 */
}

.steam-word:active {
  transform: scale(0.95);
  color: #fff;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(1.2) rotate(var(--rotate-end, 10deg));
    opacity: 0;
  }
}

/* 表示モード制御 */
/* Bubble Mode (Default): Show bubbles, Hide words */
body.mode-bubble #steam-words-container { display: none; }
body.mode-bubble #bubble-ui { display: block; }

/* Word Mode: Hide bubbles, Show words */
body.mode-word #bubble-ui { display: none; }
body.mode-word #steam-words-container { display: block; }

/* Eco Mode: Hide both */
body.mode-eco #bubble-ui { display: none; }
body.mode-eco #steam-words-container { display: none; }
/*body.mode-eco .liquid-container { opacity: 0.5; }  背景アニメーションも薄くする等 */
body.mode-eco .wave::before { animation-play-state: paused; } /* アニメーション停止 */

/* スタートボタンオーバーレイ */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
  z-index: 100;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.start-option-button {
  width: min(280px, 80vw);
  padding: 18px 32px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 40px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: bold;
  color: #333;
}

.start-option-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.start-option-button .icon {
  font-size: 1.8rem;
}

.start-option-button .text {
  font-size: 1rem;
}

.start-option-button--muted {
  background: rgba(0, 0, 0, 0.2);;
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #555;
  box-shadow: none;
}

.start-option-button--muted:hover {
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.2);
}


/* 情報ボタン */
.info-button {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #ccc;
  cursor: pointer;
  font-weight: bold;
  color: #555;
  z-index: 50;
}

/* モーダル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  line-height: 1.6;
  color: #555;
}

.copy-email-wrapper {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.copy-email-text {
  font-family: monospace;
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
  color: #333;
  user-select: all;
}

.copy-email-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: var(--theme-primary);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.85rem;
}

.copy-email-btn:hover {
  background: var(--theme-btn-hover);
}

.copy-email-feedback {
  font-size: 0.75rem;
  color: #4caf50;
  min-height: 1em;
  margin-top: 4px;
}

.copy-email-feedback.error {
  color: #d32f2f;
}

.close {
  position: absolute;
  top: 0px;
  right: 5px;
  font-size: 20px;
  cursor: pointer;
  color: #aaa;
}

/* ボックス */
.chat-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 450px;
  max-width: calc(100% - 32px);
  /* height: 400px; 固定高さを廃止 */
  max-height: 60vh; /* 画面の90%まで伸長可能に */
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}

.chat-header {
  padding: 10px 15px;
  background: rgba(var(--theme-rgb), 0.3);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: bold;
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap; /* 折り返し防止 */
  overflow: hidden; /* はみ出し防止 */
  flex-shrink: 0; /* ヘッダーが潰れないようにする */
}

.chat-header > span {
  display: flex;
  flex-direction: column; /* 縦並び */
  align-items: flex-start;
  gap: 0;
  line-height: 1.2;
  overflow: hidden;
  min-width: 0;
}

.chat-header-controls {
  display: flex;
  align-items: center;
  gap: 10px; /* 間隔を少し詰める */
  flex-shrink: 0; /* コントロール部分が潰れないようにする */
  margin-left: 10px; /* 左側に余白を確保 */
}

.chat-toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
}

.chat-toggle-button:hover {
  opacity: 1;
}

.speech-button,.visual-mode-button,.poll-toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
  padding: 0;
}

.speech-button:hover,.visual-mode-button:hover {
  opacity: 1;
}

.mute-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
}

.mute-button:hover {
  opacity: 1;
}

.bgm-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
  padding: 0;
  transition: opacity 0.3s;
}

.bgm-button:hover {
  opacity: 1;
}

.eco-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.5; /* デフォルトは薄く */
  padding: 0;
  transition: opacity 0.3s, text-shadow 0.3s;
  filter: grayscale(100%); /* デフォルトはグレー */
}

.eco-button:hover {
  opacity: 0.8;
}

/* 省電力モードON時のボタンスタイル */
body.eco-mode .eco-button {
  opacity: 1;
  filter: grayscale(0%); /* 色をつける */
  text-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

/* 省電力モード時のスタイル */
/* 背景のアニメーションのみ停止 */
body.mode-eco .wave::before,
body.mode-eco .wave1::before,
body.mode-eco .wave2::before,
body.mode-eco .wave3::before {
  animation-play-state: paused !important;
}

/* 泡とエフェクトは非表示 */
/* body.mode-eco #bubble-ui は上で定義済み */
/* body.mode-eco #effects-container {
  display: none !important;
} */

/* 💩モード時は強制的に表示 */
body.poop-mode #bubble-ui {
  display: block !important;
}
body.poop-mode #steam-words-container {
  display: none !important;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #333;
  word-break: break-all; /* 長い単語を強制的に折り返す */
  overflow-wrap: anywhere; /* 念のため追加 */
  white-space: pre-wrap;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
  transition: background-color 0.3s;
  user-select: none; /* テキスト選択を無効化 */
  -webkit-tap-highlight-color: transparent; /* スマホでのタップ時のハイライトを無効化 */
}

.comment-time {
  display: block;
  font-size: 0.7rem;
  color: #888;
  margin-top: 4px;
  text-align: right;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-form {
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 5px;
}

.comment-form input, .form-group input{
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
}

.comment-form button {
  padding: 8px 12px;
  background: var(--theme-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.comment-form button:hover {
  background: var(--theme-btn-hover);
}

.chat-container.collapsed {
  height: auto;
}

.chat-container.collapsed .comment-list,
.chat-container.collapsed .comment-form {
  display: none;
}

.chat-container.collapsed .chat-header {
  border-bottom: none;
}

/* サイケデリック演出 */
@property --a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@property --b {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

body.psychedelic-bg::after,
body.psychedelic-bg-fadeout::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  
  --a: 0deg;
  --b: 45deg;
  
  background-image: 
    repeating-conic-gradient(
      from calc(360deg - var(--b)),
      hsl(var(--b), 80%, 50%) 0deg,
      hsl(calc(var(--b) + 60deg), 80%, 50%) 5deg,
      hsl(calc(var(--b) + 120deg), 80%, 50%) 10deg,
      hsl(calc(var(--b) + 180deg), 80%, 50%) 15deg,
      hsl(calc(var(--b) + 240deg), 80%, 50%) 20deg,
      hsl(calc(var(--b) + 300deg), 80%, 50%) 25deg,
      hsl(calc(var(--b) + 360deg), 80%, 50%) 30deg
    ),
    repeating-conic-gradient(
      from var(--b),
      hsl(var(--b), 80%, 50%) 0deg,
      hsl(calc(var(--b) + 60deg), 80%, 50%) 5deg,
      hsl(calc(var(--b) + 120deg), 80%, 50%) 10deg,
      hsl(calc(var(--b) + 180deg), 80%, 50%) 15deg,
      hsl(calc(var(--b) + 240deg), 80%, 50%) 20deg,
      hsl(calc(var(--b) + 300deg), 80%, 50%) 25deg,
      hsl(calc(var(--b) + 360deg), 80%, 50%) 30deg
    ),
    repeating-radial-gradient(
      circle,
      hsl(var(--a), 80%, 50%) 0,
      hsl(calc(var(--a) + 60deg), 80%, 50%) 5%,
      hsl(calc(var(--a) + 120deg), 80%, 50%) 10%,
      hsl(calc(var(--a) + 180deg), 80%, 50%) 15%,
      hsl(calc(var(--a) + 240deg), 80%, 50%) 20%,
      hsl(calc(var(--a) + 300deg), 80%, 50%) 25%,
      hsl(calc(var(--a) + 360deg), 80%, 50%) 30%
    );
    
  background-blend-mode: difference, difference, normal;
  background-color: #fff;
  
  opacity: 0;
  transition: opacity 2s ease;
  
  animation: angleRotation 60s linear infinite;
}

/* クラス付与時にフェードイン */
body.psychedelic-bg::after {
  opacity: 1;
}

@keyframes angleRotation {
  0% {
    --a: 360deg;
    --b: 0deg;
  }
  20% {
    --a: 0deg;
  }
  40% {
    --a: 360deg;
  }
  60% {
    --a: 0deg;
  }
  80% {
    --a: 360deg;
  }
  100% {
    --a: 0deg;
    --b: 360deg;
  }
}

/* スマホ対応 */
@media (max-width: 480px) {
  .chat-container {
    width: calc(100% - 32px);
    height: auto; /* 中身に合わせて伸縮 */
    max-height: 50vh; /* 画面の50%まで */
  }
}

/* バーチャルキーボード表示時など、画面の高さが小さくなった場合の調整 */
@media (max-height: 500px) {
  .chat-container {
    height: 80vh; /* キーボード表示時は画面の80%を使う */
    max-height: none;
    bottom: 5px; /* 下の余白を詰める */
  }
  
  .chat-header {
    padding: 5px 10px; /* ヘッダーを少しコンパクトに */
  }
  
  .comment-list {
    padding: 5px; /* リストの余白も詰める */
  }
}


/* 泡のアニメーション */
#bubble-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2; /* 背景の一部として扱う */
  pointer-events: none;
}

#bubble-ui .rotate {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* transform: translate(-55%, -54%); 削除 */
}

#bubble-ui .rotate_ball {
  position: absolute;
  /* top: 50%; left: 50%; 削除 */
}

/* 泡の色を白から黄色系に変更 */
#bubble-ui .inner {
  /* border: 4px solid rgba(247, 255, 141, 0.6); */
  border-radius: 50%; /* 基本は丸 */
  background: rgba(255, 255, 255, 0.1);
  /* box-shadow: 0px 0px 8px 0px rgba(255, 255, 255, 0.8) inset; */
  /* 軽量化: insetシャドウは重いため、borderで代用するか、よりシンプルな表現にする */
  border: 1px solid rgba(255, 255, 255, 0.7);
  
  /* 不規則な形にするアニメーションを追加 */
  animation: bubble-wobble 3s ease-in-out infinite alternate;
  will-change: transform; /* 最適化: border-radiusを除外 */
  
  position: relative;
  pointer-events: auto; /* クリック可能にする */
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent; /* Androidでのタップハイライトを無効化 */
  -webkit-user-select: none;
  user-select: none;
}

#bubble-ui .inner::after {
  content: "";
  display: block;
  width: 20%;
  height: 20%;
  border-radius: 100%;
  background: rgba(255, 255, 255, 0.9);
  position: absolute;
  right: 15%;
  top: 15%;
  /* filter: blur(1px); 軽量化のため削除 */
  transform: rotateZ(45deg) scaleY(0.8);
}

/* エフェクト用コンテナ */
#effects-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999; /* 最前面 */
}

/* 弾けるパーティクル */
.burst-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  /* z-index: 10; コンテナ側で制御するため削除 */
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* 画面全体のフラッシュ */
.flash-effect {
  position: absolute; /* fixedからabsoluteに変更（コンテナ内配置のため） */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  /* z-index: 9998; コンテナ側で制御するため削除 */
  pointer-events: none;
  animation: flash-fade 1.5s ease-out forwards;
}

@keyframes flash-fade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  100% { opacity: 0; }
}

/* キラキラ粒子 */
.sparkle {
  position: absolute; /* fixedからabsoluteに変更（コンテナ内配置のため） */
  width: 30px;
  height: 30px;
  /* background: radial-gradient(circle, rgba(255,255,255,0.8) 10%, transparent 70%); */
  /* z-index: 9999; コンテナ側で制御するため削除 */
  pointer-events: none;
}

/* 十字の光 */
.sparkle::before, .sparkle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px var(--theme-primary);
  transform: translate(-50%, -50%);
}
.sparkle::before { width: 4px; height: 100%; }
.sparkle::after { width: 100%; height: 4px; }

@keyframes sparkle-anim {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  50% { transform: scale(1) rotate(45deg); opacity: 1; }
  100% { transform: scale(0) rotate(90deg); opacity: 0; }
}

/* 泡がゆらゆら変形するアニメーション */
@keyframes bubble-wobble {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%;
  }
}

/* 上昇する泡のアニメーション */
@keyframes float-up {
  0% {
    transform: translateY(110vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translateY(50vh) translateX(20px);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) translateX(-20px);
    opacity: 0;
  }
}

/* 沈む泡のアニメーション（注がれた水流） */
@keyframes float-down {
  0% {
    transform: translateY(-10vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translateY(50vh) translateX(-20px);
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) translateX(20px);
    opacity: 0;
  }
}

/* 個別の泡の設定（位置とアニメーションをランダム化） */
/* 上昇する泡 (Float Up) */
#bubble-ui .rotate_ball:nth-child(1) { left: 10%; animation: float-up 12s linear infinite -2s; }
#bubble-ui .rotate_ball:nth-child(1) .inner { width: 20px; height: 20px; }

#bubble-ui .rotate_ball:nth-child(2) { left: 20%; animation: float-up 15s linear infinite -5s; }
#bubble-ui .rotate_ball:nth-child(2) .inner { width: 35px; height: 35px; }

#bubble-ui .rotate_ball:nth-child(3) { left: 35%; animation: float-up 18s linear infinite -8s; }
#bubble-ui .rotate_ball:nth-child(3) .inner { width: 50px; height: 50px; }

#bubble-ui .rotate_ball:nth-child(4) { left: 50%; animation: float-up 14s linear infinite -3s; }
#bubble-ui .rotate_ball:nth-child(4) .inner { width: 25px; height: 25px; }

#bubble-ui .rotate_ball:nth-child(5) { left: 65%; animation: float-up 20s linear infinite -10s; }
#bubble-ui .rotate_ball:nth-child(5) .inner { width: 30px; height: 30px; }

#bubble-ui .rotate_ball:nth-child(6) { left: 80%; animation: float-up 16s linear infinite -6s; }
#bubble-ui .rotate_ball:nth-child(6) .inner { width: 15px; height: 15px; }

#bubble-ui .rotate_ball:nth-child(7) { left: 90%; animation: float-up 22s linear infinite -12s; }
#bubble-ui .rotate_ball:nth-child(7) .inner { width: 45px; height: 45px; }

#bubble-ui .rotate_ball:nth-child(8) { left: 15%; animation: float-up 13s linear infinite -1s; }
#bubble-ui .rotate_ball:nth-child(8) .inner { width: 18px; height: 18px; }

#bubble-ui .rotate_ball:nth-child(9) { left: 40%; animation: float-up 19s linear infinite -9s; }
#bubble-ui .rotate_ball:nth-child(9) .inner { width: 40px; height: 40px; }

#bubble-ui .rotate_ball:nth-child(10) { left: 70%; animation: float-up 17s linear infinite -7s; }
#bubble-ui .rotate_ball:nth-child(10) .inner { width: 55px; height: 55px; }

/* 沈む泡 (Float Down) - 注がれた感じを出す */
#bubble-ui .rotate_ball:nth-child(11) { left: 25%; animation: float-down 14s linear infinite -4s; }
#bubble-ui .rotate_ball:nth-child(11) .inner { width: 22px; height: 22px; }

#bubble-ui .rotate_ball:nth-child(12) { left: 45%; animation: float-down 16s linear infinite -8s; }
#bubble-ui .rotate_ball:nth-child(12) .inner { width: 38px; height: 38px; }

#bubble-ui .rotate_ball:nth-child(13) { left: 60%; animation: float-down 12s linear infinite -2s; }
#bubble-ui .rotate_ball:nth-child(13) .inner { width: 42px; height: 42px; }

#bubble-ui .rotate_ball:nth-child(14) { left: 75%; animation: float-down 18s linear infinite -10s; }
#bubble-ui .rotate_ball:nth-child(14) .inner { width: 28px; height: 28px; }

#bubble-ui .rotate_ball:nth-child(15) { left: 55%; animation: float-down 20s linear infinite -5s; }
#bubble-ui .rotate_ball:nth-child(15) .inner { width: 48px; height: 48px; }

/* ランダムな位置と動きの追加分 */
#bubble-ui .rotate_ball:nth-child(16) { left: 5%; animation: float-up 25s linear infinite -15s; }
#bubble-ui .rotate_ball:nth-child(16) .inner { width: 16px; height: 16px; }

#bubble-ui .rotate_ball:nth-child(17) { left: 95%; animation: float-up 23s linear infinite -11s; }
#bubble-ui .rotate_ball:nth-child(17) .inner { width: 12px; height: 12px; }

#bubble-ui .rotate_ball:nth-child(18) { left: 30%; animation: float-down 15s linear infinite -6s; }
#bubble-ui .rotate_ball:nth-child(18) .inner { width: 52px; height: 52px; }

#bubble-ui .rotate_ball:nth-child(19) { left: 85%; animation: float-up 14s linear infinite -3s; }
#bubble-ui .rotate_ball:nth-child(19) .inner { width: 20px; height: 20px; }

#bubble-ui .rotate_ball:nth-child(20) { left: 50%; animation: float-down 21s linear infinite -12s; }
#bubble-ui .rotate_ball:nth-child(20) .inner { width: 24px, height: 24px; }

#bubble-ui .rotate_ball:nth-child(21) { left: 12%; animation: float-up 19s linear infinite -4s; }
#bubble-ui .rotate_ball:nth-child(21) .inner { width: 32px; height: 32px; }

#bubble-ui .rotate_ball:nth-child(22) { left: 88%; animation: float-down 17s linear infinite -9s; }
#bubble-ui .rotate_ball:nth-child(22) .inner { width: 26px; height: 26px; }

#bubble-ui .rotate_ball:nth-child(23) { left: 42%; animation: float-up 24s linear infinite -14s; }
#bubble-ui .rotate_ball:nth-child(23) .inner { width: 44px; height: 44px; }

#bubble-ui .rotate_ball:nth-child(24) { left: 58%; animation: float-down 23s linear infinite -5s; }
#bubble-ui .rotate_ball:nth-child(24) .inner { width: 34px; height: 34px; }

/* レアな虹色泡 */
.rainbow-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4) 20%, transparent 60%),
              conic-gradient(from 0deg, red, orange, yellow, green, blue, indigo, violet, red);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.5s, transform 0.5s;
  cursor: pointer;
  z-index: 100; /* 通常の泡より手前 */
  animation: float-up-rainbow 30s linear forwards;
}

.rainbow-bubble.visible {
  opacity: 1;
  transform: scale(1);
}

@keyframes float-up-rainbow {
  0% {
    bottom: -60px;
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(20px) rotate(90deg);
  }
  50% {
    transform: translateX(-20px) rotate(180deg);
  }
  75% {
    transform: translateX(10px) rotate(270deg);
  }
  100% {
    bottom: 110%; /* 画面上へ抜ける */
    transform: translateX(0) rotate(360deg);
  }
}

/* レアな黄金泡 */
.golden-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 200, 0.9), rgba(255, 215, 0, 0.4) 20%, rgba(255, 215, 0, 0.1) 60%, transparent 80%);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), inset 0 0 10px rgba(255, 255, 200, 0.5);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.5s, transform 0.5s;
  cursor: pointer;
  pointer-events: auto; /* 親のpointer-events: noneを上書き */
  z-index: 100; /* 通常の泡より手前 */
  animation: float-up-golden 30s linear forwards;
  overflow: hidden; /* キラキラがはみ出ないように */
  
  /* 色覚多様性対応: 中央に★を表示 */
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 20px;
  text-shadow: 0 0 4px rgba(255, 165, 0, 0.8);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* キラキラエフェクト */
.golden-bubble::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 10%, transparent 20%),
              radial-gradient(circle, rgba(255,255,255,0.6) 10%, transparent 20%);
  background-size: 30% 30%, 40% 40%;
  background-position: 0 0, 50% 50%;
  opacity: 0;
  animation: sparkle 2s linear infinite;
  transform: rotate(45deg);
}

@keyframes sparkle {
  0% { opacity: 0; transform: rotate(0deg) scale(0.8); }
  50% { opacity: 0.5; transform: rotate(180deg) scale(1.2); }
  100% { opacity: 0; transform: rotate(360deg) scale(0.8); }
}

.golden-bubble.visible {
  opacity: 1;
  transform: scale(1);
}

@keyframes float-up-golden {
  0% {
    bottom: -60px;
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(20px) rotate(90deg);
  }
  50% {
    transform: translateX(-20px) rotate(180deg);
  }
  75% {
    transform: translateX(10px) rotate(270deg);
  }
  100% {
    bottom: 110%; /* 画面上へ抜ける */
    transform: translateX(0) rotate(360deg);
  }
}

/* ボリュームスライダー */
.volume-control-container {
  display: flex;
  align-items: center;
  margin-right: 4px; /* 余白を調整 */
  width: 60px; /* 幅を少し狭める */
  transition: opacity 0.3s ease, width 0.3s ease, margin-right 0.3s ease;
  overflow: hidden;
}

.volume-control-container.hidden {
  opacity: 0;
  width: 0;
  margin-right: 0;
  pointer-events: none;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--theme-primary);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--theme-primary);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* 💩チャレンジモード */
body.poop-mode .liquid-container {
  background: linear-gradient(180deg, #8d6e63 0%, #5d4037 100%); /* ウンコ色 */
}

body.poop-mode .wave::before {
  background: rgba(255, 255, 255, 0.1);
}

body.poop-mode .wave1::before {
  background: rgba(141, 110, 99, 0.4);
}

body.poop-mode .wave2::before {
  background: rgba(93, 64, 55, 0.3);
}

/* 泡を💩に変える */
body.poop-mode #bubble-ui .inner {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  animation: none; /* 形の変形アニメーションを停止 */
  display: flex;
  justify-content: center;
  align-items: center;
  /* サイズは親要素(.inner)のwidth/heightに依存するため、
     親要素のサイズがランダムなら💩もランダムになる */
}

body.poop-mode #bubble-ui .inner::after {
  display: none; /* 光沢を消す */
}

body.poop-mode #bubble-ui .inner::before {
  content: "💩";
  /* font-family: "Noto Color Emoji", sans-serif; */
  font-size: 350%; /* ユーザー指定のサイズ感 */
  display: block;
  line-height: 1;
}

/* ゲームタイマー */
.game-timer {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#timer-display {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  font-family: monospace;
}

.give-up-btn {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.give-up-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.game-timer.hidden {
  display: none;
}

/* チャレンジ確認モーダル */
.challenge-content {
  text-align: center;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.challenge-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap; /* 画面幅が狭すぎる場合は折り返す */
}

.challenge-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.1s;
  white-space: nowrap;
}

.challenge-btn:hover {
  transform: scale(1.05);
}

.challenge-btn.yes {
  background: var(--theme-primary);
  color: #fff;
  font-weight: bold;
}

.challenge-btn.no {
  background: #eee;
  color: #333;
}

/* シェアボタン */
.share-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  color: #fff;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.x-share-btn {
  background-color: #000;
  color: #fff;
}

/* トースト通知 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: bold;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 音声選択セレクトボックス (削除済み) */

/* 読み上げ設定モーダル */
.speech-settings-content {
  max-width: 400px;
  text-align: left;
}

.speech-settings-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  color: #555;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.toggle-label {
  font-weight: bold;
  color: #333;
}

/* スイッチトグル */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--theme-primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--theme-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* 音声リスト */
.voice-list-container h4 {
  margin-bottom: 10px;
  color: #555;
}

.voice-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 5px;
}

.voice-option {
  display: block;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.voice-option:hover {
  background-color: var(--theme-bg-light);
}

.voice-option input[type="radio"] {
  margin-right: 8px;
}

.loading-text {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 10px;
}

/* くそぷよゲーム */
.kusopuyo-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px; /* PC幅制限 */
  background: #000;
  padding: 20px;
  /* border-radius: 10px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
  color: #fff;
}

.kusopuyo-header h2 {
  margin: 0;
  color: #ff5252;
  text-align: center;
  font-family: monospace;
  font-size: 24px;
  text-shadow: 0px 0px 8px #fff;
}

.score-board {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
  margin-bottom: 10px;
}

.kusopuyo-grid {
  display: grid;
  grid-template-columns: repeat(6, 35px); /* 少し大きく */
  grid-template-rows: repeat(12, 35px);
  background: #111;
  border: 2px solid #fff;
  gap: 1px;
}

.kp-cell {
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  /* font-family: "Noto Color Emoji", sans-serif; */
  background: rgba(255,255,255,0.05);
}

.kp-cell.kp-active {
  /* 落下中のぷよを目立たせるならここにスタイル */
  filter: brightness(1.2);
}

.kusopuyo-controls {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.kusopuyo-controls button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.kusopuyo-controls button:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.4);
}

.close-btn {
  margin-top: 20px;
  padding: 10px 30px;
  border: none;
  background: var(--theme-primary); /* テーマカラー */
  color: #000;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
}

/* くそベーダー */
.kusobader-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px; /* PCでの幅制限 */
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#kusobader-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none; /* キャンバス上のタッチ操作を無効化（JSで制御） */
}

.kusobader-ui-top {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 50px 0 10px;
  pointer-events: none;
  color: #fff;
  font-family: monospace;
  font-size: 16px;
  text-shadow: 1px 1px 2px #000;
  z-index: 10;
}

.kb-info-item {
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center; /* 中央揃え */
}

.kb-highscore-display {
  display: block;
  font-size: 0.7em;
  color: #ccc;
  margin-top: 2px;
  font-weight: normal;
  border: none;
}

/* UI中央のスコア表示 */
.kusobader-ui-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  font-family: monospace;
  z-index: 10;
}

.kusobader-ui-center .score-label {
  font-size: 14px;
  margin-bottom: 4px;
}

.kusobader-ui-center .score-value {
  font-size: 24px;
  font-weight: bold;
}

/* 武器ボタン */
.kb-weapons {
  display: flex;
  gap: 10px;
  pointer-events: auto;
  margin-right: 10px;
}

.kb-weapon-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #fff;
  color: #fff;
  padding: 5px 10px; /* Reduced padding */
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px; /* Reduced width */
  height: 60px; /* Fixed height */
  touch-action: manipulation;
}

.kb-btn-label {
  margin-bottom: 5px;
  z-index: 2;
  font-size: 10px; /* Requested 10px */
}

.kb-gauge-container {
  width: 100%;
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
  z-index: 2;
}

.kb-gauge-bar {
  width: 100%;
  height: 100%;
  background: #0f0;
  transition: width 0.1s linear, background 0.2s;
}

.kb-weapon-btn.recharging .kb-gauge-bar {
  background: #007bff; /* Blue for recharging */
}

.kb-weapon-btn.active {
  background: #ffcc00;
  color: #000;
  border-color: #fff;
  transform: scale(1.1);
}

.kb-weapon-btn.recharging {
  background: #007bff !important;
  color: #fff;
  opacity: 0.8;
  border-color: #0056b3;
}

.kb-fire-btn {
  width: 80px; /* Match weapon button width approx? Or keep square? User said "height same as weapon buttons" */
  height: 60px; /* Match weapon button height */
  border-radius: 8px; /* Match weapon button radius */
  background: rgba(255, 0, 0, 0.6);
  border: 2px solid #ff5252; /* Match border width */
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  min-width: 80px;
  touch-action: manipulation;
}

.kb-fire-btn:active {
  background: rgba(255, 0, 0, 0.9);
  transform: scale(0.95);
}

.kb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 20;
}

.kb-overlay.hidden {
  display: none;
}

.kb-overlay h2 {
  font-size: 32px;
  color: #ff5252;
  margin-bottom: 20px;
}

.kb-actions {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.kb-actions button {
  padding: 10px 20px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#kb-retry-btn {
  background: #4caf50;
  color: #fff;
}

#kb-quit-btn {
  background: var(--theme-primary);
  color: #000;
}

.close-btn-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 110;
  pointer-events: auto;
}

/* PC向け調整: 発射ボタンは不要なら隠すか、小さくする */
/* @media (min-width: 768px) {
  .kb-fire-btn {
    display: none; 
  }
} */

.kusobader-ui-bottom {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end; /* Right align everything */
  align-items: flex-end;
  padding: 0 20px;
  pointer-events: none; /* ボタン以外はスルー */
  z-index: 10;
  gap: 10px; /* Gap between weapons group and fire button */
}

/* クソフラッシュ */
.kusoflash-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px; /* PCでの幅制限 */
  background: #222; /* 少し明るめの黒 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#kusoflash-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.kusoflash-ui-top {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 50px 0 10px; /* Right padding for close btn */
  pointer-events: none;
  color: #fff;
  font-family: monospace;
  font-size: 18px;
  text-shadow: 1px 1px 2px #000;
  z-index: 10;
}

.kf-info-item {
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.kf-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 20;
}

.kf-overlay.hidden {
  display: none;
}

.kf-overlay h2 {
  font-size: 40px;
  color: #ff5252;
  margin-bottom: 20px;
}

.kf-overlay p {
  font-size: 24px;
  margin-bottom: 40px;
}

.kf-actions {
  display: flex;
  gap: 20px;
}

.kf-actions button {
  padding: 10px 20px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#kf-retry-btn {
  background: #4caf50;
  color: #fff;
}

#kf-quit-btn {
  background: var(--theme-primary);
  color: #000;
}

/* サイトの使い方モーダル */
.howto-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.howto-btn:hover {
  background: #43a047;
}

.howto-content {
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.howto-content h3 {
  text-align: center;
  margin-bottom: 16px;
  color: #333;
  border-bottom: 2px solid var(--theme-primary);
  padding-bottom: 8px;
}

.howto-scroll-area {
  overflow-y: auto;
  padding-right: 8px;
}

.howto-scroll-area section {
  margin-bottom: 20px;
}

.howto-scroll-area h4 {
  color: #f9a825;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.howto-scroll-area p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 8px;
}

.howto-scroll-area ul {
  list-style-type: none;
  padding-left: 10px;
}

.howto-scroll-area li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #666;
}

.howto-scroll-area li b {
  color: #333;
}




/* ローディングスピナー */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* PR Item Styles */
.pr-item {
  margin: 8px 0;
  padding: 0;
  animation: fadeIn 0.5s ease;
}

.pr-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  color: #333;
  transition: background-color 0.2s;
}

.pr-link:hover {
  background-color: rgba(255, 255, 255, 1);
}

.pr-image-wrapper {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.pr-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pr-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pr-label {
  font-size: 0.7em;
  color: #666;
  margin-bottom: 4px;
  background-color: #f0f0f0;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
}

.pr-title {
  font-size: 0.9em;
  font-weight: bold;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 汎用ユーティリティクラス */
.hidden {
  display: none !important;
}

/* コンテキストメニュー（モーダル風） */
.context-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

.context-menu-overlay.visible {
  display: block;
}

.context-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 10000;
  width: 80%;
  max-width: 300px;
  overflow: hidden;
  font-size: 16px;
  color: #333;
  display: none; /* 初期状態は非表示 */
  flex-direction: column;
}

.context-menu.visible {
  display: flex;
  animation: popIn 0.2s ease-out;
}

@keyframes popIn {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.context-menu-item {
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #eee;
  text-align: center;
  font-weight: bold;
}

.context-menu-item:last-child {
  border-bottom: none;
  color: #666;
  font-weight: normal;
}

.context-menu-item:hover {
  background: #f5f5f5;
}

.context-menu-item:active {
  background: #e0e0e0;
}

/* クソマッチ (Kuso Match) */
.kusosame-container {
  position: relative;
  background: #222;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 98vw;
  max-width: 500px;
  max-height: 95vh;
}

.kusosame-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #fff;
  padding-right: 40px; /* 閉じるボタンと被らないように余白を追加 */
}

.kusosame-header h2 {
  margin: 0;
  font-size: 1.3em;
  color: #fbc02d;
}

.ks-score-board {
  text-align: right;
  font-family: monospace;
  font-size: 1.2em;
}

.kusosame-grid {
  background: #333;
  border: 2px solid #555;
  padding: 4px;
  /* Grid layout is set in JS */
  user-select: none;
  touch-action: none;
  gap: 3px !important; /* JSで設定しているgapを上書き */
  width: 100%;
  box-sizing: border-box;
}

.ks-cell {
  /* width: 30px; height: 30px; は削除し、レスポンシブ対応 */
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  /* font-family: "Noto Color Emoji", sans-serif; */
  background: #444;
  border-radius: 4px;
  transition: transform 0.1s, background-color 0.1s;
}

.ks-cell.empty {
  background: transparent;
}

.ks-cell.highlight {
  background: #777;
  transform: scale(1.1);
  z-index: 1;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.ks-cell.bonus {
  background-color: #ffd700;
  box-shadow: 0 0 15px #ffd700;
  border: 2px solid #fff; /* 視認性確保 */
  animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes spin-sparkle {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.ks-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 20;
}

.ks-overlay.hidden {
  display: none;
}

.ks-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.ks-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#ks-retry-btn {
  background: #4caf50;
  color: white;
}

#ks-quit-btn {
  background: #2196f3;
  color: white;
}

@media (max-width: 600px) {
  .ks-cell {
    /* width: 6vw; height: 6vw; は削除 */
    font-size: 4vw;
  }
}

/* チャレンジ選択モーダルの幅を広げる */
.challenge-content {
  width: 95%;
  max-width: 600px;
}

/* ゲームリストのグリッド表示 */
#games-list-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  #games-list-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- うんちっち (KusoTchi) --- */
.kusotchi-container {
  position: relative;
  width: 95vw;
  max-width: 400px;
  height: 80vh;
  max-height: 600px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
  overflow: hidden;
  display: flex;
   flex-direction: column;
  color: #fff;
  font-family: 'Kiwi Maru', serif;
  
  /* ユーザー指定の背景 */
  background: radial-gradient(
        rgba(76, 76, 76, 1) 4%,
        rgba(61, 61, 61, 1) 9%,
        rgba(61, 61, 61, 0) 9%
      )
      0 0,
    radial-gradient(
        rgba(76, 76, 76,     1) 4%,
        rgba(61, 61, 61, 1) 8%,
        rgba(61, 61, 61, 0) 10%
      )
      50px 50px,
    radial-gradient(rgba(76, 76, 76, 0.8) 20%, rgba(61, 61, 61, 0)) 50px 0,
    radial-gradient(rgba(76, 76, 76, 0.8) 20%, rgba(61, 61, 61, 0)) 0 50px,
    radial-gradient(rgba(61, 61, 61, 1) 35%, rgba(61, 61, 61, 0) 60%) 50px 0,
    radial-gradient(rgba(61, 61, 61, 1) 35%, rgba(61, 61, 61, 0) 60%) 100px 50px,
    radial-gradient(rgba(53, 53, 53, 0.7), rgba(61, 61, 61, 0)) 0 0,
    radial-gradient(rgba(53, 53, 53, 0.7), rgba(61, 61, 61, 0)) 50px 50px,
    linear-gradient(
        45deg,
        rgba(61, 61, 61, 0) 49%,
        rgba(0, 0, 0, 1) 50%,
        rgba(61, 61, 61, 0) 70%
      )
      0 0,
    linear-gradient(
        -45deg,
        rgba(61, 61, 61, 0) 49%,
        rgba(0, 0, 0, 1) 50%,
        rgba(61, 61, 61, 0) 70%
      )
      0 0;
  background-color: rgba(61, 61, 61, 1);
  background-size: 100px 100px;
  border: 4px solid #444;
}

.kt-header {
  padding: 10px;
  padding-right: 40px; /* 閉じるボタンとの重なり防止 */
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.kt-main-display {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.kt-poop {
  width: 3rem; /* 初期サイズ */
  height: auto;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
  z-index: 10;
  animation: kt-idle-bounce 2s infinite ease-in-out;
}

@keyframes kt-idle-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.05, 0.95) rotate(-3deg); }
  50% { transform: scale(0.95, 1.05) rotate(0deg) translateY(-5px); }
  75% { transform: scale(1.05, 0.95) rotate(3deg); }
}

.kt-poop:active {
  transform: scale(0.9);
  animation: none;
}

.kt-poop.dead {
  filter: grayscale(100%) blur(2px);
  transform: rotate(90deg) !important;
  animation: none;
}

.kt-fly {
  position: absolute;
  font-size: 1.5rem;
  /* font-family: "Noto Color Emoji", sans-serif; */
  animation: flyAround 3s infinite linear;
  pointer-events: none;
  z-index: 20;
}

@keyframes flyAround {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(30px, -30px) rotate(90deg) scale(1.1); }
  50% { transform: translate(0, -60px) rotate(180deg) scale(1); }
  75% { transform: translate(-30px, -30px) rotate(270deg) scale(0.9); }
  100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

.kt-status-bar {
  padding: 10px;
  background: rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kt-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.kt-meter-label {
  width: 20px;
  text-align: center;
}

.kt-meter-container {
  flex: 1;
  height: 10px;
  background: #333;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #555;
}

.kt-meter-fill {
  height: 100%;
  width: 100%;
  transition: width 0.5s, background-color 0.5s;
}

.kt-controls {
  padding: 15px;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: space-around;
}

.kt-btn {
  background: #555;
  border: 2px solid #777;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.1s;
  box-shadow: 0 4px 0 #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 70px;
}

.kt-btn-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.kt-btn-label {
  font-size: 12px;
  font-weight: bold;
}

.kt-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #333;
}

.kt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.kt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.kt-overlay.hidden {
  display: none;
}

.kt-overlay h2 {
  color: #e53935;
  font-size: 2em;
  margin-bottom: 10px;
}

.kt-overlay p {
  margin: 5px 0;
  line-height: 1.5;
}

.kt-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 110;
}

/* 進化バブルボタン */
.kt-evo-bubble-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    color: #fff;
    border-radius: 20px;
    padding: 5px 9px;
    font-size: 25px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s, background 0.2s;
}

.kt-evo-bubble-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.kt-evo-bubble-btn:active {
  transform: scale(0.95);
}

.revive-btn.yes {
  background: #fbc02d;
  color: #fff;
  box-shadow: 0 4px 10px rgba(var(--theme-rgb), 0.3);
}

.revive-btn.no {
  background: #f5f5f5;
  color: #666;
}

.revive-btn.ok {
  background: #2196f3;
  color: #fff;
  margin-top: 16px;
  width: 100%;
  max-width: 200px;
}


/* Kusotchi Menu Buttons */
.kt-menu-btn {
  transition: transform 0.1s, filter 0.1s;
  cursor: pointer;
}
.kt-menu-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}
.kt-menu-btn:active {
  transform: scale(0.98);
}

.kt-errand-btn {
  transition: transform 0.1s, background-color 0.1s;
  cursor: pointer;
}
.kt-errand-btn:hover {
  transform: scale(1.02);
  background-color: #f5f5f5 !important;
}
.kt-errand-btn:active {
  transform: scale(0.98);
}

/* Errand Sign Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-10px);}
  60% {transform: translateY(-5px);}
}

/* Game Message Modal */
.game-message-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.game-message-content {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}

.game-message-content h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: #333;
}

.game-message-content p {
  font-size: 1rem;
  margin-bottom: 24px;
  color: #666;
}

.game-message-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.game-message-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s;
  font-size: 14px;
  flex: 1;
  max-width: 140px;
}

.game-message-btn:active {
  transform: scale(0.95);
}

.game-message-btn.primary {
  background: #2196f3;
  color: #fff;
}

.game-message-btn.secondary {
  background: #f5f5f5;
  color: #666;
}

.game-message-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 210;
}

/* Common Confirm Modal */
.confirm-modal-content {
  text-align: center;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  max-width: 300px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirm-text {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.6;
  white-space: pre-wrap; /* 改行を反映 */
}

.confirm-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.confirm-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  flex: 1;
}

.confirm-btn.yes {
  background: var(--theme-primary);
  color: #fff;
}

.confirm-btn.yes:hover {
  background: var(--theme-btn-hover);
}

.confirm-btn.no {
  background: #e0e0e0;
  color: #333;
}

.confirm-btn.no:hover {
  background: #d5d5d5;
}

/* Game Active State: Hide background animations to save performance */
body.game-active #bubble-ui,
body.game-active #steam-words-container {
  display: none !important;
}

/* Low Spec Mode (No Effects) */
body.no-effects * {
  box-shadow: none !important;
  filter: none !important;
}

/* 例外: 視認性確保のため必要なボーダーなどは維持 */
body.no-effects .ks-cell.bonus {
  border: 2px solid #ffd700 !important; /* ボーダーで強調 */
}

/* Emoji Kitchen Modal */
#ek-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    font-family: 'Noto Color Emoji', sans-serif;
}

#ek-modal * {
    font-family: 'Noto Color Emoji', sans-serif;
}

.ek-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ek-bases, .ek-combinations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.ek-base-btn {
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

.ek-base-btn:hover, .ek-base-btn.selected {
    background: #eee;
    border-color: #aaa;
}

.ek-combo-img {
    width: 64px;
    height: 64px;
    cursor: pointer;
    transition: transform 0.1s;
}

.ek-combo-img:hover {
    transform: scale(1.1);
}

.ek-close {
    align-self: flex-end;
    cursor: pointer;
    font-size: 1.5rem;
    background: none;
    border: none;
}

/* チャットツールメニュー */
.chat-tools-container {
  position: relative;
  display: flex;
  align-items: center;
}

.chat-tools-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #555;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s;
}

.chat-tools-toggle:hover {
  background: #e0e0e0;
}

.chat-tools-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 8px;
  z-index: 60;
  white-space: nowrap;
}

.chat-tools-menu.hidden {
  display: none;
}

.chat-tools-menu button {
  background: none;
  border: 1px solid transparent;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
  width: auto;
  height: auto;
  color: inherit;
}

.chat-tools-menu button:hover {
  background: #f5f5f5;
  border-color: #eee;
}

/* Poll Styles */
.poll-question {
  font-weight: bold;
  margin-bottom: 6px;
  font-size: 0.95em;
  line-height: 1.3;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.poll-option-btn {
  position: relative;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 0.9em;
  min-height: 32px;
}

.poll-option-btn:hover {
  background-color: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.poll-option-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.poll-bar {
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 0;
}

.poll-content-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: #666; /* 文字色を濃くする */
}

.poll-vote-badge {
  font-size: 0.8em;
  color: #666; /* バッジの文字色も少し濃く */
  border: 1px solid #ccc;
  padding: 1px 6px;
  border-radius: 10px;
}

#poll-form input{
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
}

/* Vote Feedback Animation */
@keyframes vote-pop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

.vote-feedback-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  pointer-events: none;
  z-index: 100;
  animation: vote-pop 1.5s ease-out forwards;
  white-space: nowrap;
}

/* Poll Theme Colors */
.poll-option-btn.selected {
  border: 2px solid var(--theme-primary) !important;
  background: var(--theme-bg-light) !important;
}

.poll-bar.leader {
  background-color: var(--theme-primary);
  opacity: 0.6;
}

.poll-bar.normal {
  background-color: rgba(200, 200, 200, 0.4);
}

/* Poll Toggle Button */
.poll-toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 1;
  transition: opacity 0.3s;
}

.poll-toggle-button.disabled {
  opacity: 0.3;
  filter: grayscale(100%);
}

/* Hide Polls */
.comment-list.hide-polls .poll-item {
  display: none !important;
}

/* Utility Class */
.hidden {
  display: none !important;
}

/* Revive Modal */
.revive-modal-content {
  text-align: center;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  max-width: 320px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.revive-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

.revive-text {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.5;
}

.revive-subtext {
  font-size: 12px;
  color: #888;
  margin-bottom: 24px;
}

.revive-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.revive-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s;
  font-size: 14px;
  flex: 1;
  max-width: 120px;
}

.revive-btn:active {
  transform: scale(0.95);
}

.revive-btn.yes {
  background: #fbc02d;
  color: #fff;
  box-shadow: 0 4px 10px rgba(var(--theme-rgb), 0.3);
}

.revive-btn.no {
  background: #f5f5f5;
  color: #666;
}

.revive-btn.ok {
  background: #2196f3;
  color: #fff;
  margin-top: 16px;
  width: 100%;
  max-width: 200px;
}
