:root {
  color-scheme: dark;
  --sr-yellow: #ffb700;
}
html {
  background: #111214;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #111214;
  min-height: 100%;
}
button,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  touch-action: manipulation;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/-F63fjptAgt5VM-kVkqdyU8n5ig.ttf) format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJ8lc.ttf) format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAO8lc.ttf) format("truetype");
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/CHy2V-3HFUT7aC4iv1TxGDR9DHEserHN25py2TQ3131Y.ttf)
    format("truetype");
}
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/CHy2V-3HFUT7aC4iv1TxGDR9DHEserHN25py2TQO131Y.ttf)
    format("truetype");
}

#sr-preview,
#sr-preview * {
  box-sizing: border-box;
}
#sr-preview {
  width: 100%;
  max-width: 620px;
  height: 100vh;
  height: 100dvh;
  height: var(--sr-viewport-height, 100dvh);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  color: #f1f1ee;
  background: #111214;
  font-family: "IBM Plex Mono", Consolas, monospace;
  line-height: 1.35;
  min-width: 0;
  display: grid;
  grid-template-areas: "brand" "index" "track" "seek" "controls" "toggle" "playlist" "scene" "words" "footer";
  grid-template-rows:
    auto auto auto 28px 44px 44px auto minmax(0, 1fr)
    auto auto;
}
#sr-preview button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
#sr-preview button:focus-visible,
#sr-preview canvas:focus-visible,
#sr-preview input:focus-visible {
  outline: 2px solid var(--sr-yellow);
  outline-offset: -2px;
}
#sr-preview .sr-brand {
  grid-area: brand;
  margin: 0;
  line-height: 1.1;
  font-family: "Pixelify Sans", "IBM Plex Mono", monospace;
  font-size: 19px;
  letter-spacing: 0;
  color: var(--sr-yellow);
  font-weight: 700;
  transform: scaleY(0.81);
  transform-origin: top left;
}
#sr-preview .sr-index {
  grid-area: index;
  margin-top: 2px;
  color: #909195;
  font-size: 11px;
}
#sr-preview .sr-headrow {
  grid-area: track;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 8px;
  padding: 2px 0 4px;
}
#sr-preview .sr-headrow > div {
  display: contents;
}
#sr-preview .sr-title {
  grid-column: 1 / -1;
  font-size: clamp(16px, 4.1vw, 21px);
  letter-spacing: -0.05em;
  font-weight: 500;
  overflow-wrap: anywhere;
}
#sr-preview .sr-artist {
  grid-column: 1;
  color: #929396;
  margin-top: 2px;
  font-size: 10px;
}
#sr-preview .sr-time {
  grid-column: 2;
  font-size: 10px;
  white-space: nowrap;
}
#sr-preview .sr-scrub {
  grid-area: seek;
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  background: linear-gradient(#37383b, #37383b) center/100% 6px no-repeat;
}
#sr-preview .sr-scrub span {
  position: absolute;
  left: 0;
  height: 6px;
  background: #f1f1ee;
  top: calc(50% - 3px);
  width: 0;
  pointer-events: none;
}
#sr-preview .sr-scrub input {
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
#sr-preview .sr-scrub input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 23px;
  height: 28px;
  background: transparent;
}
#sr-preview .sr-scrub input::-moz-range-thumb {
  width: 23px;
  height: 28px;
  background: transparent;
  border: 0;
}
#sr-preview .sr-controls {
  grid-area: controls;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 0;
}
#sr-preview .sr-controls button {
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 0;
}
#sr-preview .sr-controls svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex: none;
  pointer-events: none;
}
#sr-preview #sr-play .sr-icon-pause,
#sr-preview #sr-play.is-playing .sr-icon-play {
  display: none;
}
#sr-preview #sr-play.is-playing .sr-icon-pause {
  display: block;
}
#sr-preview .sr-controls button:active {
  color: var(--sr-yellow);
}
#sr-preview .sr-listbtn {
  grid-area: toggle;
  background: none;
  width: 100%;
  border: 0;
  border-top: 1px solid #87898d;
  border-bottom: 1px solid #87898d;
  min-height: 44px;
  text-align: left;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(9px, 2.65vw, 12px);
  white-space: nowrap;
}
#sr-preview .sr-listbtn > span:first-child {
  font-size: 13px;
}
#sr-preview .sr-down {
  margin-left: auto;
  font-family: Arial, sans-serif;
  font-size: 21px;
  line-height: 1;
}
#sr-preview.playlist-open .sr-down {
  transform: rotate(180deg);
}
#sr-preview .sr-playlist {
  grid-area: playlist;
  min-height: 0;
  max-height: clamp(
    44px,
    calc((var(--sr-viewport-height, 100dvh) - 360px) / 2),
    176px
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 0;
  border-bottom: 1px solid #87898d;
}
#sr-preview .sr-playlist[hidden] {
  display: none;
}
#sr-preview .sr-song {
  display: flex;
  width: 100%;
  min-height: 44px;
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 6px 4px;
  text-align: left;
  font-size: 11px;
}
#sr-preview .sr-song em {
  color: #8a8b8c;
  font-style: normal;
  font-size: 10px;
  flex: none;
}
#sr-preview .sr-song.sr-active {
  color: var(--sr-yellow);
}
#sr-preview .sr-song span {
  overflow-wrap: anywhere;
}
#sr-preview canvas {
  grid-area: scene;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  padding-top: 8px;
  object-fit: contain;
  object-position: center;
  image-rendering: pixelated;
  background: #090a0b;
  cursor: pointer;
}
#sr-preview .sr-words {
  grid-area: words;
  border: 1px solid #78797c;
  margin-top: 8px;
  min-height: 58px;
  padding: 8px 10px;
  font-size: clamp(11px, 2.9vw, 13px);
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
#sr-preview .sr-caret {
  width: 7px;
  height: 12px;
  background: #eee;
  display: inline-block;
  vertical-align: middle;
  margin-left: 3px;
  animation: sr-blink 1s steps(1) infinite;
}
@keyframes sr-blink {
  50% {
    opacity: 0;
  }
}
#sr-preview .sr-bottom {
  grid-area: footer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  line-height: 1.4;
  color: #999a9b;
  margin-top: 6px;
}
#sr-preview .sr-bottom > button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 44px;
  height: 44px;
  padding: 0 2px;
  background: none;
  border: 0;
  font-size: 18px;
}
#sr-preview .sr-bottom > button:active {
  color: var(--sr-yellow);
}
#sr-preview .sr-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.sr-help {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(var(--sr-viewport-height, 100dvh) - 32px);
  border: 1px solid #78797c;
  background: #111214;
  color: #f1f1ee;
  overflow: hidden;
  font:
    13px/1.35 "IBM Plex Mono",
    Consolas,
    monospace;
}
.sr-help[open] {
  display: flex;
  flex-direction: column;
}
.sr-help::backdrop {
  background: rgb(0 0 0 / 75%);
}
.sr-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 8px;
  padding: 6px 10px 6px 18px;
  border-bottom: 1px solid #37383b;
}
.sr-help-header h2 {
  margin: 0;
  color: var(--sr-yellow);
  font-size: 16px;
  font-weight: 500;
}
.sr-help-header button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
}
.sr-help-header svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  pointer-events: none;
}
.sr-help-body {
  min-height: 0;
  padding: 16px 18px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #87898d #202124;
  font-size: 13px;
  line-height: 1.65;
}
.sr-help-body:focus-visible {
  outline: 1px solid #87898d;
  outline-offset: -4px;
}
.sr-help-body p {
  margin: 0;
}
.sr-help-body h3 {
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 500;
}
.sr-help-body ul {
  margin: 0;
  padding-left: 18px;
}
.sr-help-body li + li {
  margin-top: 8px;
}
.sr-help-body::-webkit-scrollbar {
  width: 6px;
}
.sr-help-body::-webkit-scrollbar-track {
  background: #202124;
}
.sr-help-body::-webkit-scrollbar-thumb {
  background: #87898d;
}
@media (hover: none) and (pointer: coarse) {
  .sr-help-body {
    scrollbar-width: none;
    scrollbar-gutter: auto;
  }
  .sr-help-body::-webkit-scrollbar {
    display: none;
  }
}
@media (max-height: 560px) {
  #sr-preview {
    padding-top: max(6px, env(safe-area-inset-top));
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  #sr-preview .sr-title {
    font-size: 16px;
  }
  #sr-preview .sr-words {
    min-height: 46px;
    font-size: 11px;
    padding: 5px 8px;
    margin-top: 5px;
    line-height: 1.35;
  }
  #sr-preview .sr-bottom {
    margin-top: 4px;
  }
}
@media (min-width: 480px) and (max-height: 520px) and (orientation: landscape) {
  #sr-preview {
    max-width: 1100px;
    column-gap: 16px;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas: "brand scene" "index scene" "track scene" "seek scene" "controls scene" "toggle scene" "playlist scene" "footer words";
    grid-template-rows: auto auto auto 28px 44px 44px minmax(0, 1fr) auto;
  }
  #sr-preview .sr-playlist {
    max-height: none;
    height: 100%;
  }
  #sr-preview canvas {
    padding-top: 0;
  }
  #sr-preview .sr-bottom {
    align-self: end;
  }
}
@media (prefers-reduced-motion: reduce) {
  #sr-preview .sr-caret {
    animation: none;
  }
}

/* Isolate help gestures from the player, including mobile page bounce. */
html.sr-help-open {
  overflow: hidden;
  overscroll-behavior: none;
}
html.sr-help-open body {
  position: fixed;
  top: var(--sr-page-offset, 0px);
  left: 0;
  right: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
#sr-preview[inert] {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.sr-help,
.sr-help * {
  box-sizing: border-box;
}
.sr-help {
  overscroll-behavior: contain;
}
.sr-help::backdrop {
  touch-action: none;
  overscroll-behavior: none;
}
.sr-help button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.sr-help button:focus-visible {
  outline: 2px solid var(--sr-yellow);
  outline-offset: -2px;
}
.sr-help-body {
  touch-action: pan-y pinch-zoom;
}
