* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #292a27;
  --muted: #72746c;
  --hover: #eeede7;
  --selected: #e9ebe3;
  --active: #414a36;
  --signal: #727869;
  --field: #f2f1ec;
  --border: #e3e4dc;
  --focus: #717567;
  --panel: #fdfcf9;
  --line: #eeeee7;
  --pending: #eeeee7;
  --disabled: #a4a79c;
  --play-hover: #3b3d37;
  --result: #626b56;
  --shadow: #292a270a;
  --like: #4c6b38;
  --dislike: #a74b42;
  --favourite: #a87912;
  --like-selected: #e9ebe3;
  --dislike-selected: #f4e5e2;
  --favourite-selected: #f2ead5;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #181a17;
  --ink: #e7eadf;
  --muted: #a0a699;
  --hover: #2a2e25;
  --selected: #333c2b;
  --active: #c1d0aa;
  --signal: #a5b397;
  --field: #22251f;
  --border: #363c30;
  --focus: #aab99a;
  --panel: #20231e;
  --line: #33382e;
  --pending: #25291f;
  --disabled: #818877;
  --play-hover: #fafcf5;
  --result: #bccca8;
  --shadow: #00000038;
  --like: #b8d798;
  --dislike: #e18e82;
  --favourite: #eac264;
  --like-selected: #333c2b;
  --dislike-selected: #402e29;
  --favourite-selected: #3b3524;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main {
  --page-padding: 32px;
  --request-offset: 42px;
  display: grid;
  justify-items: center;
  align-items: start;
  min-height: 100svh;
  padding: var(--page-padding);
  padding-top: max(
    var(--page-padding),
    calc((100svh - var(--resting-player-height, 450px)) / 2)
  );
}
.player {
  position: relative;
  width: min(100%, 360px);
  padding-bottom: 28px;
}
.title-frame {
  height: 116px;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.title-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  text-align: center;
}
.signal {
  display: block;
  flex: none;
  color: var(--signal);
  overflow: visible;
  opacity: 0.85;
  transition: opacity 420ms ease;
}
body[data-playing="false"] .signal {
  opacity: 0.4;
}
body[data-scenario="empty"] .signal {
  visibility: hidden;
}
h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.32;
  font-weight: 450;
  letter-spacing: -0.018em;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px auto 0;
  width: max-content;
  max-width: 100%;
}
.timeline {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  width: min(100%, 284px);
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
#duration {
  text-align: right;
}
#seek {
  --progress: 0%;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  color: var(--signal);
  cursor: pointer;
  border-radius: 4px;
  touch-action: pan-y;
}
#seek::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--signal) var(--progress),
    var(--border) var(--progress)
  );
}
#seek::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: var(--border);
}
#seek::-moz-range-progress {
  height: 2px;
  background: var(--signal);
}
#seek::-webkit-slider-thumb {
  appearance: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: -2px;
  background: var(--signal);
}
#seek::-moz-range-thumb {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--signal);
}
#seek:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
#seek:disabled {
  cursor: default;
}
.transport,
.feedback {
  display: flex;
  align-items: center;
  gap: 2px;
}
button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.control {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  height: 44px;
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 50%;
  outline: none;
}
.control .surface {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--hover);
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 180ms var(--ease),
    transform 240ms var(--ease),
    background 200ms;
}
.control .glyph {
  display: grid;
  place-items: center;
  position: relative;
  width: 24px;
  height: 24px;
  will-change: transform;
}
.control svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    color 180ms,
    fill 180ms;
}
.control path {
  transition: fill 180ms;
}
.hand,
.star {
  fill: transparent;
}
.control:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.control[aria-pressed="true"] {
  color: var(--control-accent, var(--active));
}
.control[aria-pressed="true"] .surface {
  opacity: 1;
  transform: scale(1);
  background: var(--control-selected, var(--selected));
}
.control[aria-pressed="true"] .hand,
.control[aria-pressed="true"] .star {
  fill: currentColor;
}
.control[aria-pressed="true"] .cuff {
  fill: none;
}
.control:disabled {
  cursor: default;
}
.control[data-action="up"] {
  --control-accent: var(--like);
  --control-selected: var(--like-selected);
}
.control[data-action="down"] {
  --control-accent: var(--dislike);
  --control-selected: var(--dislike-selected);
}
.control[data-action="favourite"] {
  --control-accent: var(--favourite);
  --control-selected: var(--favourite-selected);
}
body[data-scenario="empty"] .control:disabled {
  opacity: 0.32;
}
.play {
  width: 48px;
  height: 48px;
  color: var(--paper);
}
.play .surface {
  inset: 3px;
  background: var(--ink);
  opacity: 1;
  transform: none;
  transition:
    background 200ms,
    transform 180ms var(--ease);
}
.play .transport-icon {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.8;
}
.skip svg {
  width: 22px;
  height: 22px;
}
.skip-triangle {
  fill: currentColor;
  stroke: none;
}
.skip-bar {
  stroke-width: 2.4;
}
.tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--muted);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 120ms,
    transform 160ms;
  transition-delay: 0ms;
}
.control:focus-visible .tooltip {
  opacity: 1;
  transform: none;
}
.notice {
  margin: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.notice .retry {
  flex-shrink: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.toast {
  position: fixed;
  z-index: 100;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(20px, env(safe-area-inset-right));
  width: fit-content;
  max-width: min(480px, calc(100% - 40px));
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 6px 24px var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (hover: hover) {
  .control:not(:disabled):hover .surface {
    opacity: 1;
    transform: scale(1);
  }
  .control:not(:disabled):hover {
    color: var(--control-accent, var(--ink));
  }
  .play:not(:disabled):hover {
    color: var(--paper);
  }
  .play:not(:disabled):hover .surface {
    background: var(--play-hover);
  }
  .control:not(:disabled):hover .tooltip {
    opacity: 1;
    transform: none;
    transition-delay: 650ms;
  }
}
.control[data-pressing="true"] .surface {
  transform: scale(0.94) !important;
}
.text-action {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--muted);
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  transition: color 180ms;
}
.text-action:hover {
  color: var(--ink);
}
.text-action:focus-visible,
.send-request:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 3px;
}
.corner-actions {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.favourites-corner {
  position: relative;
}
.favourites-list {
  position: absolute;
  top: 50px;
  right: 0;
  width: 280px;
  max-width: calc(100vw - 32px);
  max-height: min(240px, max(64px, calc(50svh - 220px)));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 24px var(--shadow);
  transform-origin: top right;
}
.saved-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}
.saved-row:last-child {
  border-bottom: 0;
}
.saved-play {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 8px;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  transition: color 180ms;
}
.saved-play:hover {
  color: var(--active);
}
.saved-play:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
  border-radius: 3px;
}
.saved-row .control {
  color: var(--muted);
}
.saved-row .control svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.empty-favourites {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 4px;
  line-height: 1.6;
  text-align: center;
}
.request-area {
  margin-top: calc(30px + var(--request-offset));
}
#request-form {
  display: flex;
  align-items: flex-end;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field);
  transition:
    border-color 180ms,
    background 180ms;
}
#request-form:focus-within {
  border-color: var(--focus);
  background: var(--paper);
}
#request-text {
  display: block;
  min-width: 0;
  flex: 1;
  min-height: 22px;
  max-height: 66px;
  margin: 12px 0 30px;
  resize: none;
  border: 0;
  background: transparent;
  padding: 0 8px 0 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--focus) transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.01em;
  outline: none;
}
#request-text::-webkit-scrollbar {
  width: 4px;
}
#request-text::-webkit-scrollbar-track {
  background: transparent;
}
#request-text::-webkit-scrollbar-thumb {
  background: var(--focus);
  border-radius: 4px;
}
#request-text::placeholder {
  color: var(--muted);
  opacity: 1;
}
#request-text:disabled {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  opacity: 1;
  cursor: wait;
}
#request-form[data-pending="true"] {
  background: var(--pending);
  border-color: var(--border);
}
.send-request {
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--active);
  cursor: pointer;
  transition:
    color 180ms,
    transform 180ms;
}
.send-request svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.send-request:hover:not(:disabled) {
  color: var(--ink);
  transform: translateX(2px);
}
.send-request:disabled {
  color: var(--disabled);
  cursor: default;
}
.request-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-inline: 16px;
  min-height: 44px;
  margin-top: 6px;
}
#request-limit {
  position: absolute;
  right: 15px;
  bottom: 5px;
  color: var(--muted);
  line-height: 12px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  visibility: hidden;
}
#request-form:focus-within #request-limit {
  visibility: visible;
}
#recent-prompts {
  padding-inline: 16px;
  padding-top: 8px;
}
.recent-prompt {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.recent-prompt:hover:not(:disabled) {
  color: var(--ink);
}
.recent-prompt > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.recent-prompt:disabled {
  color: var(--disabled);
  cursor: default;
}
.recent-prompt:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  border-radius: 4px;
}
.vote-count {
  position: absolute;
  top: 43px;
  left: 50%;
  translate: -50% 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.rate .tooltip {
  top: calc(100% + 28px);
}
#request-update {
  min-width: 0;
  max-width: 100%;
  text-align: left;
}
#open-favourites {
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
}
#open-favourites[aria-expanded="true"] {
  color: var(--ink);
}
.request-pending {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.request-result {
  appearance: none;
  border: 0;
  padding: 10px 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
  text-align: left;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  cursor: pointer;
  color: var(--result);
  border-radius: 3px;
  outline-offset: 3px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: color 180ms;
}
#request-form {
  position: relative;
  overflow: hidden;
}
#request-form::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35%;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    to right,
    transparent,
    var(--signal),
    transparent
  );
}
#request-form[data-working="true"]::after {
  opacity: 0.65;
  animation: request-activity 2.6s ease-in-out infinite;
}
@keyframes request-activity {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(386%);
  }
}
.request-result span {
  overflow-wrap: anywhere;
}
.request-result:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.request-result:focus-visible {
  outline: 2px solid var(--focus);
}
.saved-play span {
  overflow-wrap: anywhere;
  min-width: 0;
}
body[data-availability="empty"] .signal,
body[data-availability="offline-empty"] .signal {
  visibility: hidden;
}
body[data-availability="empty"] .control:disabled,
body[data-availability="offline-empty"] .control:disabled {
  opacity: 0.35;
}
@media (max-width: 480px) {
  main {
    --page-padding: 28px;
  }
  .corner-actions {
    top: 14px;
    right: 20px;
  }
  .player {
    width: min(100%, 336px);
  }
  h1 {
    font-size: 23px;
    line-height: 1.32;
    letter-spacing: -0.02em;
  }
  .controls {
    gap: 10px;
  }
}
@media (max-height: 640px) {
  main {
    --page-padding: 20px;
  }
  .title-frame {
    height: 106px;
  }
  .player {
    padding-bottom: 0;
  }
  .request-area {
    margin-top: calc(22px + var(--request-offset));
  }
}
@media (prefers-reduced-motion: reduce) {
  #request-form::after {
    left: 32.5%;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.appearance-toggle {
  color: var(--muted);
}
.appearance-toggle svg {
  position: relative;
  width: 18px;
  height: 18px;
}
:root[data-theme="light"] .sun,
:root[data-theme="dark"] .moon {
  display: none;
}
.login {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.login form {
  display: grid;
  gap: 20px;
  width: min(100%, 300px);
}
.login input,
.login button {
  font: inherit;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--field);
  color: var(--ink);
}
.login button {
  cursor: pointer;
}
.login p {
  font-size: 13px;
  color: var(--muted);
}
