.game-page-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0.5rem;
  gap: 0.5rem;
  background: #fafaf9;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.game-unified-header {
  width: 100%;
  max-width: 42rem;
  background: #fff;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 10;
  flex-shrink: 0;
}
.game-header-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  transition: background 0.15s;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.game-header-back:hover { background: #e2e8f0; }
.game-header-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.game-header-stat { text-align: center; min-width: 0; }
.game-header-stat-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.game-header-stat-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #334155;
  line-height: 1.25;
}
.game-header-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.game-header-reset:hover { background: #c7d2fe; }
@media (max-width: 640px) {
  .game-unified-header { padding: 0.65rem 0.85rem; }
  .game-header-back,
  .game-header-reset {
    font-size: 1rem;
    padding: 0.55rem 0.85rem;
  }
  .game-header-stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.03em;
  }
  .game-header-stat-value { font-size: 1.4rem; }
  .game-header-stats { gap: 0.5rem 0.75rem; }

  /* 各遊戲內 HUD / 結算 overlay 共用類名 */
  .stat-label { font-size: 0.75rem !important; }
  .stat-value { font-size: 1.3rem !important; }
  .hud-bar { padding: 0.65rem 0.85rem !important; }
  .ctrl-hint { font-size: 0.8125rem !important; }
  .overlay-title { font-size: 1.5rem !important; }
  .overlay-score { font-size: 2.35rem !important; }
  .share-btn {
    font-size: 1rem !important;
    padding: 0.85rem 1.35rem !important;
  }
  .challenge-banner {
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }
  .toast-msg { font-size: 0.9375rem !important; }
  .game-over-sub { font-size: 0.9375rem !important; }
  .game-over-score { font-size: 2.35rem !important; }
}

@media (max-width: 380px) {
  .game-header-back span.game-header-back-text,
  .game-header-share span.game-header-share-text,
  .game-header-reset span.game-header-reset-text { display: none; }
  .game-unified-header { padding: 0.55rem 0.7rem; }
  .game-header-stat-value { font-size: 1.25rem; }
}
