:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #101116;
  color: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(33, 41, 54, 0.72), rgba(16, 17, 22, 0) 280px),
    #101116;
}

.listener {
  display: grid;
  place-items: center;
  text-align: center;
}

.listener main {
  max-width: 680px;
  padding: 24px;
}

.listener p:first-child {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 4vw, 2.8rem);
  font-weight: 800;
}

.listener p:last-child {
  margin: 0;
  color: #c5cad3;
  font-size: 1.1rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(16px, 4vw, 42px);
  background: rgba(16, 17, 22, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

h1 {
  margin: 0;
  font-size: 1.45rem;
}

.topbar p,
.meta {
  margin: 6px 0 0;
  color: #b9bfca;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.board {
  padding: 18px clamp(16px, 4vw, 42px) 42px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

input {
  width: min(420px, 100%);
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: #171a22;
  color: #f3f4f6;
  padding: 0 12px;
  font: inherit;
}

#count {
  color: #b9bfca;
  white-space: nowrap;
}

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

.sound {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #1b1f29;
  color: #f7f8fb;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.sound:hover,
.sound:focus-visible {
  transform: translateY(-1px);
  border-color: #65d6ad;
  background: #202633;
  outline: none;
}

.sound span {
  display: block;
  color: #65d6ad;
  font-size: 0.78rem;
  font-weight: 800;
}

.sound strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

@media (max-width: 680px) {
  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .meta {
    justify-content: flex-start;
  }
}
