:root {
  color-scheme: dark;
  --ink: #090013;
  --panel: rgba(17, 5, 40, 0.94);
  --panel-soft: rgba(36, 11, 66, 0.88);
  --white: #fffef7;
  --pink: #ff0aa5;
  --hot-pink: #ff3ccd;
  --yellow: #fff51a;
  --green: #53ff7b;
  --cyan: #49e5ff;
  --purple: #8d43ff;
  --muted: #d2c9de;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --body: "Inter", system-ui, sans-serif;
  font-family: var(--body);
  color: var(--white);
  background: var(--ink);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #090013;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(73, 229, 255, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 12%, rgba(255, 245, 26, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 70%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 80%, rgba(83, 255, 123, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 10% 10%, #35105f 0, transparent 34%),
    radial-gradient(circle at 90% 25%, rgba(255, 10, 165, 0.27) 0, transparent 32%),
    linear-gradient(145deg, #080012 0%, #180033 48%, #070015 100%);
  background-size: 83px 83px, 127px 127px, 151px 151px, 109px 109px, auto, auto, auto;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: -25vmax;
  background: repeating-conic-gradient(
    from 12deg at 52% 36%,
    rgba(255, 10, 165, 0.09) 0 6deg,
    transparent 6deg 13deg,
    rgba(73, 229, 255, 0.06) 13deg 18deg,
    transparent 18deg 27deg
  );
  content: "";
  pointer-events: none;
  animation: cosmic-spin 70s linear infinite;
}

body::after {
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 50%, transparent 50%);
  background-size: 100% 4px;
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 900;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.cosmic-decor {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.skip-warning {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}

.skip-warning.is-visible {
  animation: skip-warning-cycle 5.2s linear both;
}

.skip-warning::before {
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(255, 245, 26, 0.92) 0 8deg,
      rgba(255, 10, 165, 0.95) 8deg 16deg,
      rgba(9, 0, 19, 0.95) 16deg 24deg
    );
  content: "";
  animation: skip-burst-spin 5s linear infinite;
}

.skip-warning-burst {
  position: absolute;
  width: min(100vmax, 1500px);
  aspect-ratio: 1;
  border: 24px dashed #000;
  border-radius: 50%;
  box-shadow: 0 0 0 24px var(--yellow), 0 0 90px 40px var(--pink);
  animation: skip-burst-pulse 500ms steps(2, end) infinite alternate;
}

.skip-warning-content {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 36px));
  padding: clamp(30px, 7vw, 75px) clamp(18px, 5vw, 55px);
  border: clamp(5px, 1vw, 12px) solid #000;
  color: var(--ink);
  background: var(--yellow);
  box-shadow:
    clamp(10px, 2vw, 22px) clamp(10px, 2vw, 22px) 0 #000,
    0 0 0 clamp(7px, 1.2vw, 14px) var(--pink);
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.skip-warning-content p {
  margin-bottom: clamp(18px, 4vw, 32px);
  font-family: var(--pixel);
  font-size: clamp(0.62rem, 2vw, 1rem);
  line-height: 1.6;
}

.skip-warning-content strong {
  display: block;
  color: var(--pink);
  font-family: var(--pixel);
  font-size: clamp(2.3rem, 10vw, 7.2rem);
  line-height: 1.15;
  -webkit-text-stroke: clamp(2px, 0.45vw, 6px) #000;
  paint-order: stroke fill;
  text-shadow:
    7px 7px 0 #000,
    13px 13px 0 var(--cyan);
}

.skip-warning-content span {
  display: block;
  max-width: 720px;
  margin: clamp(22px, 5vw, 40px) auto 0;
  font-size: clamp(1rem, 3vw, 1.55rem);
  font-weight: 900;
  line-height: 1.35;
}

.pixel-star,
.music-note {
  position: absolute;
  font-family: var(--pixel);
  font-weight: 900;
  line-height: 1;
  text-shadow: 5px 5px 0 #000;
}

.pixel-star {
  animation: star-pop 2.2s steps(2, end) infinite alternate;
}

.music-note {
  animation: note-float 4.5s ease-in-out infinite;
}

.star-one {
  top: 15%;
  left: 5%;
  color: var(--yellow);
  font-size: clamp(2rem, 5vw, 5rem);
  transform: rotate(8deg);
}

.star-two {
  top: 42%;
  right: 3%;
  color: var(--green);
  font-size: clamp(1.7rem, 4vw, 3.5rem);
  animation-delay: -800ms;
}

.star-three {
  bottom: 8%;
  left: 3%;
  color: var(--cyan);
  font-size: clamp(1.5rem, 3vw, 3rem);
  transform: rotate(17deg);
  animation-delay: -1.4s;
}

