body { 
  background: #111; 
  color: #eee; 
  margin: 0; 
  font-family: sans-serif; 
  font-size: 22px; 
  overflow-x: hidden; 
}

.hidden { display: none !important; }

/* 通知アラート */
.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ff4444;
  color: white;
  padding: 10px 20px; /* 少し縮小 */
  border-radius: 8px;
  z-index: 10000;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  animation: fade-up 0.3s ease-out;
}

@keyframes theme-drop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fade-up {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.center { 
  position: fixed; 
  inset: 0; 
  background: #111; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  gap: 16px; 
  z-index: 9999; 
}

.name-input { 
  width: 260px; 
  font-size: 22px; 
  padding: 10px; 
  border-radius: 10px; 
  border: none; 
}

.chat { 
  max-width: 100%; 
  margin: 0 auto; 
  padding-bottom: 140px; /* 少し詰め */
  display: none; 
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

.messages { 
  padding: 10px 0; /* 上下余白を半分に */
  display: flex; 
  flex-direction: column; 
  gap: 8px; /* カード同士の間隔を半分に */
  align-items: center; 
}

.card { 
  position: relative; 
  background: #1c1c1c; 
  border-radius: 12px; 
  text-align: center; 
  padding: 6px 12px; /* 上下パディングを半分以下に */
  border: 4px solid transparent; 
  box-sizing: border-box; 
  overflow-wrap: break-word; 
  word-break: break-all; 
  width: 80%; 
  animation: fade-up 0.3s ease-out; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
}

.card.theme { 
  background: yellow; 
  color: black; 
  padding: 10px 12px; /* お題は少し余裕を持たせる */
  animation: theme-drop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card.theme .text { font-size: 32px; } /* 少しだけ調整 */

.card.answer { 
  width: 60%; 
  height: 80%; 
  margin: 0 auto; 
}

.card.answer.reveal-anim {
  animation: theme-drop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.answer.me { border-color: #ffd700; }
.card.answer.other.reveal { background: #1e4fff; }
.card.answer.other.reveal.liked { background: #e60000 !important; }

.text { 
  font-size: 26px; 
  font-weight: bold; 
  white-space: pre-wrap; 
  line-height: 1.2; /* 行間を詰め */
}

.name { 
  font-size: 14px; 
  margin-bottom: 0px; /* 名前と本文の隙間をゼロに */
  opacity: 0.7; 
}

.like-area { 
  position: absolute; 
  right: -60px; 
  top: 50%; 
  transform: translateY(-50%); 
}

.like-btn { 
  font-size: 20px; 
  padding: 4px 10px; 
  background: #333; 
  color: white; 
  border-radius: 10px; 
  border: none; 
  cursor: pointer; 
}

.input-area { 
  position: fixed; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  background: #000; 
  padding: 10px; 
  display: flex; 
  flex-direction: column; 
  gap: 4px; 
  border-top: 1px solid #333;
}

.volume-container { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  gap: 8px; 
  padding-right: 10px; 
}

#volumeSlider { width: 80px; }

.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; font-size: 20px; padding: 10px; border-radius: 10px; border: none; }
.input-row button { font-size: 20px; padding: 10px 20px; font-weight: bold; border-radius: 10px; border: none; cursor: pointer; background: #eee; }

@media (max-width: 600px) {
  .card { width: 90%; }
  .card.answer { width: 85%; height: 60%; }
  .like-area { right: -50px; }
}