:root {
  color-scheme: dark;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.78);
  --dim: rgba(255, 255, 255, 0.58);
  --panel: rgba(12, 15, 17, 0.82);
  --panel-line: rgba(255, 255, 255, 0.17);
  --accent: #f29221;
  --ticker-height: 6.6vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  height: 100vh;
}

body {
  margin: 0;
  overflow: hidden;
  background: #050607;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

button {
  font: inherit;
}

a {
  color: #fff;
  text-underline-offset: 0.2em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.broadcast {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0b1119;
  isolation: isolate;
}

.video-bg,
.video-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-bg {
  z-index: -3;
  object-fit: cover;
  background: #0b1119;
}

.video-shade {
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 30%, rgba(0, 0, 0, 0.28)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 34%, rgba(0, 0, 0, 0.34));
}

.brand {
  position: absolute;
  top: 1.6vh;
  left: 1.4vw;
  z-index: 2;
  width: min(15vw, 24vh);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 18vh;
  object-fit: contain;
  filter: drop-shadow(0 0.3vh 0.8vh rgba(0, 0, 0, 0.46));
}

.info-panel {
  position: absolute;
  top: 1.35vh;
  right: 1.05vw;
  z-index: 2;
  width: min(24vw, 46vh);
  max-height: calc(100vh - var(--ticker-height) - 2.7vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 0.08vw solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(0.35vw);
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 0 0 auto;
  border-bottom: 1px solid var(--panel-line);
}

.tab-button {
  min-width: 0;
  padding: 1.05vh 0.35vw;
  border: 0;
  border-bottom: 0.25vh solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: min(0.94vw, 1.65vh);
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.tab-button:hover,
.tab-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.tab-button.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.tab-panel {
  min-height: 0;
  padding: 1.35vh 1.25vw 1.5vh;
  overflow: auto;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  scrollbar-width: thin;
}

.tab-panel[hidden] {
  display: none;
}

.current-panel {
  display: grid;
  align-content: start;
  gap: 1.35vh;
}

.date-value {
  display: block;
  color: var(--muted);
  font-size: min(1.08vw, 1.95vh);
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.time-value {
  margin-top: -0.55vh;
  font-size: min(3.05vw, 5.3vh);
  line-height: 0.95;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sensor-block,
.radio-block {
  display: grid;
  min-width: 0;
}

.sensor-block {
  gap: 0.65vh;
}

.radio-block {
  gap: 0.85vh;
}

.panel-label,
.track-label {
  color: var(--muted);
  font-size: min(1.02vw, 1.8vh);
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
}

.sensor-row {
  display: flex;
  align-items: baseline;
  gap: 0.55vw;
  min-width: 0;
  font-size: min(1.58vw, 2.75vh);
  line-height: 1.1;
  white-space: nowrap;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.divider,
.pressure-value,
.weather-status {
  color: var(--dim);
}

.pressure-value,
.weather-status {
  min-height: 1.4vh;
  font-size: min(0.82vw, 1.45vh);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pressure-value {
  color: var(--muted);
}

.cover-player {
  position: relative;
  width: min(100%, 15.2vw, 26vh);
  aspect-ratio: 1;
  justify-self: center;
}

.cover-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--panel-line);
}

.cover-control {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.8em;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  opacity: 1;
  transition: opacity 180ms ease, background 180ms ease;
}

.cover-control.is-playing {
  opacity: 0;
}

.cover-player:hover .cover-control.is-playing,
.cover-control.is-playing:focus-visible,
.cover-control.is-connecting {
  opacity: 1;
}

.cover-control:hover,
.cover-control:focus-visible {
  background: rgba(0, 0, 0, 0.66);
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: -2px;
}

.cover-control-icon {
  position: relative;
  display: block;
  width: min(4.2vw, 7vh);
  height: min(4.2vw, 7vh);
}

.cover-control-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: min(1.3vw, 2.15vh) solid transparent;
  border-bottom: min(1.3vw, 2.15vh) solid transparent;
  border-left: min(2vw, 3.3vh) solid currentColor;
}

.cover-control.is-playing .cover-control-icon::before {
  width: min(0.8vw, 1.35vh);
  height: min(2.7vw, 4.5vh);
  border: 0;
  background: currentColor;
  box-shadow: min(1.45vw, 2.4vh) 0 0 currentColor;
  transform: translate(-125%, -50%);
}

.cover-control.is-connecting .cover-control-icon::before {
  width: min(2.5vw, 4.2vh);
  height: min(2.5vw, 4.2vh);
  border: min(0.25vw, 0.42vh) solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  animation: control-spin 800ms linear infinite;
}

.cover-control-text {
  font-size: min(0.92vw, 1.6vh);
  font-weight: 700;
  text-shadow: 0 0.15em 0.5em #000;
}

.track-label {
  margin-top: 0.25vh;
  font-size: min(0.92vw, 1.62vh);
}

.artist-name,
.track-title {
  min-width: 0;
  color: #fff;
  line-height: 1.16;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
}

.artist-name {
  font-size: min(1.38vw, 2.45vh);
  font-weight: 600;
}

.track-title {
  font-size: min(1.22vw, 2.15vh);
}

.text-panel {
  color: rgba(255, 255, 255, 0.9);
  font-size: min(1vw, 1.78vh);
  line-height: 1.5;
}

.text-panel h1 {
  margin: 1.35em 0 0.55em;
  color: #fff;
  font-size: min(1.42vw, 2.5vh);
  line-height: 1.1;
}

.text-panel p {
  margin: 0 0 1em;
}

.info-logo {
  display: block;
  width: min(150px, 70%);
  aspect-ratio: 1;
  margin: 0 auto 1.25em;
  object-fit: cover;
}

.contacts-panel h1 {
  margin-top: 0.2em;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7vw;
  margin-top: 1.5em;
}

.contact-action {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 0.45em;
  border: 1px solid var(--panel-line);
  border-radius: 0.4em;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  transition: background 150ms ease, border-color 150ms ease;
}

.contact-action:hover,
.contact-action:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
}

.contact-action svg {
  width: 1.6em;
  height: 1.6em;
  flex: 0 0 auto;
  fill: currentColor;
}

.lower-third {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: var(--ticker-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: min(2.15vw, 3.8vh);
  line-height: 1;
  font-weight: 500;
  text-shadow: 0 0.18vh 0.5vh rgba(0, 0, 0, 0.82);
}

.ticker {
  width: 100vw;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  --ticker-duration: 34s;
  display: flex;
  width: max-content;
  will-change: transform;
  animation: ticker-scroll var(--ticker-duration) linear infinite;
}

.ticker-item {
  flex: 0 0 auto;
  padding-right: 8vw;
}

.ticker-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.fullscreen-button {
  position: absolute;
  left: 1.5vw;
  bottom: calc(var(--ticker-height) + 5vh);
  z-index: 4;
  width: min(3.2vw, 5.6vh);
  height: min(3.2vw, 5.6vh);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.4em;
  padding: min(0.6vw, 1vh);
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(0.3vw);
  transition: background 150ms ease, border-color 150ms ease;
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(255, 255, 255, 0.65);
  outline: none;
}

.fullscreen-button svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.fullscreen-exit,
.fullscreen-button.is-active .fullscreen-enter {
  display: none !important;
}

.fullscreen-button.is-active .fullscreen-exit {
  display: block !important;
}

.system-status {
  position: absolute;
  left: 1.5vw;
  bottom: calc(var(--ticker-height) + 1.4vh);
  z-index: 4;
  max-width: 42vw;
  color: rgba(255, 255, 255, 0.78);
  font-size: min(1vw, 1.8vh);
  line-height: 1.35;
  text-shadow: 0 0.15vh 0.45vh rgba(0, 0, 0, 0.78);
}

.system-status:empty {
  display: none;
}

audio {
  display: none !important;
}

@keyframes control-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-aspect-ratio: 4 / 3) {
  :root { --ticker-height: 6.2vh; }

  .brand { width: 24vw; }

  .info-panel {
    top: 9vh;
    right: 1.6vw;
    width: 40vw;
    max-height: calc(100vh - var(--ticker-height) - 10.6vh);
  }

  .tab-panel { padding-inline: 1.6vw; }
  .tab-button { font-size: min(2vw, 1.65vh); }
  .date-value { font-size: min(2vw, 1.8vh); }
  .time-value { font-size: min(5vw, 4.8vh); }
  .panel-label, .track-label { font-size: min(1.85vw, 1.65vh); }
  .sensor-row { font-size: min(2.8vw, 2.5vh); }
  .weather-status { font-size: min(1.55vw, 1.35vh); }
  .pressure-value { font-size: min(1.55vw, 1.35vh); }
  .cover-player { width: min(100%, 25vw, 24vh); }
  .artist-name { font-size: min(2.5vw, 2.2vh); }
  .track-title { font-size: min(2.2vw, 1.95vh); }
  .text-panel { font-size: min(2.05vw, 1.7vh); }
  .text-panel h1 { font-size: min(2.8vw, 2.3vh); }
  .lower-third { font-size: min(3.7vw, 3.2vh); }
}

@media (max-height: 54vw) {
  .current-panel { gap: 1vh; }
  .cover-player { width: min(100%, 13.5vw, 24vh); }
  .track-title { -webkit-line-clamp: 1; }
}

@media (max-width: 720px) and (orientation: portrait) {
  :root {
    --ticker-height: 34px;
  }

  html,
  body {
    width: 100%;
    height: 100%;
  }

  body {
    overflow: hidden;
  }

  .broadcast {
    width: 100%;
    height: 100svh;
    min-height: 0;
    padding-top: 31svh;
    overflow: hidden;
  }

  .video-bg,
  .video-shade {
    position: absolute;
    inset: 0 0 auto;
    height: 32svh;
  }

  .video-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.25) 65%, #0c0f11 100%);
  }

  .brand {
    top: 43px;
    left: 10px;
    width: min(16vw, 62px);
  }

  .info-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 69svh;
    max-height: 69svh;
    min-height: 0;
    border-right: 0;
    border-left: 0;
    background: rgba(12, 15, 17, 0.96);
    backdrop-filter: none;
  }

  .panel-tabs {
    z-index: 3;
    height: 44px;
    background: #0c0f11;
  }

  .tab-button {
    padding: 10px 4px 8px;
    font-size: 13px;
  }

  .tab-panel {
    flex: 1 1 auto;
    min-height: 0;
    padding: 10px 16px 12px;
  }

  .current-panel {
    gap: 7px;
    overflow: hidden;
  }

  .date-value {
    font-size: 12px;
  }

  .time-value {
    margin-top: -2px;
    font-size: clamp(34px, 11vw, 48px);
  }

  .panel-label,
  .track-label {
    font-size: 11px;
  }

  .sensor-row {
    gap: 8px;
    font-size: 19px;
  }

  .pressure-value,
  .weather-status {
    min-height: 13px;
    font-size: 11px;
  }

  .radio-block {
    gap: 6px;
  }

  .cover-player {
    width: min(42vw, 168px, 20svh);
  }

  .cover-control-icon {
    width: 52px;
    height: 52px;
  }

  .cover-control-icon::before {
    border-top-width: 15px;
    border-bottom-width: 15px;
    border-left-width: 23px;
  }

  .cover-control.is-playing .cover-control-icon::before {
    width: 11px;
    height: 40px;
    box-shadow: 23px 0 0 currentColor;
  }

  .cover-control.is-playing {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: 46px;
    height: 46px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.64);
    opacity: 0.88;
  }

  .cover-control.is-playing .cover-control-icon {
    width: 30px;
    height: 30px;
  }

  .cover-control.is-playing .cover-control-icon::before {
    width: 5px;
    height: 20px;
    box-shadow: 12px 0 0 currentColor;
    left: 13px;
  }

  .cover-control.is-playing .cover-control-text {
    display: none;
  }

  .cover-control-text {
    font-size: 12px;
  }

  .artist-name {
    font-size: 17px;
  }

  .track-title {
    font-size: 15px;
  }

  .text-panel {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 16px;
    padding-bottom: 24px;
    font-size: 15px;
    line-height: 1.55;
  }

  .text-panel h1 {
    font-size: 23px;
  }

  .contact-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fullscreen-button {
    position: absolute;
    top: 43px;
    right: 10px;
    bottom: auto;
    left: auto;
    width: 38px;
    height: 38px;
    padding: 8px;
  }

  .system-status {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
    padding: 7px 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
  }

  .lower-third {
    position: absolute;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    height: var(--ticker-height);
    background: rgba(0, 0, 0, 0.72);
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    transform: none;
  }
}
