* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; background: #000; overflow: hidden; }

body {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1e4c8;
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", "TeX Gyre Pagella", Georgia, serif;
  user-select: none;
}

/* A 16:9 box, as large as the window allows. Everything inside is sized in cqw. */
#stage {
  position: relative;
  width: min(100vw, 100vh * 16 / 9);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  container-type: size;
}

[hidden] { display: none !important; }

#view { display: block; width: 100%; height: 100%; touch-action: manipulation; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: appear .4s ease both;
}

.shade { background: rgba(6, 5, 12, .72); }

@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

h1 {
  font-weight: 400;
  font-size: 5.4cqw;
  letter-spacing: .06em;
  text-shadow: 0 .15cqw 1.2cqw rgba(0, 0, 0, .85);
  white-space: nowrap;
}

h2 { font-weight: 400; font-size: 2.8cqw; letter-spacing: .08em; text-align: center; margin-bottom: 1cqw; }

button {
  font: inherit;
  font-size: 2.2cqw;
  letter-spacing: .08em;
  color: inherit;
  background: rgba(10, 8, 14, .45);
  border: .12cqw solid rgba(232, 184, 96, .45);
  border-radius: .35cqw;
  padding: .55cqw 2cqw;
  cursor: pointer;
}

button:hover, button:focus-visible {
  background: rgba(120, 80, 30, .6);
  border-color: #f0c878;
  outline: none;
}

nav { display: flex; flex-direction: column; gap: 1.1cqw; align-items: stretch; }

/* The title frame keeps the station on the left, so the lettering sits right. */
#title { justify-content: flex-end; background: linear-gradient(90deg, transparent 40%, rgba(5, 4, 12, .55) 80%); }
#title .column { display: flex; flex-direction: column; align-items: center; gap: 3.4cqw; margin-right: 6cqw; }
#title nav { width: 19cqw; }

.panel {
  min-width: 40cqw;
  padding: 2.4cqw 3cqw;
  background: rgba(16, 12, 20, .92);
  border: .12cqw solid rgba(232, 184, 96, .45);
  border-radius: .6cqw;
}

nav.panel { min-width: 26cqw; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; margin-top: 1cqw; font-size: 2cqw; }
.row button { font-size: 1.8cqw; min-width: 14cqw; padding: .35cqw 1.4cqw; }
.row button.waiting { background: #7a5220; animation: pulse .9s ease-in-out infinite alternate; }
.row.buttons { justify-content: center; margin-top: 2.2cqw; }

@keyframes pulse { from { opacity: 1; } to { opacity: .55; } }

input[type="range"] { width: 20cqw; accent-color: #e8b860; cursor: pointer; }

svg { fill: none; stroke: #f1e4c8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.icon {
  position: absolute;
  top: 1.4cqw;
  right: 1.4cqw;
  width: 4cqw;
  height: 4cqw;
  padding: .7cqw;
  opacity: .6;
}

.icon:hover { opacity: 1; }
.icon svg { display: block; width: 100%; height: 100%; }

#backHint {
  position: absolute;
  bottom: .6cqw;
  width: 6cqw;
  height: 3cqw;
  opacity: .55;
  stroke-width: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 .3cqw #000);
}

#muteBadge {
  position: absolute;
  top: 1.7cqw;
  left: 1.7cqw;
  width: 3.4cqw;
  height: 3.4cqw;
  pointer-events: none;
  filter: drop-shadow(0 0 .3cqw #000);
}

#credits { background: rgba(4, 3, 10, .7); overflow: hidden; cursor: pointer; }

#roll {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  text-align: center;
  animation: roll 17s linear forwards;
}

#roll p { font-size: 2.4cqw; margin-top: 7cqw; letter-spacing: .08em; text-shadow: 0 0 .8cqw #000; }
#roll p.by { font-size: 3.4cqw; margin-top: 5cqw; color: #f6cd7d; }
#roll p.thanks { margin-top: 14cqw; }

/* Starts just below the frame and leaves just above it. */
@keyframes roll {
  from { top: 100%; transform: translateY(0); }
  to { top: 0; transform: translateY(-100%); }
}

#debug {
  position: absolute;
  top: 6.5cqw;
  left: .5cqw;
  padding: .4cqw .7cqw;
  background: rgba(0, 0, 0, .75);
  color: #7f7;
  font: 1.2cqw/1.4 monospace;
  white-space: pre;
  pointer-events: none;
  user-select: text;
}

#error {
  position: absolute;
  inset: 10cqw;
  padding: 2cqw;
  overflow: auto;
  background: #200;
  border: .15cqw solid #f66;
  font: 1.4cqw/1.5 monospace;
  white-space: pre-wrap;
  user-select: text;
}
