:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.42);
  --faint: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(18, 18, 18, 0.78);
  --accent: white;
  --font-size: 40px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
body {
  overflow: hidden;
}
.app-shell {
  height: 100%;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.topbar {
  position: relative;
  height: 76px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  z-index: 10;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}
.brand-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 700;
}
.brand-caption {
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  letter-spacing: 0.15em;
  font-weight: 600;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: var(--accent);
  border-radius: 9px;
  color: #080808;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
}
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: var(--bg);
  animation: splash-fade 150ms ease 850ms forwards;
}
.splash-wordmark {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 220px;
  min-height: 64px;
  font-weight: 750;
  letter-spacing: 0.12em;
}
.splash-full,
.splash-short {
  grid-area: 1 / 1;
  white-space: nowrap;
}
.splash-full {
  font-size: 22px;
  animation: splash-full-out 160ms ease 400ms forwards;
}
.splash-short {
  opacity: 0;
  transform: scale(0.86);
  font-size: 28px;
  letter-spacing: 0.08em;
  animation: splash-short-in 200ms ease 500ms forwards;
}
@keyframes splash-full-out {
  to {
    opacity: 0;
    transform: scale(0.94);
    filter: blur(3px);
  }
}
@keyframes splash-short-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes splash-fade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.top-actions {
  display: flex;
  margin-left: auto;
  gap: 8px;
}
.help-menu {
  position: relative;
}
.settings-menu {
  position: relative;
}
.icon-button,
.control-button {
  border: 0px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-button {
  font-family:
    "-apple-system", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
    "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  transition:
    background 0.2s,
    color 0.2s;
}
.icon-button:hover,
.control-button:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 22px 20px;
  padding-bottom: 100px;
}
.welcome {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fade-in 0.6s ease both;
}
.welcome-icon {
  font-size: 27px;
  color: var(--accent);
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 13px;
}
.welcome h1,
.song-heading h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.06em;
  margin: 0;
  font-weight: 720;
}
.welcome h1 span {
  color: rgba(255, 255, 255, 0.43);
}
.welcome-copy {
  color: accent;
  font-size: 14px;
  margin: 20px 0 24px;
}
.primary-button {
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #080808;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 0 38px rgba(200, 255, 77, 0.08);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 35px rgba(200, 255, 77, 0.22);
}
.primary-button span {
  font-size: 18px;
  vertical-align: -2px;
  margin-right: 6px;
}
.file-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 17px;
}
.song-heading {
  padding-top: 100px;
  position: absolute;
  top: 4%;
  text-align: center;
  z-index: 1;
}
.song-heading .eyebrow {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.36);
}
.song-heading h1 {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.035em;
}
.lyrics-viewport {
  width: min(900px, 90vw);
  height: min(65vh, 650px);
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 20%,
    #000 80%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 20%,
    #000 80%,
    transparent 100%
  );
}
.lyrics-list {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.48s cubic-bezier(0.2, 0.75, 0.2, 1);
}
.lyric-line {
  width: 100%;
  min-height: clamp(66px, 11vh, 104px);
  padding: 12px 15px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.14);
  filter: blur(1.8px);
  font-size: var(--font-size);
  line-height: 1.28;
  font-weight: 650;
  letter-spacing: -0.04em;
  cursor: pointer;
  transition:
    color 0.38s,
    filter 0.38s,
    opacity 0.38s,
    transform 0.38s;
  overflow-wrap: anywhere;
}
.lyric-line:focus {
  outline: none;
}
.lyric-line:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}
.lyric-line.near {
  color: rgba(255, 255, 255, 0.32);
  filter: blur(0.8px);
}
.lyric-line.active {
  color: #fff;
  filter: none;
  transform: scale(1.04);
  opacity: 1;
}
.lyric-line.past,
.lyric-line.upcoming {
  opacity: 0.72;
}
.empty-lyrics {
  text-align: center;
  color: var(--muted);
  z-index: 1;
}
.empty-lyrics p {
  margin: 0 0 10px;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  padding: 7px;
}
.text-button:hover {
  color: #fff;
}
.text-button:disabled {
  color: rgba(255, 255, 255, 0.28);
  cursor: not-allowed;
}
.drop-overlay {
  display: none;
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(200, 255, 77, 0.7);
  border-radius: 24px;
  background: rgba(200, 255, 77, 0.06);
  place-items: center;
  color: var(--accent);
  font-weight: 650;
  z-index: 5;
  pointer-events: none;
}
.stage.dragging .drop-overlay {
  display: grid;
}
.dock {
  position: absolute;
  left: 50%;
  bottom: 63px;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 48px));
  min-height: 76px;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(300px, 1.6fr) minmax(
      185px,
      0.9fr
    );
  align-items: center;
  gap: 24px;
  background: rgba(17, 17, 17, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 4;
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.dock.idle-hidden {
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
}
.track-info,
.track-copy {
  min-width: 0;
}
.track-info {
  display: flex;
  align-items: center;
  gap: 9px;
}
.track-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.track-copy strong,
.track-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-copy strong {
  font-size: 13px;
  font-weight: 600;
}
.track-copy span {
  font-size: 11px;
  color: var(--muted);
}
.clear-media-button {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.clear-media-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.clear-media-button[hidden] {
  display: none;
}
.playback {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 18px;
}
.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.control-button {
  min-width: 36px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.control-button:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}
.transport .subtle {
  min-width: 48px;
  padding: 0 5px;
}
.control-button:active {
  background: rgba(255, 255, 255, 0.1);
}
.play-button {
  min-width: 68px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #f4f4f2;
  color: #111;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition:
    background 0.15s,
    transform 0.15s;
}
.play-button:hover {
  background: var(--accent);
  transform: scale(1.04);
}
.timeline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.52);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}
.timeline input {
  width: 100%;
  height: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}
