:root {
  color-scheme: light;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 14px;
  color: #111;
  background: #11163a;
  --panel: #c0c0c0;
  --raised: inset 1px 1px #fff, inset -1px -1px #404040, inset 2px 2px #dfdfdf, inset -2px -2px #808080;
  --sunken: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #404040, inset -2px -2px #dfdfdf;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100svh; margin: 0; }
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(#10246d26, #100b2f33), url("./rooftop.jpg") center / cover no-repeat;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .start-button {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--raised);
  color: #111;
  cursor: pointer;
}
button:active, .start-button:active { box-shadow: var(--sunken); }
button:focus-visible, a:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: -5px;
}
a { color: inherit; text-decoration: none; }

.desktop {
  display: grid;
  min-height: 100svh;
  align-items: center;
  justify-items: center;
  padding: 24px 12px 68px;
}

.receiver {
  width: min(100%, 510px);
  padding: 4px;
  background: var(--panel);
  box-shadow: var(--raised), 3px 5px 0 #0003;
}
.title-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 3px 4px;
  color: #fff;
  background: linear-gradient(90deg, #000080, #245783);
}
.title-bar h1 {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.title-bar button {
  display: grid;
  flex: 0 0 24px;
  min-height: 21px;
  height: 21px;
  padding: 0;
  place-items: center;
}
.minimize-icon { width: 10px; height: 3px; margin-top: 8px; background: #111; }
.station-mark {
  display: inline-flex;
  flex: 0 0 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #132354;
  box-shadow: inset 1px 1px #7589ce, inset -1px -1px #000;
}
.station-mark i { width: 2px; background: #d3c9ff; }
.station-mark i:nth-child(1) { height: 6px; }
.station-mark i:nth-child(2) { height: 12px; }
.station-mark i:nth-child(3) { height: 8px; }

.menu-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 0;
}
.menu-bar a, .menu-bar button {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 8px;
  box-shadow: none;
}
.menu-bar a:hover, .menu-bar button:hover { box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; }
.menu-bar button[aria-expanded="true"] { box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }

.receiver-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}
.record { display: contents; }
.record img {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 104px;
  height: 104px;
  padding: 2px;
  background: #808080;
  box-shadow: var(--sunken);
  object-fit: cover;
}
.record-info { grid-column: 2; min-width: 0; }
.record-info p, .record-info h2 { margin: 0; overflow-wrap: anywhere; }
#artist { margin-bottom: 4px; font-weight: 700; line-height: 1.2; }
#track { font-size: 1.1rem; font-weight: 400; line-height: 1.2; }
#release { margin-top: 5px; font-size: .86rem; line-height: 1.3; color: #404040; }

.timeline {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  align-self: end;
  gap: 7px;
}
.timeline span { font-variant-numeric: tabular-nums; font-size: .93rem; }
input[type="range"] {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 26px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"]:focus-visible { outline: 1px dotted #111; outline-offset: 1px; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #b0b0b0;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}
input[type="range"]::-moz-range-track {
  height: 2px;
  background: #b0b0b0;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 22px;
  margin-top: -10px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--raised);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--raised);
}
input[type="range"]:disabled { opacity: .5; cursor: default; }

.controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.transport { display: flex; gap: 4px; }
.transport button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; }
.transport-key { width: 33px; padding: 0; }
.play { min-width: 106px; gap: 8px; }

.play-icon, .skip-icon::before {
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
}
.play[data-playing="true"] .play-icon { width: 8px; height: 10px; border: 0; border-inline: 3px solid currentColor; }
.skip-icon { display: inline-flex; align-items: center; gap: 1px; }
.skip-icon::before { content: ""; }
.skip-icon::after { content: ""; width: 2px; height: 10px; background: currentColor; }
.skip-icon--back { transform: scaleX(-1); }

.volume {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  column-gap: 6px;
  align-items: center;
}
.volume label { grid-column: 1 / -1; font-size: .86rem; }
.volume output { font-size: .86rem; text-align: right; font-variant-numeric: tabular-nums; }

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  margin: 4px 0 0;
  padding: 4px 7px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
  font-size: .86rem;
}
.signal { width: 7px; height: 7px; background: #808080; box-shadow: inset 1px 1px #404040; }
[data-state="playing"] .signal { background: #00a020; }
[data-state="loading"] .signal { background: #a87800; }
[data-state="error"] .signal { background: #b00020; }

.queue { margin-top: 5px; padding: 2px; background: #fff; box-shadow: var(--sunken); }
.queue ol { max-height: 235px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.queue button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  gap: 12px;
  padding: 7px;
  background: #fff;
  box-shadow: none;
  text-align: left;
  overflow-wrap: anywhere;
}
.queue button:hover { background: #e4e4e4; }
.queue button[aria-current="true"] { background: #000080; color: #fff; }
.queue-artist { flex-shrink: 0; max-width: 45%; font-size: .86rem; text-align: right; }
.noscript { margin: 8px; }

.taskbar {
  position: fixed;
  z-index: 5;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 5px max(4px, env(safe-area-inset-bottom));
  background: var(--panel);
  box-shadow: inset 0 1px #fff, inset 0 2px #dfdfdf;
}
.start-button { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.archive-mark {
  width: 15px;
  height: 15px;
  border: 2px solid #142b6a;
  background: repeating-linear-gradient(0deg, #7589cf 0 2px, #d4ddff 2px 4px);
  box-shadow: inset 1px 1px #fff;
}
.taskbar-divider { width: 2px; height: 24px; background: #808080; box-shadow: 1px 0 #fff; margin-inline: 3px; }
.task-button { display: flex; align-items: center; gap: 7px; width: min(180px, 35vw); text-align: left; }
.task-button[aria-expanded="true"] {
  background: repeating-conic-gradient(#c0c0c0 0% 25%, #dfdfdf 0% 50%) 0 0 / 2px 2px;
  box-shadow: var(--sunken);
  font-weight: 700;
}
#desktop-clock {
  margin-left: auto;
  padding: 6px 10px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 500px) {
  .receiver-body { grid-template-columns: 88px minmax(0, 1fr); padding: 8px; gap: 10px; }
  .record img { width: 88px; height: 88px; grid-row: 1; }
  .timeline { grid-column: 1 / -1; }
  .controls { grid-template-columns: 1fr; gap: 8px; }
  .transport .play { flex: 1; }
  .transport button { min-height: 40px; }
  .transport-key { width: 42px; }
  .volume { grid-template-columns: auto minmax(0, 1fr) 36px; gap: 10px; }
  .volume label { grid-column: auto; }
  .volume input { height: 32px; }
  .title-bar button { min-height: 27px; flex-basis: 28px; }
  .menu-bar a, .menu-bar button { min-height: 32px; }
}

