:root {
  color-scheme: dark;
  --page: #161616;
  --border: #383838;
  --text: #ececec;
  --muted: #a0a0a0;
  --accent: #e4e4e4;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
input,
select {
  border-radius: 5px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #87bba7;
  outline-offset: 3px;
}
a {
  color: inherit;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
p {
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 72px;
  max-width: 800px;
  margin: auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 18px;
  letter-spacing: -0.4px;
  font-weight: 650;
  text-decoration: none;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.local-badge {
  font-size: 11px;
  color: var(--muted);
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 0;
}
.text-button:hover {
  text-decoration: underline;
  color: var(--text);
}
.workspace {
  max-width: 720px;
  padding: 0 24px;
  margin: 42px auto 0;
}
.collection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.collection-bar .field-label {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 5px;
}
.collection-bar #collection-summary {
  font-size: 13px;
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  padding: 10px 15px;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}
.outlined {
  background: transparent;
  border-color: #484848;
}
.outlined:hover,
.skip:hover {
  background: #303030;
}
.primary {
  background: var(--accent);
  color: #181818;
  border-color: var(--accent);
}
.primary:hover {
  background: white;
}
.wide {
  width: 100%;
}
.game {
  padding: 32px 0 20px;
}
.game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.round-badge {
  font-size: 11px;
  color: var(--muted);
}
.instructions {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.player {
  margin-top: 30px;
}
.play-button {
  height: 62px;
  width: 100%;
  background: #e4e4e4;
  color: #171717;
  border: 1px solid #e4e4e4;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}
.play-button:hover {
  background: #fff;
}
.play-button #play-icon {
  font-size: 15px;
}
.audio-progress {
  height: 3px;
  background: #3d3d3d;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}
.audio-progress > div {
  height: 100%;
  background: #b5d6c8;
  width: 0;
}
.clip-control {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin: 20px 0 8px;
}
.clip-control > .field-label {
  margin: 0;
  color: var(--muted);
  flex-shrink: 0;
}
.clip-steps {
  display: flex;
  gap: 7px;
  flex: 1;
}
.clip-steps button {
  background: transparent;
  border: 1px solid #444;
  padding: 9px 0;
  flex: 1;
  font-size: 13px;
  color: var(--muted);
}
.clip-steps button.active {
  background: #353535;
  border-color: #9b9b9b;
  color: white;
}
.clip-steps button.heard {
  color: #c8c8c8;
}
.clip-steps button:hover {
  border-color: #888;
}
#guess-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 28px;
}
.guess-field {
  position: relative;
  flex: 1;
  min-width: 0;
}
.guess-wrapper {
  display: flex;
  border: 1px solid #4a4a4a;
  background: #202020;
  border-radius: 5px;
  height: 47px;
  padding-right: 5px;
}
.guess-wrapper:focus-within {
  border-color: #a6b8af;
}
.guess-wrapper input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 12px;
  outline: none;
  font-size: 14px;
}
.guess-wrapper input::placeholder {
  color: #909090;
}
.guess-wrapper button {
  align-self: center;
  background: #383838;
  border: 1px solid #4c4c4c;
  font-size: 12px;
  font-weight: 500;
  margin-right: 0;
  padding: 7px 10px;
}
.skip {
  background: transparent;
  border-color: #4a4a4a;
  min-width: 75px;
}
.message {
  min-height: 36px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  padding-top: 11px;
}
.message.error {
  color: #f0a99f;
}
.message.success {
  color: #b0d9c2;
}
.suggestions {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 51px;
  padding: 4px;
  border: 1px solid #555;
  background: #252525;
  border-radius: 5px;
  box-shadow: 0 8px 16px #0005;
}
.suggestions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 9px;
  border: 0;
  background: none;
  text-align: left;
  width: 100%;
  font-size: 12px;
}
.suggestions button strong {
  font-weight: 500;
}
.suggestions button span {
  font-size: 11px;
  color: var(--muted);
}
.suggestions button:hover,
.suggestions button[aria-selected="true"] {
  background: #3b3b3b;
}
.guess-history {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 3px;
  font-size: 12px;
  color: #c9a9a6;
}
.reveal {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 20px;
}
.reveal img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 3px;
}
.reveal-info {
  flex: 1;
  min-width: 140px;
}
.result-label {
  font-size: 11px;
  color: #b0d9c2;
}
.reveal-info h2 {
  font-size: 19px;
  margin-top: 5px;
}
.reveal-info p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
#reveal-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
#reveal-links a {
  font-size: 11px;
  color: #b7cbc2;
}
.game-bottom {
  display: flex;
  gap: 22px;
  align-items: center;
  padding-top: 19px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}
