:root {
  --blue: #4fc3d9;
  --blue-dark: #2fa9c0;
  --bg: #f4fbfc;
  --text: #234;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Rounded Mplus 1c", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.top {
  text-align: center;
  padding: 24px 16px 8px;
}
.top h1 { margin: 0; font-size: 1.8rem; }
.top .sub { margin: 4px 0 0; color: #567; }

.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}
.tab-btn {
  border: none;
  background: #e0eef1;
  color: #345;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.tab-btn.active {
  background: var(--blue);
  color: white;
}
.tab-btn:active { transform: scale(0.95); }

main { max-width: 1000px; margin: 0 auto; padding: 0 16px 60px; }

.toolbar { display: flex; justify-content: flex-end; padding: 8px 0; }
.toolbar button {
  border: none;
  background: #fff;
  border: 2px solid var(--blue);
  color: var(--blue-dark);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
}
.toolbar button:active { transform: scale(0.96); }

.panel { display: none; }
.panel.active { display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  cursor: pointer;
  border: none;
  padding: 0;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:active {
  transform: scale(0.94);
}
.card.playing {
  box-shadow: 0 0 0 4px var(--blue);
}

.card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.sight-card {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
}

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .sight-card { font-size: 1.4rem; }
}
