* { box-sizing: border-box; }

body {
  width: calc(100% - 32px);
  max-width: 800px;
  margin: 2em auto;
  padding: 0 0 28px;
  color: #262a28;
  background: #fff;
  text-align: center;
  font-family: sans-serif;
}

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

iframe, #hls-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

[hidden] { display: none !important; }

#control {
  display: inline-block;
  max-width: 100%;
  margin-top: 1em;
  padding: 1em 2em;
  border: 0;
  border-radius: 10px;
  color: #17251c;
  background: lightgreen;
  font: inherit;
  font-size: 2em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

#control:not(:disabled):hover { background: #9be39b; }
#control:not(:disabled):active { transform: translateY(1px); }
#control:focus-visible, .option:focus-visible, a:focus-visible {
  outline: 3px solid #216f49;
  outline-offset: 3px;
}

#control:disabled {
  color: #fff;
  background: #858b87;
  opacity: .72;
  cursor: not-allowed;
}

.safety-note {
  margin: 10px 0 0;
  color: #59635d;
  font-size: 14px;
  line-height: 1.6;
}

.status, .result {
  margin: 9px 0 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.roundtrip {
  margin: 5px 0 0;
  color: #17644e;
  font: 600 21px ui-monospace, monospace;
}

.stream-options {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: #69716c;
  font-size: 13px;
}

.option, .stream-options a {
  padding: 5px 8px;
  border: 1px solid #d8ded8;
  border-radius: 4px;
  color: #46524a;
  background: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.option[aria-pressed="true"] {
  border-color: #82ad8c;
  color: #225634;
  background: #f0f7f0;
}

@media (max-width: 520px) {
  body { width: calc(100% - 24px); margin: 1.25em auto; }
  #control { width: 100%; padding: .85em .5em; font-size: clamp(1.45em, 8vw, 2em); }
}

@media (prefers-reduced-motion: reduce) {
  #control { transition: none; }
}
