html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
main {
  height: 100dvh;
  min-height: 0;
  overflow: clip;
  padding-top: var(--player-top, 100px);
}
.station-name {
  position: fixed;
  top: 24px;
  left: 32px;
  z-index: 4;
  padding-top: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.station-sidebar {
  position: fixed;
  top: 64px;
  bottom: 24px;
  left: 32px;
  z-index: 4;
  width: 272px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  color: var(--muted);
}
.station-sidebar > * {
  pointer-events: auto;
}
.station-navigation {
  flex: none;
  display: flex;
  align-items: center;
  gap: 24px;
}
.station-navigation .panel-tab,
.station-navigation #open-favourites {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  min-height: 44px;
  border-radius: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.station-navigation .panel-tab:hover {
  color: var(--ink);
}
.station-navigation .panel-tab[aria-expanded="true"] {
  color: var(--ink);
}
.queue-badge {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.queue-toggle[data-ready="true"]::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--active);
}
.station-panel {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.generation-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding: 1px 4px;
  margin: 0 -4px;
}
.generation-heading {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.generation-heading h2 {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.generation-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.generation-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.generation-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 10px;
  padding: 7px 0;
}
.generation-row[data-own="true"] .queue-position {
  color: var(--active);
}
.queue-position {
  font-size: 10px;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.queue-description {
  color: var(--ink);
  font-size: 12px;
  line-height: 18px;
  margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}
.generation-row[data-own="true"] .queue-description,
.generation-row[data-state="generating"] .queue-description {
  -webkit-line-clamp: 2;
}
.queue-description:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
.prompt-tooltip {
  position: fixed;
  z-index: 20;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 8px 28px var(--shadow);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: prompt-appear 100ms ease-out;
}
@keyframes prompt-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.generation-row.can-cancel .queue-content {
  padding-right: 48px;
}
.queue-byline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.6;
}
.queue-requester {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-phase {
  white-space: nowrap;
  flex: none;
}
.queue-cancel {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  min-height: 44px;
  min-width: 44px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  text-align: right;
}
.queue-cancel:hover,
.listener-name:hover,
.queue-ready:hover {
  color: var(--ink);
}
.queue-cancel:disabled {
  opacity: 0.5;
  cursor: default;
}
.queue-stages {
  display: flex;
  gap: 2px;
  flex: none;
}
.queue-stages span {
  width: 4px;
  height: 2px;
  background: var(--border);
  transition: background 300ms;
}
.queue-stages [data-done="true"] {
  background: var(--signal);
}
.queue-stages [data-current="true"] {
  animation: queue-breathe 2s ease-in-out infinite;
}
.queue-gap {
  padding: 6px 0 6px 30px;
  font-size: 10px;
}
.queue-empty,
.queue-connection {
  line-height: 1.65;
  margin: 0 0 12px;
}
.my-songs-status {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.6;
}
.my-songs,
.archive-dialog {
  --archive-color: #b3443d;
}
[data-theme="dark"] .my-songs,
[data-theme="dark"] .archive-dialog {
  --archive-color: #e18c82;
}
.my-song {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  column-gap: 12px;
  min-height: 32px;
}
.my-song-play {
  border: 0;
  padding: 6px 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.my-song-archive {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--archive-color);
  cursor: pointer;
}
.my-song-archive:hover {
  background: color-mix(in srgb, var(--archive-color) 12%, transparent);
}
.my-song-archive svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.my-songs-pages .text-action {
  min-height: 36px;
  font-size: 11px;
}
.archive-dialog {
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 16px 64px var(--shadow);
  font: inherit;
  text-align: left;
}
.archive-dialog::backdrop {
  background: rgb(0 0 0 / 30%);
  backdrop-filter: blur(3px);
}
.archive-dialog h2 {
  overflow-wrap: anywhere;
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 500;
}
.archive-dialog p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.archive-dialog .archive-error {
  color: var(--archive-color);
}
.archive-error:empty {
  display: none;
}
.archive-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.archive-actions button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.archive-actions .archive-confirm {
  color: var(--archive-color);
  border-color: color-mix(in srgb, var(--archive-color) 40%, transparent);
  background: color-mix(in srgb, var(--archive-color) 8%, transparent);
}
.archive-actions button:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.archive-actions button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.archive-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}
.my-songs-pages {
  display: flex;
  align-items: center;
  gap: 20px;
}
.my-songs-pages {
  justify-content: space-between;
  margin-top: 16px;
  font-size: 10px;
}
.my-songs button:disabled {
  opacity: 0.5;
  cursor: default;
}
.queue-connection {
  margin-top: 14px;
  font-size: 11px;
}
.generation-results {
  margin-bottom: 24px;
}
.generation-results h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.queue-ready {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 62px;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--selected) 24%, var(--panel));
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 180ms;
}
.queue-ready::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--active);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.24;
  animation: ready-breathe 6s ease-in-out infinite;
}
.queue-ready:hover {
  background: color-mix(in srgb, var(--selected) 55%, var(--panel));
}
.queue-ready:hover::before,
.queue-ready:focus-visible::before {
  animation: none;
  opacity: 0.6;
}
.queue-ready span:first-child {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}
.queue-ready-label {
  font-size: 11px;
  color: var(--active);
  flex-shrink: 0;
}
@keyframes ready-breathe {
  50% {
    opacity: 0.6;
  }
}
.queue-failed {
  font-size: 11px;
  line-height: 1.6;
}
.queue-failed p {
  margin: 8px 0 0;
}
.listener-identity {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
}
.listener-identity > span {
  flex: none;
  white-space: nowrap;
}
.listener-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 44px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.listener-name-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.listener-edit {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--muted);
  transition: color 160ms;
}
.listener-name:hover .listener-edit,
.listener-name:focus-visible .listener-edit {
  color: var(--ink);
}
.listener-form {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.listener-form input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--field);
  padding: 6px 8px;
  font: inherit;
  color: var(--ink);
}
.listener-form .text-action {
  min-height: 44px;
  min-width: 44px;
}
.listener-error {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.5;
  color: var(--ink);
}
.station-sidebar button:focus-visible,
.listener-form input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
@keyframes queue-breathe {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 1100px), (max-height: 600px) {
  .station-sidebar {
    bottom: auto;
    width: min(320px, calc(100vw - 40px));
    max-height: calc(100dvh - 88px);
  }
  .station-panel {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 8px 32px var(--shadow);
    animation: queue-enter 180ms var(--ease);
  }
  .queue-cancel {
    min-height: 44px;
  }
  .listener-name {
    min-height: 44px;
  }
}
@media (max-width: 480px) {
  .station-name {
    left: 20px;
    top: 14px;
  }
  .station-sidebar {
    left: 20px;
    top: 46px;
    max-height: calc(100dvh - 66px);
  }
}
.station-panel .favourites-list {
  position: static;
  width: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.station-panel .saved-row {
  border: 0;
}
.station-panel .saved-play {
  padding-left: 0;
  font-size: 13px;
}
.station-panel .empty-favourites {
  text-align: left;
  margin: 0;
}
@media (max-height: 700px) and (max-width: 639px) {
  main {
    --request-offset: 12px;
    padding-top: max(124px, var(--player-top, 124px));
  }
  .station-name {
    display: none;
  }
  .station-sidebar {
    top: 10px;
    max-height: calc(100dvh - 30px);
    gap: 0;
  }
  .listener-identity {
    max-width: calc(100% - 48px);
  }
  .title-frame {
    height: 80px;
  }
  .title-stack {
    gap: 12px;
  }
  .player {
    padding-bottom: 0;
  }
}
@media (max-height: 600px) and (max-width: 639px) {
  main {
    --request-offset: 6px;
  }
  .title-frame {
    height: 64px;
  }
  .signal {
    height: 20px;
  }
  .timeline {
    margin-top: 4px;
  }
  #seek {
    height: 32px;
  }
  #recent-prompts {
    padding-top: 8px;
  }
}
@media (max-height: 600px) and (min-width: 640px) {
  .station-sidebar {
    top: 24px;
    left: 160px;
    max-height: calc(100dvh - 48px);
  }
  .listener-identity {
    position: fixed;
    top: 24px;
    right: 90px;
    width: min(320px, calc(100vw - 430px));
  }
  .player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
    width: min(760px, 100%);
    padding-bottom: 0;
  }
  .request-area {
    margin-top: 0;
  }
  .title-frame {
    height: 106px;
  }
}
@keyframes queue-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .queue-ready::before {
    animation: none;
  }
  .prompt-tooltip {
    animation: none;
  }
  .queue-stages [data-current="true"] {
    animation: none;
  }
}

.queue-estimate {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
