:root {
  --ink: #071d21;
  --carbon: #0d3339;
  --panel: #12484f;
  --panel-light: #27666c;
  --cream: #fff1cf;
  --teal: #053e45;
  --lcd: #ffe6a3;
  --lcd-deep: #0c514a;
  --orange: #e95627;
  --amber: #f6b344;
  --metal: #d8c99e;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--teal);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(233, 86, 39, 0.14), transparent 24rem),
    radial-gradient(circle at 12% 18%, rgba(5, 62, 69, 0.12), transparent 22rem),
    linear-gradient(135deg, #fff7df 0%, #fff1cf 48%, #f3dfb7 100%);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 34px;
}

.brand-footer {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.brand-footer__logo {
  width: min(620px, 100%);
  height: auto;
  display: block;
  margin: 0 auto;
}

.stereo {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid #031315;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 241, 207, 0.16), transparent 13%),
    linear-gradient(145deg, #1d6268 0%, #08272d 42%, #0d4147 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 207, 0.28),
    inset 0 -12px 30px rgba(0, 0, 0, 0.58),
    0 28px 52px var(--shadow);
}

.stereo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: repeating-linear-gradient(90deg, transparent 0 7px, var(--cream) 8px 9px);
}

.stereo__topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: #f8dfaa;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.faceplate {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 108px;
  gap: clamp(12px, 2vw, 22px);
  align-items: stretch;
}

.left-stack,
.right-stack {
  display: grid;
  gap: 10px;
}

.mini-key,
.preset-bank button {
  min-height: 46px;
  border: 1px solid #031315;
  border-radius: 6px;
  color: var(--cream);
  background:
    linear-gradient(180deg, #2d7579 0%, #12484f 52%, #08262b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 207, 0.24),
    0 4px 0 #031315;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mini-key:active,
.preset-bank button:active,
.play-button:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 0 #060707;
}

.mini-key--hot {
  color: var(--cream);
  background: linear-gradient(180deg, #ff7b4a, #e95627 48%, #9e2b17);
}

.mini-key--amber {
  color: #1d1307;
  background: linear-gradient(180deg, #ffe7a3, #f6b344 52%, #ce7618);
}

.lcd-panel {
  min-height: 278px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(92px, 1fr) auto auto;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
  border: 8px solid #031315;
  border-radius: 7px;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(255, 241, 207, 0.12), transparent 16%),
    radial-gradient(circle at 50% 12%, rgba(246, 179, 68, 0.16), transparent 22rem),
    linear-gradient(135deg, #0b3f3d, #041b1f 68%);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 241, 207, 0.22);
}

.lcd-panel__scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 230, 163, 0.75) 8px 9px);
}

.display-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #f8d98f;
  font-family: "Courier New", monospace;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: #172014;
  background: var(--lcd);
  box-shadow: 0 0 18px rgba(246, 179, 68, 0.35);
}

.lcd-panel h1 {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 18px auto;
  padding: 0 6px;
  color: var(--lcd);
  text-transform: uppercase;
  font-family: "Arial Black", Impact, Arial, sans-serif;
  font-size: clamp(1.65rem, 4.1vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(246, 179, 68, 0.4);
  text-align: center;
}

.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin: 0;
  border-top: 1px solid rgba(255, 230, 163, 0.36);
  border-bottom: 1px solid rgba(255, 230, 163, 0.36);
  color: #fff1cf;
  font-family: "Courier New", monospace;
  font-weight: 900;
  white-space: nowrap;
  text-align: center;
}

.ticker span {
  display: inline-block;
  padding: 10px 0;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

.equalizer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: end;
  gap: 6px;
  height: 58px;
  margin-top: 22px;
}

.equalizer i {
  display: block;
  min-height: 12px;
  background: linear-gradient(180deg, var(--orange), var(--amber), var(--cream));
  box-shadow: 0 0 10px rgba(246, 179, 68, 0.28);
  animation: bars 1.2s ease-in-out infinite alternate;
}

.equalizer i:nth-child(2n) {
  animation-duration: 0.8s;
}

.equalizer i:nth-child(3n) {
  animation-duration: 1.5s;
}

@keyframes bars {
  from {
    height: 18%;
  }
  to {
    height: 100%;
  }
}

.deck {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  margin-top: 26px;
}