#audio-source {
  font-size: 10px;
  color: #8d8d8d;
  margin-left: auto;
}
.session-stats {
  display: flex;
  gap: 22px;
  padding: 6px 0 25px;
  font-size: 12px;
  color: var(--muted);
}
.session-stats strong {
  font-weight: 500;
  color: #d2d2d2;
}
details {
  border-top: 1px solid var(--border);
}
summary {
  padding: 15px 0;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  width: max-content;
}
summary:hover {
  color: var(--text);
}
.settings-content {
  padding: 3px 0 17px;
  font-size: 12px;
}
.volume-control {
  max-width: 270px;
  margin-bottom: 20px;
}
.volume-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  height: 3px;
  accent-color: #d0d0d0;
  cursor: pointer;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  cursor: pointer;
  color: #b6b6b6;
}
.toggle-row input {
  accent-color: #d0d0d0;
}
.recent-tracks {
  padding: 0 0 15px;
}
.recent-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
}
.recent-icon {
  font-size: 12px;
  color: var(--muted);
}
.recent-icon.won {
  color: #b0d9c2;
}
.recent-track > div {
  flex: 1;
  min-width: 0;
}
.recent-track strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}
.recent-track > div > span {
  font-size: 11px;
  color: var(--muted);
}
.recent-track > small {
  font-size: 11px;
  color: var(--muted);
}
footer {
  max-width: 720px;
  margin: 28px auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #858585;
}
dialog {
  width: 510px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
  background: #202020;
  border: 1px solid #555;
  border-radius: 8px;
  color: var(--text);
}
dialog::backdrop {
  background: #000a;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.icon-button {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 0;
  font-size: 24px;
  color: var(--muted);
  line-height: 1;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.small {
  font-size: 11px;
}
.source-detail {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 9px;
}
select,
input[type="number"],
input[type="text"] {
  background: #292929;
  border: 1px solid #4a4a4a;
  padding: 10px 11px;
  width: 100%;
  font-size: 13px;
}
select {
  height: 40px;
}
.filter-row {
  display: flex;
  gap: 16px;
}
.filter-row > div {
  flex: 1;
  min-width: 0;
}
.year-fields {
  display: flex;
  gap: 8px;
  align-items: center;
}
.year-fields input {
  min-width: 0;
  padding: 10px 8px;
}
.year-fields span {
  color: var(--muted);
  font-size: 11px;
}
.decades {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}
.decades button {
  font-size: 11px;
  border: 1px solid #444;
  background: transparent;
  color: var(--muted);
  padding: 6px 9px;
}
.decades button.selected {
  background: #3b3b3b;
  color: white;
  border-color: #8a8a8a;
}
.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
}
.filter-actions .muted {
  font-size: 11px;
}
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 22px;
}
.import-actions label {
  cursor: pointer;
}
.import-actions .button {
  font-size: 11px;
  padding: 10px 11px;
}
.import-actions + p {
  margin-top: 13px;
}
.danger {
  color: #e1a49b;
}
.manage-sources {
  margin-top: 15px;
}
.manage-sources #expand-library {
  font-size: 12px;
  margin: 12px 0;
}
.manage-sources p {
  margin: 7px 0;
}
.playlist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 8px 0;
}
.playlist-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-picker {
  position: relative;
}
.source-button {
  width: 100%;
  background: #292929;
  border: 1px solid #4a4a4a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  font-size: 13px;
  text-align: left;
}
.source-dropdown {
  position: absolute;
  z-index: 5;
  top: 44px;
  left: 0;
  right: 0;
  border: 1px solid #555;
  border-radius: 5px;
  background: #292929;
  max-height: 240px;
  overflow: auto;
  padding: 5px;
  box-shadow: 0 8px 16px #0005;
}
.source-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 7px;
  font-size: 12px;
}
.source-option:hover {
  background: #3a3a3a;
}
.source-option input {
  accent-color: #d4d4d4;
  flex-shrink: 0;
}
.source-option > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-option small {
  color: var(--muted);
  font-size: 10px;
}
#playlist-form .primary {
  margin-top: 15px;
}
.or-divider {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  margin: 23px 0;
}
.or-divider::before,
.or-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}
#import-dialog .small {
  margin-top: 14px;
}
#import-dialog label[for="csv-file"] {
  cursor: pointer;
}
.how-to {
  padding-left: 19px;
  font-size: 13px;
  line-height: 1.7;
}
.how-to li {
  margin-bottom: 10px;
}
#help-dialog .small {
  margin-top: 14px;
}
@media (max-width: 560px) {
  .topbar {
    height: 64px;
    padding: 0 20px;
  }
  .top-actions {
    gap: 14px;
  }
  .workspace {
    margin-top: 25px;
    padding: 0 20px;
  }
  .collection-bar {
    gap: 12px;
  }
  .collection-bar #collection-summary {
    font-size: 12px;
  }
  .game {
    padding-top: 27px;
  }
  h1 {
    font-size: 23px;
  }
  .instructions {
    font-size: 12px;
  }
  .player {
    margin-top: 25px;
  }
  .clip-control {
    display: block;
  }
  .clip-control > .field-label {
    margin-bottom: 9px;
  }
  .clip-steps {
    gap: 6px;
  }
  #guess-form {
    gap: 8px;
  }
  .guess-wrapper input {
    padding: 10px;
    font-size: 13px;
  }
  .guess-wrapper button {
    padding: 7px;
    font-size: 11px;
  }
  .skip {
    min-width: 60px;
    padding: 10px;
  }
  .game-bottom {
    gap: 17px;
    flex-wrap: wrap;
  }
  #audio-source {
    font-size: 9px;
    flex-basis: 100%;
    margin-left: 0;
  }
  .session-stats {
    gap: 18px;
    font-size: 11px;
  }
  .reveal > .button {
    width: 100%;
  }
  .filter-row {
    display: block;
  }
  .filter-actions {
    align-items: start;
    flex-direction: column;
  }
  .filter-actions > .button {
    width: 100%;
  }
  dialog {
    padding: 22px;
  }
  .top-actions .local-badge {
    display: none;
  }
  footer {
    padding: 0 20px;
    margin-top: 25px;
    flex-direction: column;
    font-size: 10px;
  }
}
