.modal {
  position: fixed; inset: 0;
  background: rgba(6, 9, 20, .78);
  display: flex; align-items: flex-end;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 24px 22px 32px;
  position: relative;
}
@media (min-width: 560px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 20px; }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--panel-border);
}
.modal-card h2 {
  font-family: 'Bungee', sans-serif;
  font-size: 18px;
  letter-spacing: .03em;
  text-align: center;
  margin-bottom: 18px;
}

.lb-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
}
.lb-tab {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg2);
  border: 1px solid var(--panel-border);
}
.lb-tab.active { background: var(--accent); color: #06202c; border-color: var(--accent); }

.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg2);
  font-size: 14px;
}
.lb-row:nth-child(1) { background: linear-gradient(90deg, rgba(251, 191, 36, .18), transparent); }
.lb-row:nth-child(2) { background: linear-gradient(90deg, rgba(203, 213, 225, .14), transparent); }
.lb-row:nth-child(3) { background: linear-gradient(90deg, rgba(217, 119, 6, .14), transparent); }
.lb-rank { color: var(--text-dim); font-weight: 700; }
.lb-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-status { text-align: center; color: var(--text-dim); font-size: 13px; margin-top: 10px; min-height: 16px; }

.howto-list { display: flex; flex-direction: column; gap: 10px; }
.howto-list li {
  background: var(--bg2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
}
.howto-list li::before { content: '✓ '; color: var(--accent); }

/* Mobile: hide header/ads/SEO content/footer while actually playing, so the
   board gets maximum screen real estate (matches this project's convention). */
@media (max-width: 640px) {
  body.in-game .site-header,
  body.in-game .seo-content,
  body.in-game .site-footer,
  body.in-game .ad-slot { display: none; }
  body.in-game .app-shell { padding: 0 10px 10px; }
  body.in-game .app { padding-top: 6px; min-height: auto; }
}

@media (max-width: 380px) {
  .go-stats { gap: 8px; }
  .go-stats > div { min-width: 76px; padding: 10px 12px; }
  .menu-links { gap: 12px; }
}
