:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #172b28;
  background: #f7f7f0;
  font-synthesis: none;
  --green: #134f3b;
  --line: #d5dcd2;
  --muted: #50635b;
  --lime: #e7f5b0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
.file-button {
  border: 1px solid #bcc9be;
  background: #fff;
  color: #183d30;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
button:hover,
.file-button:hover {
  background: #edf3e6;
  border-color: #648a71;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #2a7fca;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 5%;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.logo {
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--lime);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 34px;
}
h1 {
  font-size: 24px;
  letter-spacing: -1px;
  margin: 0 0 5px;
}
.dot {
  color: #7c9a45;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.9px;
  font-weight: 800;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 6px;
}
nav button {
  border-color: transparent;
  background: transparent;
}
nav .active {
  background: #eaf0e4;
  border-color: #d9e4d0;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 0 5% 150px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0 25px;
}
h2 {
  font-size: 34px;
  letter-spacing: -1.2px;
  margin: 8px 0 10px;
}
p {
  line-height: 1.55;
}
.intro p {
  margin: 6px 0;
  color: var(--muted);
}
.badge {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: #eef3e7;
  border-color: #c7d4b8;
  max-width: 350px;
  white-space: normal;
}
.badge.ready:before {
  content: "● ";
  color: #287843;
}
.badge.error {
  background: #fff0d4;
  color: #754704;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 15px;
  font-size: 13px;
}
.divider {
  margin: 0 15px;
  color: #8c9a91;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar button {
  font-size: 12px;
  padding: 8px 12px;
}
.song-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}
.song-row {
  display: grid;
  grid-template-columns: 95px 228px minmax(140px, 1fr) 145px;
  gap: 15px;
  align-items: center;
  min-height: 67px;
  padding: 10px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.song-row.selected {
  border-color: #477e54;
  box-shadow: inset 3px 0 #477e54;
}
.song-number {
  font-size: 11px;
  letter-spacing: 1.1px;
  font-weight: 800;
}
.song-number small {
  display: block;
  letter-spacing: 0;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.song-row .controls {
  display: flex;
  gap: 6px;
}
.song-row .play {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.song-row button {
  font-size: 12px;
  padding: 9px 12px;
}
.status {
  font-size: 11px;
  color: var(--muted);
}
.status progress {
  display: block;
  width: 100%;
  max-width: 190px;
  height: 5px;
  margin-top: 6px;
  accent-color: #4b7940;
}
.answer {
  grid-column: 2/-1;
  border-top: 1px solid var(--line);
  padding: 12px 0 2px;
}
.answer strong {
  font-size: 14px;
}
.answer span {
  display: inline-block;
  margin-left: 16px;
  font-size: 11px;
  font-weight: 800;
  color: #3a6033;
  background: #edf4de;
  padding: 5px 9px;
  border-radius: 4px;
}
.empty {
  text-align: center;
  border: 1px dashed #becbb6;
  border-radius: 12px;
  padding: 55px 20px;
  margin-top: 18px;
}
.empty h3 {
  font-size: 24px;
  margin: 14px 0;
}
.empty p {
  color: var(--muted);
  font-size: 14px;
}
.empty-icon {
  font-size: 36px;
  color: #50723e;
}
.hint {
  font-size: 12px;
  color: var(--muted);
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #c2cdbc;
  box-shadow: 0 -5px 25px #23352009;
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 17px 5%;
  z-index: 5;
}
.dock-label {
  width: 170px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}
.yay,
.buzzer {
  min-height: 62px;
  flex: 1;
  max-width: 370px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 22px;
  letter-spacing: 1px;
}
.yay {
  background: #e5f3ac;
  border-color: #a5be66;
  color: #26470e;
}
.buzzer {
  background: #ffe8da;
  border-color: #e3b299;
  color: #702f22;
}
.yay small,
.buzzer small {
  font-size: 10px;
  letter-spacing: 1px;
}
.yay span,
.buzzer span {
  font-size: 32px;
}
.stop {
  margin-left: auto;
  font-size: 12px;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: white;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.admin-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.admin-row strong {
  font-size: 15px;
}
.admin-row .actions {
  flex-wrap: wrap;
}
.admin-row button {
  font-size: 12px;
}
.notice {
  background: #eaf0e5;
  color: #33492b;
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #ffeadb;
  color: #802c15;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  width: min(780px, 94vw);
  max-height: 92vh;
  color: #172b28;
  background: #fafbf6;
  box-shadow: 0 25px 100px #0004;
}
dialog::backdrop {
  background: #17322899;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-size: 26px;
}
.dialog-header button {
  font-size: 23px;
  line-height: 1;
  padding: 8px 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 15px;
}
input:not([type="checkbox"]) {
  width: 100%;
  display: block;
  margin-top: 7px;
  border: 1px solid #adbdad;
  border-radius: 6px;
  background: #fff;
  color: #172b28;
  padding: 10px;
  font-size: 14px;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--green);
}
input[type="checkbox"] {
  accent-color: var(--green);
}
.file-button {
  margin: 0;
  font-size: 14px;
}
.file-button input {
  display: none !important;
}
audio {
  width: 100%;
  margin: 7px 0;
}
.scrub-label output {
  float: right;
  font-weight: 500;
}
.selection {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 18px;
  padding: 15px;
  background: #edf2e7;
  border-radius: 8px;
}
.selection button {
  font-size: 11px;
  margin-top: 7px;
  padding: 8px;
}
.selection strong {
  display: block;
  font-size: 24px;
  margin: 9px 0;
}
.selection #regionTimes {
  font-size: 11px;
  display: block;
}
.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 18px;
}
.check {
  margin-top: 15px;
}
#settingsDialog {
  max-width: 520px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 122px;
  transform: translateX(-50%);
  background: #183d30;
  color: white;
  padding: 14px 22px;
  border-radius: 9px;
  z-index: 20;
  max-width: 90vw;
  font-size: 14px;
  box-shadow: 0 4px 20px #0003;
}
[hidden] {
  display: none !important;
}
@media (min-height: 1000px) {
  .song-row {
    min-height: 72px;
  }
}
@media (max-width: 850px) {
  header {
    padding: 18px 4%;
    gap: 15px;
    flex-wrap: wrap;
  }
  .intro {
    padding: 22px 0;
  }
  .intro h2 {
    font-size: 28px;
  }
  .song-row {
    grid-template-columns: 70px 200px 1fr;
    gap: 8px;
    padding: 10px;
  }
  .song-row .status {
    grid-column: 2;
    grid-row: 2;
  }
  .song-row .reveal {
    grid-column: 3;
    grid-row: 1;
  }
  .answer {
    grid-column: 1/-1;
  }
  .song-row button {
    padding: 9px;
  }
  .dock-label {
    display: none;
  }
  footer {
    padding: 12px 4%;
    gap: 10px;
  }
  .yay,
  .buzzer {
    font-size: 18px;
  }
  .yay small,
  .buzzer small {
    display: none;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  main {
    padding-bottom: 130px;
  }
  .admin-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  h1 {
    font-size: 21px;
  }
  nav {
    width: 100%;
  }
  nav button {
    flex: 1;
    font-size: 12px;
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .intro h2 {
    font-size: 27px;
  }
  .song-row {
    grid-template-columns: 58px 1fr 106px;
  }
  .song-row .controls {
    gap: 4px;
  }
  .song-row button {
    font-size: 10px;
    padding: 10px 7px;
  }
  .song-row .status {
    grid-column: 2/-1;
  }
  .song-row .reveal {
    font-size: 10px;
  }
  .answer span {
    margin: 8px 0 0;
    display: table;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .selection {
    grid-template-columns: 1fr 1fr;
  }
  .selection > div {
    grid-column: 1/-1;
  }
  .source-actions {
    flex-wrap: wrap;
  }
  .yay,
  .buzzer {
    gap: 7px;
    font-size: 15px;
  }
  .stop {
    font-size: 10px;
    padding: 10px;
  }
  .yay span,
  .buzzer span {
    font-size: 23px;
  }
  footer {
    gap: 7px;
  }
  .dialog-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep the host header compact so the setlist owns the screen. */
header {
  padding-top: 17px;
  padding-bottom: 17px;
}
.intro {
  padding-top: 18px;
  padding-bottom: 18px;
}
.intro h2 {
  font-size: 29px;
  margin: 5px 0;
}
.intro p {
  margin: 4px 0;
}
.toolbar {
  padding-top: 12px;
  padding-bottom: 12px;
}