.dock-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.offset-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.offset-step {
  display: grid;
  justify-items: center;
  gap: 1px;
}
.offset-step > span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.offset-control > #offsetLabel {
  min-width: 44px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.offset-control .control-button {
  min-width: 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.08);
}
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 11px;
}
.file-button > span:first-child {
  font-size: 16px;
}
.footer {
  height: 46px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  padding: 0 12px;
  color: white;
  font-size: 12px;
}
.footer > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.footer .text-button {
  flex: none;
  font-size: 11px;
}
@media (min-width: 681px) and (max-width: 820px) {
  .dock {
    width: calc(100vw - 32px);
    grid-template-columns: minmax(120px, 0.8fr) minmax(270px, 1.6fr) minmax(
        155px,
        0.9fr
      );
    gap: 12px;
    padding: 11px 14px;
  }
  .dock-actions {
    gap: 6px;
  }
  .file-button-label {
    display: none;
  }
  .offset-step > span {
    font-size: 8px;
  }
  .file-button {
    width: 34px;
    padding: 0;
  }
}
.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(310px, calc(100vw - 28px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: #111;
  color: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
}
.settings-dropdown[hidden] {
  display: none;
}
.help-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: #111;
  color: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.55);
}
.help-dropdown[hidden] {
  display: none;
}
.help-dropdown-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.help-dropdown-heading h2 {
  margin: 0;
  font-size: 16px;
}
.help-dropdown-heading .icon-button {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 0;
  font-size: 19px;
}
.help-dropdown h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}
.help-dropdown h3 {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 650;
}
.help-intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.help-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.help-steps li {
  display: list-item;
}
.help-steps strong {
  display: block;
  margin-bottom: 2px;
  color: var(--fg);
  font-size: 11px;
}
.help-dropdown code {
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font-size: 10px;
}
.help-dropdown ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.help-dropdown li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.help-dropdown kbd {
  display: inline-grid;
  min-width: 22px;
  height: 21px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 10px;
}
.key-group {
  display: flex;
  gap: 3px;
}
.help-click {
  grid-column: 1 / -1;
}
.light-mode .help-dropdown {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fafafa;
  color: #111;
}
.light-mode .help-dropdown kbd {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.04);
  color: #111;
}
.settings-dropdown-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.settings-dropdown-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}
.settings-dropdown .setting-row {
  margin: 14px 0;
  font-size: 12px;
}
.settings-dropdown .settings-note {
  margin: 14px 0 0;
}
.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 19px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}
.setting-row input {
  grid-column: 1/-1;
  width: 100%;
  accent-color: var(--accent);
}
.setting-row output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.setting-row select {
  background: #222;
  color: white;
  border: 1px solid #333;
  padding: 7px 10px;
  border-radius: 8px;
}
.settings-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 24px;
}
.settings-note span {
  color: var(--accent);
}
body.light-mode {
  --bg: #f1f1ed;
  --fg: #111;
  --muted: rgba(0, 0, 0, 0.48);
  --glass: rgba(255, 255, 255, 0.8);
  --line: rgba(0, 0, 0, 0.12);
  color: #111;
}
.light-mode .brand,
.light-mode .icon-button,
.light-mode .control-button {
  color: #222;
}
.light-mode .brand-caption {
  color: rgba(0, 0, 0, 0.45);
}
.light-mode .welcome h1 span {
  color: rgba(0, 0, 0, 0.38);
}
.light-mode .file-hint,
.light-mode .footer {
  color: rgba(0, 0, 0, 0.4);
}
.light-mode .lyric-line {
  color: rgba(0, 0, 0, 0.17);
}
.light-mode .lyric-line.near {
  color: rgba(0, 0, 0, 0.42);
}
.light-mode .lyric-line.active {
  color: #080808;
}
.light-mode .song-heading h1 {
  color: #111;
}
.light-mode .track-copy strong {
  color: #111;
}
.light-mode .clear-media-button {
  border-color: rgba(0, 0, 0, 0.14);
  color: rgba(0, 0, 0, 0.55);
}
.light-mode .play-button {
  background: #111;
  color: white;
}
.light-mode .dock {
  border-color: rgba(0, 0, 0, 0.1);
}
.light-mode .settings-dropdown {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fafafa;
  color: #111;
}
.light-mode .setting-row {
  color: rgba(0, 0, 0, 0.75);
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 680px) {
  .topbar {
    height: 60px;
    padding: 0 18px;
  }
  .stage {
    padding-bottom: 22px;
  }
  .welcome h1 {
    font-size: 46px;
  }
  .welcome-copy {
    font-size: 12px;
  }
  .dock {
    bottom: 48px;
    width: calc(100vw - 20px);
    min-height: 98px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .track-info {
    grid-column: 1;
    grid-row: 1;
  }
  .track-copy strong {
    font-size: 12px;
  }
  .track-copy span {
    font-size: 10px;
  }
  .playback {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(90px, 1fr);
    gap: 10px;
  }
  .transport {
    gap: 4px;
  }
  .control-button {
    min-width: 32px;
    padding: 0 5px;
  }
  .dock-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
  }
  .file-button-label {
    display: none;
  }
  .file-button {
    width: 34px;
    padding: 0;
  }
  .footer {
    height: 38px;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
  }
  .song-heading {
    top: 2%;
  }
  .lyrics-viewport {
    width: 94vw;
    height: min(58vh, 530px);
  }
  .lyric-line {
    min-height: clamp(62px, 10vh, 88px);
    padding: 9px;
    font-size: calc(var(--font-size) * 0.78);
  }
}
@media (max-width: 460px) {
  .help-dropdown {
    position: fixed;
    top: 54px;
    right: 12px;
    left: auto;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 66px);
  }
}
@media (max-width: 400px) {
  .settings-dropdown {
    position: fixed;
    top: 54px;
    right: 12px;
    left: auto;
  }
}
@media (max-height: 580px) {
  .topbar {
    height: 50px;
  }
  .welcome-icon {
    margin-bottom: 8px;
  }
  .welcome-copy {
    margin: 10px 0 14px;
  }
  .stage {
    padding-bottom: 12px;
  }
  .lyrics-viewport {
    height: 52vh;
  }
  .dock {
    min-height: 70px;
    padding: 9px 15px;
    bottom: 45px;
  }
  .footer {
    height: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Lyrics-only view */
body.lyrics-only .topbar,
body.lyrics-only .song-heading,
body.lyrics-only .dock,
body.lyrics-only .footer,
body.lyrics-only .welcome,
body.lyrics-only .empty-lyrics,
body.lyrics-only .drop-overlay {
  display: none !important;
}
body.lyrics-only .stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  padding: 0;
}
body.lyrics-only .lyrics-viewport {
  width: min(1100px, 96vw);
  height: 100vh;
}