.note-one {
  top: 19%;
  right: 6%;
  color: var(--pink);
  font-size: clamp(2rem, 5vw, 4.5rem);
  transform: rotate(14deg);
}

.note-two {
  bottom: 12%;
  right: 7%;
  color: var(--yellow);
  font-size: clamp(2rem, 4vw, 4rem);
  transform: rotate(-12deg);
  animation-delay: -2.2s;
}

.topbar,
.page-shell,
.settings-shell,
.site-footer {
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  width: min(1180px, calc(100% - 36px));
  min-height: 92px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.mini-brand > span {
  display: grid;
  width: 48px;
  height: 48px;
  border: 3px solid #000;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--pink);
  place-items: center;
  font-family: var(--pixel);
  font-size: 0.86rem;
}

.mini-brand strong {
  font-family: var(--pixel);
  font-size: 0.72rem;
  line-height: 1.5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.connection-chip {
  display: flex;
  min-height: 42px;
  padding: 9px 13px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  align-items: center;
  gap: 9px;
  color: var(--white);
  background: rgba(9, 0, 19, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-dot {
  width: 11px;
  height: 11px;
  background: var(--yellow);
  box-shadow: 0 0 12px var(--yellow);
}

.status-dot.connected {
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
  animation: status-pulse 1.5s steps(2, end) infinite;
}

.status-dot.disconnected {
  background: var(--pink);
  box-shadow: 0 0 12px var(--pink);
}

.pixel-button {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 18px;
  border: 3px solid #000;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #090013;
  background: var(--yellow);
  box-shadow: 6px 6px 0 #000, 8px 8px 0 var(--pink);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.pixel-button:hover,
.pixel-button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #000, 10px 10px 0 var(--pink);
}

.pixel-button:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 #000, 4px 4px 0 var(--pink);
}

.pixel-button-small {
  min-height: 42px;
  padding: 9px 13px;
  font-size: 0.78rem;
}

.page-shell {
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 52px;
}

.chaos-hero {
  position: relative;
  display: grid;
  min-height: 295px;
  padding: 28px 20px 38px;
  place-items: center;
  text-align: center;
}

.chaos-hero::before {
  position: absolute;
  z-index: -1;
  width: min(760px, 95vw);
  height: min(320px, 48vw);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 10, 165, 0.43), transparent 66%);
  filter: blur(3px);
  content: "";
}

.hero-kicker,
.panel-label {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chaos-hero .hero-kicker {
  margin-bottom: -2px;
  font-family: var(--pixel);
  font-size: clamp(0.6rem, 1.3vw, 0.8rem);
}

.chaos-logo {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(2.55rem, 8.7vw, 6.5rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  animation: logo-hover 3.5s ease-in-out infinite;
}

.chaos-logo span {
  display: block;
  -webkit-text-stroke: clamp(2px, 0.35vw, 5px) #000;
  paint-order: stroke fill;
  text-shadow:
    5px 5px 0 #000,
    9px 9px 0 #000,
    13px 13px 0 rgba(0, 0, 0, 0.65);
}

.chaos-logo span:first-child {
  color: var(--pink);
  animation: logo-flash 2.8s steps(2, end) infinite;
}

.chaos-logo span:last-child {
  color: var(--yellow);
}

.live-ribbon {
  display: inline-flex;
  margin-top: 20px;
  padding: 10px 14px;
  border: 3px solid #000;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  background: var(--green);
  box-shadow: 6px 6px 0 #000;
  font-family: var(--pixel);
  font-size: clamp(0.58rem, 1.3vw, 0.75rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(1.5deg);
  animation: ribbon-bounce 1.8s steps(3, end) infinite;
}

.live-pip {
  width: 9px;
  height: 9px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.arcade-panel,
.missing-panel,
.url-card {
  border: 4px solid #000;
  background: var(--panel);
  box-shadow: 9px 9px 0 #000;
}

.missing-panel {
  display: grid;
  margin: 15px 0 46px;
  padding: clamp(22px, 5vw, 42px);
  border-color: var(--yellow);
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(18px, 4vw, 34px);
  box-shadow: 9px 9px 0 #000, 0 0 38px rgba(255, 245, 26, 0.18);
}

.missing-icon {
  display: grid;
  width: 78px;
  height: 78px;
  border: 4px solid #000;
  color: var(--ink);
  background: var(--pink);
  box-shadow: 5px 5px 0 var(--yellow);
  place-items: center;
  font-family: var(--pixel);
  font-size: 2rem;
}

.missing-panel h2 {
  margin-bottom: 8px;
  font-family: var(--pixel);
  font-size: clamp(1rem, 2.7vw, 1.55rem);
  line-height: 1.55;
}

.missing-panel p:last-child {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.no-session .chaos-hero {
  min-height: 270px;
}

.no-session .live-content {
  display: none;
}

.live-content {
  display: grid;
  gap: 32px;
}

.now-playing {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 5vw, 44px);
  border-color: var(--pink);
  background:
    linear-gradient(115deg, rgba(255, 10, 165, 0.18), transparent 48%),
    var(--panel);
  box-shadow: 10px 10px 0 #000, 0 0 40px rgba(255, 10, 165, 0.2);
  animation: panel-glow 4s ease-in-out infinite alternate;
}

.now-playing::after {
  position: absolute;
  top: -55px;
  right: -55px;
  width: 180px;
  height: 180px;
  border: 20px solid rgba(255, 245, 26, 0.07);
  content: "";
  transform: rotate(20deg);
}

.panel-topline,
.section-heading,
.now-playing-content,
.queue-item {
  display: flex;
  align-items: center;
}

.panel-topline,
.section-heading {
  justify-content: space-between;
  gap: 18px;
}

.panel-topline .panel-label {
  margin: 0;
  color: var(--yellow);
}

.equalizer {
  display: flex;
  height: 28px;
  align-items: end;
  gap: 4px;
}

.equalizer i {
  display: block;
  width: 6px;
  background: var(--green);
  box-shadow: 2px 0 0 #000;
  animation: equalize 800ms steps(3, end) infinite alternate;
}

.equalizer i:nth-child(1) { height: 40%; }
.equalizer i:nth-child(2) { height: 90%; animation-delay: -400ms; }
.equalizer i:nth-child(3) { height: 65%; animation-delay: -200ms; }
.equalizer i:nth-child(4) { height: 100%; animation-delay: -600ms; }

.now-playing-content {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  gap: clamp(18px, 4vw, 34px);
}

.now-playing-copy {
  min-width: 0;
  flex: 1;
}

.album-pixel {
  display: grid;
  width: clamp(82px, 12vw, 122px);
  height: clamp(82px, 12vw, 122px);
  flex: 0 0 auto;
  border: 5px solid #000;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 44%, rgba(0, 0, 0, 0.18) 45% 55%, transparent 56%),
    var(--yellow);
  box-shadow: 7px 7px 0 var(--cyan);
  place-items: center;
  font-family: var(--pixel);
  font-size: clamp(2rem, 5vw, 4rem);
  transform: rotate(-3deg);
  animation: album-wobble 2.2s steps(4, end) infinite;
}

.now-playing h2 {
  margin-bottom: 12px;
  font-size: clamp(1.7rem, 5vw, 3.7rem);
  font-weight: 900;
  line-height: 1.04;
  text-wrap: balance;
}

.now-playing-content p {
  margin-bottom: 0;
  color: var(--cyan);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 800;
  line-height: 1.45;
}

.song-timer {
  display: grid;
  width: clamp(150px, 20vw, 210px);
  flex: 0 0 auto;
  padding: 15px 16px 17px;
  border: 4px solid #000;
  color: var(--ink);
  background: var(--green);
  box-shadow: 6px 6px 0 #000, 9px 9px 0 var(--pink);
  gap: 7px;
  text-align: center;
  transform: rotate(1.5deg);
}

.song-timer > span:first-child {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.song-timer > strong {
  font-family: var(--pixel);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.timer-track {
  display: block;
  height: 10px;
  border: 2px solid #000;
  background: rgba(9, 0, 19, 0.3);
}

.timer-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--pink);
  transition: width 400ms linear;
}

.song-timer.ending {
  color: var(--white);
  background: var(--pink);
  animation: timer-ending 700ms steps(2, end) infinite alternate;
}

.song-timer.ending .timer-track i {
  background: var(--yellow);
}

.queue-section {
  padding: clamp(22px, 4.5vw, 40px);
  border-color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(73, 229, 255, 0.09), transparent 42%),
    var(--panel);
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: var(--pixel);
  font-size: clamp(1.25rem, 3.4vw, 2rem);
  line-height: 1.35;
  text-transform: uppercase;
}

.section-heading .panel-label {
  margin-bottom: 9px;
}

.count-badge {
  padding: 10px 12px;
  border: 3px solid #000;
  color: var(--ink);
  background: var(--green);
  box-shadow: 4px 4px 0 #000;
  font-size: 0.83rem;
  font-weight: 900;
  white-space: nowrap;
}

.queue-list {
  display: grid;
  margin: 26px 0 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.queue-item {
  min-height: 82px;
  padding: 13px 17px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  gap: 17px;
  background: rgba(7, 0, 18, 0.72);
  transition: border-color 150ms ease, transform 150ms ease;
  animation: queue-enter 320ms ease-out both;
}

.queue-item:nth-child(2) { animation-delay: 45ms; }
.queue-item:nth-child(3) { animation-delay: 90ms; }
.queue-item:nth-child(4) { animation-delay: 135ms; }
.queue-item:nth-child(n + 5) { animation-delay: 180ms; }

.queue-item.is-up-next {
  min-height: 126px;
  border: 4px solid var(--yellow);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 245, 26, 0.16) 0 12px,
      transparent 12px 24px
    ),
    rgba(7, 0, 18, 0.82);
  box-shadow:
    7px 7px 0 #000,
    0 0 24px rgba(255, 245, 26, 0.26);
  animation:
    queue-enter 320ms ease-out both,
    up-next-glow 1.35s steps(2, end) 350ms infinite alternate;
}

.queue-item:hover {
  border-color: var(--pink);
  transform: translateX(3px);
}

.queue-position {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 3px solid #000;
  color: var(--ink);
  background: var(--pink);
  box-shadow: 4px 4px 0 #000;
  place-items: center;
  font-family: var(--pixel);
  font-size: 0.8rem;
}

.queue-item:nth-child(even) .queue-position {
  background: var(--yellow);
}

.queue-item.is-up-next .queue-position {
  width: 58px;
  height: 58px;
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--pink);
  font-size: 1rem;
  animation: position-bounce 1.2s steps(3, end) infinite;
}

.queue-details {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.queue-callout {
  display: none;
}

.is-up-next .queue-callout {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 7px;
  padding: 8px 11px;
  border: 3px solid #000;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  background: var(--green);
  box-shadow: 4px 4px 0 #000, 6px 6px 0 var(--pink);
  font-size: clamp(0.77rem, 2vw, 0.95rem);
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.25;
  text-transform: uppercase;
  transform: rotate(-0.6deg);
}

.is-up-next .queue-callout > span {
  flex: 0 0 auto;
  color: var(--pink);
  font-family: var(--pixel);
  font-size: 0.7em;
  animation: callout-arrow 650ms steps(2, end) infinite alternate;
}

.queue-callout-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item.is-up-next .queue-title {
  color: var(--yellow);
  font-size: clamp(1.12rem, 2.8vw, 1.42rem);
}

.queue-title,
.queue-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 900;
}

.queue-meta,
.queue-duration {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.queue-duration {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: flex;
  min-height: 110px;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.empty-state span {
  color: var(--yellow);
  font-size: 1.5rem;
}

.last-update {
  margin: -14px 4px 0;
  color: #b9aeca;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: right;
  text-transform: uppercase;
}

.site-footer {
  padding: 0 20px 30px;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--pixel);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.site-footer span {
  margin: 0 9px;
  color: var(--pink);
}

.settings-shell {
  width: min(880px, calc(100% - 36px));
  margin: 0 auto;
  padding: 45px 0 80px;
}

.settings-heading {
  max-width: 720px;
  margin-bottom: 38px;
}

.settings-heading h1 {
  margin-bottom: 22px;
  color: var(--yellow);
  font-family: var(--pixel);
  font-size: clamp(1.75rem, 5vw, 3.2rem);
  line-height: 1.35;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--pink), 10px 10px 0 #000;
  text-transform: uppercase;
}

.settings-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.settings-card,
.url-card {
  position: relative;
  display: grid;
  padding: clamp(24px, 5vw, 42px);
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 34px);
}

.settings-card {
  border-color: var(--pink);
}

.settings-card-content {
  min-width: 0;
}

.step-number {
  display: grid;
  width: 62px;
  height: 62px;
  border: 4px solid #000;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--pink);
  place-items: center;
  font-family: var(--pixel);
  font-size: 1.25rem;
}

.step-number-alt {
  background: var(--green);
  box-shadow: 5px 5px 0 var(--cyan);
}

.settings-card h2,
.url-card h2 {
  margin-bottom: 12px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1.2;
}

.settings-card-content > p:not(.panel-label),
.url-card p:not(.panel-label, .url-example) {
  color: var(--muted);
  line-height: 1.65;
}

.settings-card form {
  margin-top: 28px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-form-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 3px solid var(--cyan);
  border-radius: 0;
  outline: 0;
  color: var(--white);
  background: #070010;
  box-shadow: inset 0 0 0 2px #000;
}

#remote-code {
  max-width: 270px;
  font-family: var(--pixel);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.12em;
}

input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 245, 26, 0.22);
}

