:root {
  --bg: #0b1019;
  --surface: #101722;
  --raised: #19212e;
  --border: #ffffff0e;
  --fg: #e8edf5;
  --muted: #8290a4;
  --accent: #9dcbd9;
  --accent-fg: #0c1920;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f7fa;
  --surface: #fff;
  --raised: #e7edf3;
  --border: #172a4015;
  --fg: #203046;
  --muted: #5e7085;
  --accent: #347e94;
  --accent-fg: #fff;
  color-scheme: light;
}
body {
  font:
    13px/1.4 system-ui,
    sans-serif;
  grid-template-rows: 48px minmax(0, 1fr) auto;
  background: var(--bg);
}
[hidden] {
  display: none !important;
}
.symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.28;
  cursor: default;
}
button,
input {
  outline: none;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    color 0.15s;
}
header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.identity {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  letter-spacing: -0.5px;
  font-weight: 650;
}
.orbit {
  width: 15px;
  height: 15px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: relative;
  transform: rotate(-35deg);
}
.orbit:after {
  content: "";
  position: absolute;
  inset: 4px -4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.header-divider {
  height: 13px;
  width: 1px;
  background: var(--border);
}
#now-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 11px;
}
.host-tag {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.host-tag:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #9ed3b5;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.tool {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px;
  border-radius: 7px;
  flex-shrink: 0;
}
.tool:hover:not(:disabled) {
  background: var(--raised);
  color: var(--fg);
}
.icon {
  width: 30px;
  height: 30px;
  padding: 6px;
}
.queue-toggle {
  font-size: 11px;
}
.queue-toggle[aria-expanded="true"] {
  background: var(--raised);
  color: var(--fg);
}
#count {
  font-size: 9px;
  background: var(--raised);
  border-radius: 4px;
  padding: 1px 5px;
  font-variant-numeric: tabular-nums;
}
main {
  display: flex;
  min-height: 0;
  position: relative;
}
.stage {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #05080e;
  display: flex;
}
#media {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}
#media video,
#media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}
.empty {
  text-align: center;
  padding: 24px;
  color: #76859b;
  max-width: 450px;
}
.empty h1 {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 450;
  letter-spacing: -1.2px;
  color: #e3eaf3;
  margin: 12px 0;
}
.empty p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
}
.empty .eyebrow {
  font-size: 8px;
  letter-spacing: 2.6px;
  color: #677c93;
}
.cinema-mark {
  width: 92px;
  height: 92px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle, #769eb218, transparent 70%);
}
.cinema-mark span {
  position: absolute;
  inset: 5px;
  border: 1px solid #8cbbd02b;
  border-radius: 50%;
  transform: rotate(-30deg);
}
.cinema-mark span:after {
  content: "";
  position: absolute;
  inset: 23px -13px;
  border: 1px solid #8cbbd02b;
  border-radius: 50%;
}
.cinema-mark svg {
  width: 26px;
  height: 26px;
  color: #b5d1dd;
}
.join {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid #ffffff20;
  background: #111a29ed;
  color: #e6eef7;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 8px 25px #0007;
}
aside {
  width: 228px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
  min-height: 0;
}
.queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 6px;
}
.queue-heading h2 {
  font-size: 11px;
  font-weight: 500;
  margin: 0;
  color: var(--muted);
}
#queue-empty {
  padding: 0 16px;
  font-size: 12px;
  color: var(--muted);
}
ol {
  list-style: none;
  padding: 0 10px 12px;
  margin: 0;
  overflow: auto;
}
li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.track-number {
  width: 20px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.track-copy {
  min-width: 0;
  flex: 1;
}
.track-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--fg);
}
li small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
li[data-current] .track-number,
li[data-current] small {
  color: var(--accent);
}
li[data-played] {
  opacity: 0.5;
}
.remove {
  opacity: 0;
  width: 24px;
  height: 24px;
}
li:hover .remove,
.remove:focus-visible {
  opacity: 1;
}
footer {
  padding: 0 16px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  z-index: 2;
}
.transport {
  height: 58px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.play-control {
  border: 0;
  background: var(--fg);
  color: var(--bg);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.play-control:hover:not(:disabled) {
  background: var(--accent);
}
.play-control svg {
  width: 17px;
  height: 17px;
}
.time {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.slider {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), var(--raised) var(--fill, 0%));
  height: 3px;
  border-radius: 3px;
  cursor: pointer;
  min-width: 0;
  margin: 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
}
.slider::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--fg);
}
.slider:disabled {
  opacity: 0.35;
  cursor: default;
}
.seek {
  flex: 1;
}
.volume-control {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
}
.volume-control .slider {
  width: 65px;
}
.volume-control output {
  font-size: 9px;
  width: 28px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
form {
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 4px 5px 4px 12px;
  background: var(--surface);
}
.link-field {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  color: var(--muted);
}
.link-field svg {
  width: 14px;
  height: 14px;
}
.link-field input {
  border: 0;
  background: none;
  color: var(--fg);
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  font-size: 11px;
}
.link-field input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.add-button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--raised);
  border: 0;
  color: var(--fg);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.add-button:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-fg);
}
.add-button svg {
  width: 14px;
  height: 14px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 10px;
  padding: 7px 9px;
  white-space: nowrap;
}
.text-button:hover:not(:disabled) {
  color: var(--fg);
}
.message-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 0 10px;
}
#status {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  flex: 1;
}
#status[data-error] {
  color: #efaaac;
}
@media (max-width: 650px) {
  header {
    padding: 0 12px;
    gap: 10px;
  }
  .header-divider,
  #now-title {
    display: none;
  }
  .host-tag {
    flex: 1;
    text-align: right;
  }
  .transport {
    gap: 8px;
  }
  footer {
    padding: 0 12px 10px;
  }
  .volume-control {
    margin-left: 0;
  }
  .volume-control .slider {
    width: 48px;
  }
  .volume-control output {
    display: none;
  }
  aside {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 3;
    box-shadow: -10px 0 35px #0006;
    width: min(260px, 85%);
  }
  .remove {
    opacity: 1;
  }
}
@media (max-width: 400px) {
  .identity {
    font-size: 12px;
  }
  .host-tag {
    display: none;
  }
  .queue-toggle {
    margin-left: auto;
  }
  .length {
    display: none;
  }
  .transport {
    gap: 6px;
  }
  .now-button {
    padding: 7px 5px;
    font-size: 9px;
  }
  .add-button {
    padding: 7px;
  }
  .link-field svg {
    display: none;
  }
  .link-field input {
    font-size: 10px;
  }
  .empty .eyebrow {
    font-size: 7px;
  }
}
@media (max-height: 400px) {
  .cinema-mark {
    display: none;
  }
  .empty h1 {
    font-size: 24px;
  }
  .transport {
    height: 46px;
  }
  body {
    grid-template-rows: 40px minmax(0, 1fr) auto;
  }
  .empty {
    padding: 15px;
  }
}
/* too short for the address row as well: the controls alone, so none of the page lands outside the frame */
@media (max-height: 200px) {
  body {
    grid-template-rows: 32px minmax(0, 1fr) auto;
  }
  .transport {
    height: 40px;
  }
  footer {
    padding-bottom: 6px;
  }
  #load {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
