/* 收音机（js/radio.js）：机身是画布画的，这里管摊开时的遮罩、底下那张小纸条，还有响着时任务栏上沿那条像素频谱。2026-11-19 从 desktop.css 拆出来。 */

:root {
  /* 收音机自己的色板（摊开时在桌面外面）*/
  --rd-paper: #f6eedb; /* 小纸条的纸 */
  --rd-ink: #2b2924; /* 纸条上的字 */
  --rd-edge: #2c1d11; /* 纸条的一圈深边 */
  --rd-station: #8a6238; /* 第一行：哪个台 */
  --rd-mute: #8a8272; /* 底下的小字：出处、操作提示 */
}

/* ── 收音机 ── */
/* 任务栏上沿（线国来客原来走的那条线）的像素频谱 */
#desktop .eq {
  position: absolute;
  z-index: 8500;
  left: 0;
  right: 0;
  bottom: 30px;
  width: 100%;
  height: 16px;
  image-rendering: pixelated;
  pointer-events: none;
}

#desktop.mobile .eq {
  bottom: 74px;
}

#desktop .eq[hidden] {
  display: none;
}

/* 收音机本体：像调查手册一样摊在桌面上（不是窗口），点外面收起来、但不关机 */
.radio-overlay {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgb(18 22 18 / 0);
  transition: background 0.25s;
  user-select: none;
  font-family: var(--px);
  font-size: 12px;
}

.radio-overlay.shown {
  background: rgb(18 22 18 / 0.38);
}

.radio-obj {
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.15s, translate 0.25s steps(4);
  filter: drop-shadow(6px 6px 0 rgb(0 0 0 / 0.35));
}

.radio-overlay.shown .radio-obj {
  opacity: 1;
  translate: 0 0;
}

.radio-obj canvas {
  display: block;
  image-rendering: pixelated;
  touch-action: none;
}

/* 收音机下面那张小纸条：哪个台、节目、主持人在说什么 */
.radio-caption {
  max-width: min(520px, calc(100vw / var(--uiz, 1) - 32px));
  zoom: var(--uiz, 1); /* 大屏上跟着桌面放大 */
  padding: 6px 12px 7px;
  background: var(--rd-paper);
  color: var(--rd-ink);
  box-shadow: 0 0 0 2px var(--rd-edge), 4px 4px 0 1px rgb(0 0 0 / 0.3);
  text-align: center;
  line-height: 1.6;
}

.rc-top {
  color: var(--rd-station);
}

.radio-caption small {
  display: block;
  margin-top: 2px;
  color: var(--rd-mute);
  font-size: 12px;
}

.radio-caption small[hidden] {
  display: none;
}