input[aria-invalid="true"] {
  border-color: var(--pink);
}

.form-help,
.form-message {
  margin: 13px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.form-help {
  color: #b9aeca;
}

.form-message {
  min-height: 1.5em;
  color: var(--hot-pink);
  font-weight: 800;
}

.url-card {
  margin-top: 32px;
  border-color: var(--green);
  background: var(--panel-soft);
}

.url-card code {
  padding: 2px 5px;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--pixel);
  font-size: 0.7em;
}

.url-example {
  margin: 22px 0 0;
  padding: 15px 18px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  overflow-wrap: anywhere;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  font-family: ui-monospace, monospace;
  line-height: 1.5;
}

.url-example strong {
  color: var(--green);
}

@keyframes status-pulse {
  50% { opacity: 0.45; }
}

@keyframes equalize {
  100% { height: 25%; }
}

@keyframes cosmic-spin {
  to { transform: rotate(360deg); }
}

@keyframes star-pop {
  0% { opacity: 0.45; scale: 0.82; }
  100% { opacity: 1; scale: 1.08; }
}

@keyframes note-float {
  0%,
  100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

@keyframes logo-hover {
  0%,
  100% { translate: 0 0; rotate: -2deg; }
  50% { translate: 0 -7px; rotate: -1deg; }
}

@keyframes logo-flash {
  50% { color: var(--hot-pink); }
}

@keyframes ribbon-bounce {
  0%,
  100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes panel-glow {
  to {
    box-shadow:
      10px 10px 0 #000,
      0 0 55px rgba(255, 10, 165, 0.36);
  }
}

@keyframes album-wobble {
  0%,
  100% { rotate: -3deg; }
  50% { rotate: 3deg; }
}

@keyframes queue-enter {
  from {
    opacity: 0;
    translate: -18px 0;
  }
}

@keyframes up-next-glow {
  to {
    border-color: var(--green);
    box-shadow:
      7px 7px 0 #000,
      0 0 36px rgba(83, 255, 123, 0.42);
  }
}

@keyframes position-bounce {
  50% { translate: 0 -4px; }
}

@keyframes callout-arrow {
  to { translate: 5px 0; }
}

@keyframes skip-warning-cycle {
  0%,
  100% { opacity: 0; }
  7%,
  20%,
  34%,
  47%,
  61%,
  94% { opacity: 1; }
  27%,
  54% { opacity: 0.1; }
}

@keyframes skip-burst-spin {
  to { rotate: 360deg; }
}

@keyframes skip-burst-pulse {
  to { scale: 1.13; }
}

@keyframes timer-ending {
  to {
    translate: 0 -4px;
    box-shadow: 6px 10px 0 #000, 9px 13px 0 var(--yellow);
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 82px;
  }

  .mini-brand strong,
  .connection-chip {
    display: none;
  }

  .chaos-hero {
    min-height: 250px;
    padding-inline: 0;
  }

  .missing-panel {
    grid-template-columns: auto 1fr;
  }

  .missing-panel .pixel-button {
    grid-column: 1 / -1;
  }

  .settings-card,
  .url-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar,
  .page-shell,
  .settings-shell {
    width: min(100% - 24px, 1040px);
  }

  .topbar {
    gap: 10px;
  }

  .pixel-button-small {
    padding-inline: 10px;
  }

  .chaos-logo {
    font-size: clamp(2.25rem, 13.7vw, 4rem);
  }

  .chaos-logo span {
    text-shadow: 4px 4px 0 #000, 7px 7px 0 #000, 10px 10px 0 rgba(0, 0, 0, 0.65);
  }

  .missing-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .missing-icon {
    margin: 0 auto;
  }

  .now-playing-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .album-pixel {
    width: 72px;
    height: 72px;
    font-size: 2rem;
  }

  .song-timer {
    width: min(100%, 260px);
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }

  .song-timer > strong {
    text-align: right;
  }

  .timer-track {
    grid-column: 1 / -1;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .queue-item {
    min-height: 74px;
    padding: 11px;
    gap: 12px;
  }

  .queue-item.is-up-next {
    min-height: 132px;
    align-items: flex-start;
  }

  .queue-position {
    width: 42px;
    height: 42px;
  }

  .queue-item.is-up-next .queue-position {
    width: 46px;
    height: 46px;
    font-size: 0.82rem;
  }

  .queue-callout-text {
    white-space: normal;
  }

  .queue-duration {
    display: none;
  }

  .code-form-row {
    flex-direction: column;
  }

  #remote-code {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .skip-warning.is-visible {
    opacity: 1;
    animation: none !important;
  }
}
