:root {
  color-scheme: light dark;
  --gap: 1rem;
}

body {
  font: 15px/1.5 system-ui, sans-serif;
  margin: 0 auto;
  max-width: 54rem;
  padding: var(--gap);
}

header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

h1 {
  font-size: 1.3rem;
}

#spotify-account {
  background: Canvas;
  overflow-wrap: anywhere;
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

#spotify-account a,
#spotify-account button {
  margin-left: 0.5rem;
}

#room-menu details {
  position: relative;
}

#room-menu summary {
  cursor: pointer;
}

.room-menu-items {
  background: Canvas;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 6px;
  position: absolute;
  right: 0;
  width: min(18rem, calc(100vw - 2rem));
  z-index: 1;
}

#room-menu a,
#room-menu button {
  box-sizing: border-box;
  color: LinkText;
  display: block;
  padding: 0.6rem;
  text-align: left;
  width: 100%;
}

#room-menu button {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

fieldset {
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 6px;
  margin-bottom: var(--gap);
}

legend {
  font-weight: 600;
}

button {
  font: inherit;
  padding: 0.4em 0.9em;
}

#sessions,
#results {
  list-style: none;
  padding: 0;
}

#sessions li,
#results li {
  margin: 0.5rem 0;
}

#results .result-row {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

#results .result-row span {
  flex: 1;
  min-width: 0;
}

#results details {
  margin: 0.5rem 0 0.75rem 1rem;
}

#sessions a,
#results button,
#spotify-activation button {
  display: block;
  padding: 0.7rem 0.9rem;
  text-align: left;
}

#results button {
  text-align: center;
}

#candidates button small {
  display: block;
  opacity: 0.7;
}

input[type='text'],
input[type='email'] {
  font: inherit;
  padding: 0.3em;
  width: min(100%, 26rem);
}

input[type='range'] {
  vertical-align: middle;
  width: 16rem;
}

pre {
  background: color-mix(in srgb, currentColor 8%, transparent);
  border-radius: 6px;
  overflow-x: auto;
  padding: 0.75rem;
}

.verdict {
  font-weight: 600;
}

.problem {
  color: #b3261e;
}

dl {
  display: grid;
  gap: 0.2rem 1rem;
  grid-template-columns: max-content 1fr;
  margin: 0;
}

dt {
  color: color-mix(in srgb, currentColor 65%, transparent);
}

dd {
  font-variant-numeric: tabular-nums;
  margin: 0;
}