.knob {
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 16px;
  background:
    radial-gradient(circle, #f6b344 0 8%, #071d21 9% 16%, #2d7579 17% 29%, #071d21 30% 42%, #12484f 43% 100%);
  border: 1px solid #031315;
  box-shadow:
    inset 0 3px 12px rgba(255, 241, 207, 0.16),
    inset 0 -12px 20px rgba(0, 0, 0, 0.55),
    0 10px 18px rgba(0, 0, 0, 0.4);
}

.knob span {
  display: block;
  width: 8px;
  height: 34%;
  margin: 0 auto;
  border-radius: 10px;
  background: var(--orange);
}

.knob--right span {
  background: var(--lcd);
}

.transport {
  display: grid;
  gap: 14px;
}

.play-button {
  min-height: 86px;
  border: 1px solid #5b1a0e;
  border-radius: 7px;
  color: #fff1cf;
  background:
    linear-gradient(180deg, #ff8a54, #e95627 48%, #9e2b17 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 241, 207, 0.38),
    0 7px 0 #5b1a0e,
    0 18px 28px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: "Arial Black", Impact, Arial, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  letter-spacing: 0.03em;
}

.play-button__icon {
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid var(--cream);
}

.play-button.is-playing {
  color: #fff1cf;
  background: linear-gradient(180deg, #2d7579, #0d514f);
  box-shadow:
    inset 0 2px 0 rgba(255, 241, 207, 0.26),
    0 7px 0 #031315,
    0 0 24px rgba(246, 179, 68, 0.28);
}

.play-button.is-playing .play-button__icon {
  width: 24px;
  height: 32px;
  border: 0;
  background:
    linear-gradient(90deg, var(--cream) 0 36%, transparent 37% 62%, var(--cream) 63% 100%);
}

.preset-bank {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.preset-bank button {
  min-width: 0;
}

.stereo-footer {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  color: #f6ead0;
  text-align: center;
}

.stereo-footer div {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.stereo-footer strong {
  color: var(--amber);
  letter-spacing: 0.12em;
}

.chat-frame a {
  color: var(--cream);
  text-decoration: none;
  border: 1px solid rgba(255, 241, 207, 0.48);
  padding: 10px 14px;
  background: rgba(5, 62, 69, 0.68);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  white-space: nowrap;
}

.chat-band {
  margin-top: 24px;
}

.chat-panel {
  border: 1px solid #031315;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 241, 207, 0.12), transparent 24%),
    linear-gradient(145deg, #1d6268 0%, #08272d 46%, #0d4147 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 207, 0.22),
    0 22px 42px rgba(0, 0, 0, 0.3);
}

.chat-panel summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 70px;
  padding: 18px;
  color: #fff1cf;
  background: linear-gradient(180deg, #ff8a54, #e95627 48%, #9e2b17 100%);
  box-shadow: inset 0 2px 0 rgba(255, 241, 207, 0.36);
  cursor: pointer;
  list-style: none;
  text-align: center;
  font-family: "Arial Black", Impact, Arial, sans-serif;
  font-size: clamp(1.25rem, 3vw, 2.1rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

.chat-panel summary::-webkit-details-marker {
  display: none;
}

.chat-panel summary i {
  width: 16px;
  height: 16px;
  border-right: 4px solid var(--cream);
  border-bottom: 4px solid var(--cream);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 180ms ease;
}

.chat-panel[open] summary i {
  transform: rotate(225deg) translateY(-3px);
}

.chat-frame {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: clamp(14px, 3vw, 24px);
  text-align: center;
}

.chat-frame iframe {
  width: 100%;
  min-height: min(72vh, 680px);
  border: 7px solid #031315;
  border-radius: 7px;
  background: #071d21;
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 241, 207, 0.22);
}

.chat-frame p {
  max-width: 66ch;
  margin: 0;
  color: #f6ead0;
  line-height: 1.5;
  font-weight: 700;
}

.poster-band {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 4px 0 2px;
  color: var(--teal);
}

.poster-copy {
  max-width: 620px;
  text-align: center;
}

.poster-copy p {
  max-width: 54ch;
  margin: 0 auto;
  color: var(--teal);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.45;
  font-weight: 700;
}

.poster-logo {
  width: min(320px, 76vw);
  justify-self: center;
  display: block;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.32));
}

@media (max-width: 820px) {
  .faceplate,
  .deck,
  .stereo-footer,
  .poster-band {
    grid-template-columns: 1fr;
  }

  .left-stack,
  .right-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .deck {
    gap: 18px;
  }

  .knob {
    width: min(126px, 42vw);
    justify-self: center;
  }

  .chat-frame iframe {
    min-height: 620px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 10px;
  }

  .stereo {
    padding: 14px;
  }

  .lcd-panel {
    border-width: 5px;
    min-height: 230px;
    grid-template-rows: auto minmax(72px, 1fr) auto auto;
  }

  .lcd-panel h1 {
    margin: 14px auto;
    padding: 0;
    font-size: clamp(1.25rem, 6.6vw, 1.95rem);
    line-height: 1.05;
  }

  .preset-bank {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .display-row {
    font-size: 0.78rem;
  }

  .ticker {
    white-space: normal;
  }

  .ticker span {
    animation: none;
    padding: 10px 0;
  }

  .chat-panel summary {
    min-height: 62px;
    padding: 14px;
  }

  .chat-frame iframe {
    min-height: 560px;
    border-width: 5px;
  }

  .left-stack,
  .right-stack {
    gap: 7px;
  }

  .mini-key,
  .preset-bank button {
    min-height: 42px;
    font-size: 0.78rem;
  }
}

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