/* 合成奶蛙 —— 游戏页样式 */

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  justify-content: center;
}
.board-col { min-width: 0; }

.hud {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.hud > div { display: flex; flex-direction: column; line-height: 1.25; }
.hud-k { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted); }
.hud b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.hud .next { margin-left: auto; flex-direction: row; align-items: center; gap: 8px; }
.hud .next img { width: 38px; height: 38px; object-fit: contain; }

.board-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f7f0e2;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(70, 48, 12, 0.08);
}
#board {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: pointer;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(251, 248, 242, 0.9);
  backdrop-filter: blur(3px);
  text-align: center;
}
.overlay[hidden] { display: none; }
.overlay p { margin: 0; font-size: 1.15rem; font-weight: 650; }
.overlay b { font-weight: 500; color: var(--muted); }
.overlay .btn { margin-top: 8px; }

.side-col { display: flex; flex-direction: column; gap: 14px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.panel h2 {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 8px;
}
.panel p { margin: 0 0 6px; font-size: 0.92rem; }
.muted { color: var(--muted); }

.rank { margin: 8px 0 0; padding-left: 22px; font-size: 0.92rem; }
.rank li { margin: 4px 0; }
.rank .who { display: inline-block; min-width: 6ch; }
.rank .pts { float: right; font-variant-numeric: tabular-nums; color: var(--muted); }

@media (max-width: 820px) {
  .game-layout { grid-template-columns: 1fr; gap: 16px; }
  .board-col { max-width: 380px; margin-inline: auto; width: 100%; }
  .side-col { max-width: 380px; margin-inline: auto; width: 100%; }
  .hud b { font-size: 1.25rem; }
}
