@font-face {
  font-family: Panton;
  src: url(fonts/Panton-Regular.otf);
}
@font-face {
  font-family: Panton;
  src: url(fonts/Panton-Bold.otf);
  font-weight: 700;
}
* {
  box-sizing: border-box;
}
html {
  background: #e9f2f9;
  color: #203f57;
  font-family: Panton, Arial, sans-serif;
}
body {
  margin: 0;
}
a {
  color: #276081;
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 42px;
  background: #276081;
  color: white;
  font-weight: 700;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button.secondary {
  background: #dce8f1;
  color: #203f57;
}
button:hover {
  filter: brightness(0.96);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #c27c14;
  outline-offset: 3px;
}
.masthead {
  height: 76px;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.masthead h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
}
.masthead a {
  font-size: 15px;
}
main {
  display: grid;
  grid-template-columns: minmax(540px, 1.2fr) minmax(390px, 1fr);
  gap: 32px;
  padding: 0 32px 24px;
  max-width: 1800px;
  margin: auto;
}
.player {
  position: sticky;
  top: 12px;
  align-self: start;
}
.work-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 12px;
}
.work-heading p {
  margin: 0 0 3px;
  font-size: 14px;
  color: #526d81;
}
.work-heading h2 {
  margin: 0;
  font-size: 28px;
}
.work-heading > span {
  font-size: 14px;
  color: #526d81;
}
.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  min-height: 320px;
  height: min(58vh, 680px);
  position: relative;
}
.stage canvas {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  aspect-ratio: 1;
}
.transport {
  display: flex;
  gap: 6px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.transport #pause {
  min-width: 86px;
}
.tuning {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}
.tuning label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tuning input[type="range"] {
  width: 110px;
  accent-color: #276081;
}
.tuning input[type="checkbox"] {
  accent-color: #276081;
  width: 18px;
  height: 18px;
}
.tuning #loop {
  margin-left: auto;
  color: #526d81;
}
.motion {
  font-size: 15px;
  margin: 13px 0 8px;
}
.status {
  font-size: 13px;
  color: #526d81;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.scan-link {
  font-size: 13px;
  margin: 8px 0;
}
.library {
  padding-bottom: 24px;
}
.filters {
  position: sticky;
  top: 0;
  background: #e9f2f9;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 0 14px;
  z-index: 2;
}
.filters label {
  font-size: 13px;
  display: grid;
  gap: 6px;
}
.filters input,
.filters select {
  min-width: 0;
  width: 100%;
  background: white;
  border: 1px solid #b6cbdc;
  border-radius: 7px;
  padding: 10px;
  color: #203f57;
}
.filters > span {
  grid-column: 1/-1;
  font-size: 13px;
  color: #526d81;
}
.family-group {
  margin: 0 0 28px;
}
.family-group h2 {
  font-size: 19px;
  margin: 0 0 10px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  display: block;
  background: transparent;
  padding: 0;
  color: #203f57;
  text-align: left;
  border-radius: 5px;
  font-weight: 400;
}
.tile img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 3px solid transparent;
  border-radius: 7px;
}
.tile span {
  font-size: 13px;
  line-height: 1.2;
  display: block;
  padding: 5px 2px;
  min-height: 36px;
}
.tile[aria-pressed="true"] img {
  border-color: #c27c14;
}
.tile[aria-pressed="true"] span {
  font-weight: 700;
}
.exit {
  display: none;
  position: absolute;
  right: 18px;
  top: 18px;
  background: #276081;
}
.stage:fullscreen,
.theatre .stage {
  background: white;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-height: none;
}
.stage:fullscreen canvas,
.theatre .stage canvas {
  height: 100vh;
  width: 100vw;
  object-fit: contain;
}
.stage:fullscreen .exit,
.theatre .exit {
  display: block;
}
.theatre .stage {
  position: fixed;
  inset: 0;
  z-index: 30;
}
@media (min-width: 1500px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .tuning select {
    border: 1px solid #b6cbdc;
    border-radius: 6px;
    background: white;
    color: inherit;
    padding: 6px 8px;
  }
}
@media (max-width: 1000px) {
  main {
    grid-template-columns: minmax(410px, 1fr) minmax(280px, 0.8fr);
    gap: 22px;
    padding: 0 20px;
  }
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .masthead {
    padding: 16px 20px;
  }
  .stage {
    height: 52vh;
  }
  .transport button {
    font-size: 13px;
    padding: 10px;
  }
}
@media (max-width: 760px) {
  .masthead {
    height: auto;
    padding: 18px 16px;
    flex-wrap: wrap;
  }
  .masthead h1 {
    font-size: 23px;
    order: 3;
    flex-basis: 100%;
  }
  main {
    display: block;
    padding: 0 16px;
  }
  .player {
    position: static;
    margin-bottom: 28px;
  }
  .stage {
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
  }
  .stage canvas {
    width: 100%;
    height: auto;
  }
  .work-heading h2 {
    font-size: 24px;
  }
  .filters {
    top: 0;
    padding-top: 12px;
  }
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tuning {
    gap: 12px;
  }
  .tuning #loop {
    margin-left: 0;
  }
  .status {
    flex-wrap: wrap;
  }
  .scan-link {
    line-height: 1.5;
  }
  .theatre .stage {
    aspect-ratio: auto;
  }
  .theatre .stage canvas {
    height: 100vh;
    width: 100vw;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
