html, body {
  margin: 0;
  height: 100%;
  background: #fff;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  overflow: hidden;
}

* { box-sizing: border-box; }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#controls {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid #000;
  z-index: 10;
}

#record {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font: inherit;
  font-size: 14px;
  color: #000;
  background: #fff;
  border: 0;
  border-right: 1px solid #000;
  cursor: pointer;
}

#record:hover { background: #000; color: #fff; }
#record:hover .dot { background: #fff; }

#record .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #000;
}

#record[aria-pressed="true"] { background: #000; color: #fff; }
#record[aria-pressed="true"] .dot { background: #fff; border-color: #fff; }

#fallback {
  width: 300px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  color: #000;
  background: #fff;
  border: 0;
  border-right: 1px solid #000;
  outline: none;
}

#fallback::placeholder { color: #999; font-style: italic; }

#status {
  min-width: 120px;
  padding: 0 14px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}

#source {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #000;
  z-index: 10;
}

#video {
  width: 330px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: #000;
  background: #fff;
  border: 0;
  outline: none;
}

#video::placeholder { color: #999; font-style: italic; }

#source button {
  padding: 8px 12px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #000;
  background: #fff;
  border: 0;
  border-left: 1px solid #000;
  cursor: pointer;
}

#source button:hover { background: #000; color: #fff; }
#source[data-loaded="false"] #speed,
#source[data-loaded="false"] #playpause { display: none; }

#progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 11;
  pointer-events: none;
}

#progress span {
  display: block;
  height: 100%;
  width: 0;
  background: #000;
}

#source.busy #video { color: #999; }

#chooser {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
  max-width: 300px;
}

#language[hidden] { display: none; }

#language {
  margin-left: 6px;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  padding: 7px 10px;
  outline: none;
}

#version {
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  padding: 7px 10px;
  outline: none;
}

#blurb {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  font-style: italic;
  color: #666;
}

#tune {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 11;
  padding: 8px 14px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  cursor: pointer;
}

#tune:hover { background: #000; color: #fff; }

#panel {
  position: fixed;
  right: 20px;
  bottom: 58px;
  z-index: 12;
  width: 310px;
  max-height: 72vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #000;
}

#panel[hidden] { display: none; }

#panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid #000;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#panel header button {
  font: inherit;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  padding: 3px 8px;
  cursor: pointer;
}

#panel header button:hover { background: #000; color: #fff; }

.knob { padding: 9px 12px 4px; border-bottom: 1px solid rgba(0,0,0,0.12); }

.knob label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.knob label b {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: normal;
  color: #666;
}

.knob input {
  width: 100%;
  accent-color: #000;
}

#panel .none { padding: 14px 12px; font-size: 12px; font-style: italic; color: #666; }

#panel header .acts { display: flex; gap: 6px; }

#exported { border-top: 1px solid #000; padding: 10px 12px; }
#exported[hidden] { display: none; }

#exportText {
  width: 100%;
  height: 150px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.45;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 8px;
  resize: vertical;
  outline: none;
}

#exportNote {
  margin: 7px 0 0;
  font-size: 11px;
  font-style: italic;
  color: #666;
}

.knob select.choice {
  width: 100%;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 0;
  padding: 5px 7px;
  outline: none;
}

button.section {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  color: #000;
  background: #fff;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

button.section::before { content: "▸  "; color: #999; }
button.section.open { background: #000; color: #fff; }
button.section.open::before { content: "▾  "; color: #fff; }
button.section:not(.open):hover { background: rgba(0, 0, 0, 0.05); }

.section-body[hidden] { display: none; }
.section-body { border-bottom: 1px solid rgba(0, 0, 0, 0.18); }
.section-body .knob:last-child { border-bottom: 0; }
