*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background: #10292d;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 4px);
  color: #f4e8cf;
  font-family: "Helvetica Neue", Arial, system-ui, sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #ffd27a; outline-offset: 3px; }
.call, .on-air, .now, .remote-title, .key, .surf, .vm-label { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; }

.station {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.4rem;
  border-bottom: 2px solid #1f4a50;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
}
.call { color: #f4e8cf; font-weight: 700; text-transform: none; letter-spacing: .06em; }
.on-air { display: inline-flex; align-items: center; gap: .5rem; color: #ff8e78; }
.on-air.off { color: #7fa3a6; }
.lamp { width: 9px; height: 9px; background: #ff6f59; box-shadow: 0 0 8px #ff6f59; }

.studio {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 270px;
  gap: 2rem; align-items: center;
  padding: 2rem 1.5rem 3rem;
}
.no-signal .studio { grid-template-columns: minmax(0, 420px); justify-content: center; min-height: 70vh; }

.set { min-width: 0; }
.tv { position: relative; width: min(620px, 100%); margin: 0 auto; }
.tv img { display: block; width: 100%; height: auto; user-select: none; }
.scanlines {
  position: absolute; left: 14.8%; top: 29.8%; width: 57.9%; height: 46.9%;
  border-radius: 7%;
  background: repeating-linear-gradient(0deg, rgba(10, 30, 32, .16) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.tv.tuning .scanlines { animation: static-burst .32s steps(4) 1; }
@keyframes static-burst {
  0% { background-color: rgba(244, 232, 207, .9); }
  50% { background-color: rgba(120, 150, 150, .6); }
  100% { background-color: transparent; }
}
.now {
  margin: .6rem auto 0; width: min(620px, 100%);
  text-align: center; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: #f4e8cf; min-height: 1.5em;
}
.now-label { color: #ff8e78; }

.remote {
  background: #163a3f; border: 2px solid #23545a;
  padding: 1.4rem 1.2rem;
}
.remote-title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #ffb39f; }
.remote-sub { margin: .4rem 0 1.2rem; font-size: .9rem; color: #c9d8d2; }
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: .8rem; }
.key {
  aspect-ratio: 1 / 1; min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  background: #0f2a2e; border: 2px solid #2d6168; border-radius: 4px;
  color: #f4e8cf; text-transform: uppercase; letter-spacing: .1em;
  transition: background-color .15s ease;
}
.key-num { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.key-name { font-size: .68rem; color: #9fbcb9; }
.key:hover { background: #1c4449; }
.key[aria-pressed="true"] { background: #ff7d66; border-color: #ff7d66; color: #10292d; }
.key[aria-pressed="true"] .key-name { color: #10292d; }
.surf {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: #f4e8cf; color: #10292d; border: 0; border-radius: 4px;
  padding: .8rem; min-height: 46px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.surf:hover { background: #ffffff; }

.viewer-mail {
  font-style: normal; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px dashed #2d6168;
  display: flex; flex-direction: column; gap: .2rem; font-size: .85rem;
}
.vm-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: #7fa3a6; }
.viewer-mail a { align-self: flex-start; min-height: 26px; padding: .15rem 0; color: #f4e8cf; text-underline-offset: 3px; text-decoration-color: #ff8e78; overflow-wrap: anywhere; }
.viewer-mail a:hover { color: #ffb39f; }

@media (max-width: 820px) {
  .studio { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1rem 1rem 2.5rem; }
  .keys { grid-template-columns: repeat(4, 1fr); }
  .key { aspect-ratio: auto; height: 64px; }
}
@media (max-width: 360px) {
  .station { padding: .6rem .9rem; letter-spacing: .08em; }
  .key-name { font-size: .6rem; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
