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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  font-family: "Hiragino Maru Gothic ProN", "BIZ UDGothic", "Yu Gothic", sans-serif;
}

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

#mic-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 20;
  pointer-events: none; /* never block the settings panel */
}
#mic-overlay .mic-box { pointer-events: auto; }
#mic-overlay.hidden { display: none; }

#mic-start {
  font-size: 22px;
  padding: 16px 32px;
  border: none;
  border-radius: 999px;
  background: #7ac142;
  color: #143d0a;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
#mic-start:hover { background: #8fd455; }

.mic-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#mic-error {
  max-width: 480px;
  font-size: 12px;
  color: #ffd0d0;
  background: rgba(60, 10, 10, 0.7);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
}
#mic-error:empty { display: none; }

#panel {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30; /* above the mic overlay */
  background: rgba(20, 40, 12, 0.82);
  color: #d8f0c0;
  border: 2px solid #4a7a2a;
  border-radius: 14px;
  padding: 14px 16px;
  width: 280px;
  font-size: 13px;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}
#panel.hidden { display: none; }
body:not(:hover) #panel { opacity: 0.25; }

#panel h1 {
  font-size: 20px;
  color: #a4e05a;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
#panel h1 span { font-size: 12px; color: #d8f0c0; margin-left: 6px; }

#panel .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
#panel .row label { flex: 0 0 70px; }
#panel .row input[type="range"] { flex: 1; accent-color: #7ac142; }
#panel .row select {
  flex: 1;
  background: #1d3510;
  color: #d8f0c0;
  border: 1px solid #4a7a2a;
  border-radius: 6px;
  padding: 4px;
}
#mic-cycle {
  flex: 1;
  background: #1d3510;
  color: #d8f0c0;
  border: 1px solid #4a7a2a;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#mic-cycle:hover { background: #2a4a18; }
#meter {
  flex: 1;
  height: 10px;
  background: #14260c;
  border: 1px solid #4a7a2a;
  border-radius: 5px;
  overflow: hidden;
}
#meter-fill {
  height: 100%;
  width: 0%;
  background: #7ac142;
}

#panel .keys { margin-top: 10px; line-height: 1.9; }
#panel .keys b { color: #a4e05a; }
#panel kbd {
  background: #2a4a18;
  border: 1px solid #5a8a3a;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  margin-right: 2px;
}

#panel .obs-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #4a7a2a;
  font-size: 11px;
  color: #9ab882;
  line-height: 1.6;
}
#panel .obs-note code {
  background: #2a4a18;
  padding: 1px 4px;
  border-radius: 3px;
}
