/* --- テーマ：プレミアム＆セレブレーション (変更なし) --- */
:root {
    --bg-color: #ffffff;
    --primary-color: #f8f9fa;
    --secondary-color: #e9ecef;
    --accent-color: #007bff;
    --glow-color: rgba(0, 123, 255, 0.5);
    --hit-color: #28a745;
    --reach-color: #fd7e14;
    --winner-color: #ffc107;
    --font-color: #212529;
    --font-color-light: #6c757d;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--font-color);
    font-family: var(--font-family);
    margin: 0;
    text-align: center;
    -webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#app-container {
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- 背景リアクション (変更なし) --- */
#background-reaction-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
/* (中略: .background-reaction, @keyframes float-up-background は元のまま) */


/* --- PC幅対応 (変更なし) --- */
@media (min-width: 500px) {
    body {
        background-color: #e9ecef;
        padding: 20px 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        box-sizing: border-box;
    }
    #app-container {
        max-width: 420px;
        max-height: 900px;
        height: 100%;
        border-radius: 40px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border: 8px solid #343a40;
    }
}

.hidden { display: none !important; }

/* --- 参加画面 (変更なし) --- */
#join-screen {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 2;
    background: var(--bg-color);
}
.title-container {
    margin-bottom: 20px;
}
#join-screen h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
    font-weight: 800;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.25;
}
#join-screen h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    font-weight: 700;
    color: var(--font-color);
    margin: 5px 0 0 0;
}
.avatar-wrapper {
    position: relative;
    margin: 15px 0;
    width: 100px;
    height: 100px;
}
#avatar-preview-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--secondary-color);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}
#avatar-preview {
    width: 100%;
    height: 100%;
}
#randomize-avatar-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid white;
    background-color: var(--accent-color);
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.2s ease-in-out;
}
#randomize-avatar-button:hover {
    transform: scale(1.1) rotate(180deg);
}
#join-screen p {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--font-color-light);
    line-height: 1.5;
}
#name-input {
    font-family: var(--font-family);
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    text-align: center;
    padding: 15px;
    margin: 20px;
    width: 80%;
    border: 2px solid var(--secondary-color);
    background: var(--bg-color);
    color: var(--font-color);
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
#join-button {
    font-family: var(--font-family);
    font-size: clamp(1.3rem, 6vw, 1.6rem);
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    background: var(--accent-color);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--glow-color);
    transition: all 0.2s ease;
}
#join-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--glow-color); }


/* --- (削除) カード配布アニメーション --- */
/* (card-deal-animation, deck, card-back, @keyframes 関連を削除) */


/* --- ★ゲーム画面 (待機画面用に変更) --- */
#game-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}
/* (header, main, #bingo-card, .cell, footer, .info-tabs, .tab-content 関連を削除) */


/* --- 絵文字リアクションボタン (変更なし) --- */
#reaction-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 110;
    transition: opacity 0.3s;
}
#reaction-buttons button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}
#reaction-buttons button:active { transform: scale(0.9); }
#reaction-buttons.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* --- (削除) おめでとうボタン --- */
/* (#congrats-button 関連を削除) */

/* --- (削除) ビンゴ達成演出 --- */
/* (#bingo-celebration 関連を削除) */

/* --- (削除) 当選証明カード --- */
/* (.winner-card-template 関連を削除) */


/* --- リアクションバブル (変更なし) --- */
/* (.reaction-bubble, .reaction-avatar, .reaction-emoji-inline, .reaction-name, @keyframes reaction-fly 関連は元のまま) */
.reaction-bubble{
  position:absolute;
  display:inline-flex;
  align-items:center;
  gap:6px;
  pointer-events:none;
  z-index:150;
  opacity:0;
  transform: translateY(18px) scale(.96);
  animation: reaction-fly 2.6s ease-out forwards;
}
.reaction-avatar{
  width:26px; height:26px;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 1px 6px rgba(0,0,0,.2);
}
.reaction-emoji-inline{
  font-size:24px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}
.reaction-name{
  font-size:12px; font-weight:700; line-height:1;
  color:#fff; padding:4px 8px; border-radius:9999px;
  background:rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  white-space:nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
@keyframes reaction-fly{
  0%   { opacity:0; transform: translateY(18px) scale(.96); }
  12%  { opacity:1; }
  100% { opacity:0; transform: translateY(-80px) scale(1.05); }
}

/* --- オーバーレイ (変更なし) --- */
/* (.overlay, .overlay-content, #overlay-title, #overlay-body, #overlay-close 関連は元のまま) */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.82);
  z-index: 200;
  padding: 24px;
}
.overlay.show {
  display: flex;
}
.overlay-content {
  position: relative;
  width: min(92vw, 520px);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  color: var(--font-color);
  border-radius: 16px;
  padding: clamp(16px, 4vw, 28px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  text-align: center;
}
#overlay-title {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 900;
  margin: 0 0 12px 0;
  color: var(--accent-color);
}
#overlay-body {
  font-size: clamp(1.1rem, 4.2vw, 1.6rem);
  line-height: 1.5;
}
#overlay-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  color: #333;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
#overlay-close:hover { background: #eee; }
/* (リーチ関連のスタイル .reach-announce-wrap は削除) */