/* 少量客製化樣式，補足 Tailwind utility 不易表達的卡片版面與遮罩效果 */

.hidden { display: none !important; }

/* ---- 注音卡片 ---- */
.puzzle-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.puzzle-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3px;
  width: 116px;
  height: 78px;
  background: #fff;
}

.card-left {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
}

.card-left.masked {
  background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 6px, #f1f5f9 6px, #f1f5f9 12px);
  color: transparent;
}

.card-right {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 3px;
}

.card-right-cols {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-column: 1; /* 2026-10 修正：明確指定在第 1 欄（注音符號），避免下面
                      .tone-slot 的 grid-row 設定讓瀏覽器的 CSS Grid 自動
                      排版演算法把它排到第 1 欄、反而把這個區塊擠到第 2 欄，
                      造成畫面看起來「文字、聲調、注音符號」的錯誤順序。 */
  gap: 3px;
}

.zh-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  color: #334155;
}

.zh-slot.masked {
  background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 5px, #f1f5f9 5px, #f1f5f9 10px);
}

.zh-slot.tone-slot {
  grid-column: 2; /* 2026-10 修正：明確指定在第 2 欄（最右側），讓順序固定
                      為「文字（左）→ 注音符號（中）→ 聲調（右）」，不受
                      CSS Grid 自動排版順序影響。 */
  grid-row: 1 / 4;
  font-size: 1.1rem;
}

/* ---- 符號按鈕 / 符號看板 ----
   已使用過的符號一律直接從畫面上移除（見 app.js 的 renderSymbolBoard），
   所以這裡不需要再處理「已使用」的樣式，只需要處理「還沒輪到你」的
   disabled 狀態。按鈕/圖示都做得比較小，避免 37 個符號一次全部顯示時
   把畫面撐得太滿。 */
.symbol-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.symbol-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 7px;
  border: 1.5px solid #94a3b8;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  transition: background-color 0.15s, transform 0.1s;
}

.symbol-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #6366f1;
  transform: translateY(-1px);
}

.symbol-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 主持人看板用：純顯示、不能點擊，比玩家的按鈕更小一號 */
.symbol-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

/* ---- 玩家儀表板小卡 ---- */
.player-tile {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.player-tile.is-turn {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.player-tile.is-solved {
  opacity: 0.6;
}

.player-tile.is-kicked {
  opacity: 0.5;
}

.player-tile .clickable-card {
  cursor: pointer;
}

.player-tile .clickable-card:hover {
  filter: brightness(0.97);
}

/* ---- Toast ---- */
.toast {
  background: #1e293b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  max-width: 280px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  animation: toast-in 0.15s ease-out;
}

.toast.toast-error {
  background: #b91c1c;
}

.toast.toast-warning {
  background: #b45309;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
