/* Black on white throughout. No colour, no fills, no images — the piece is all
   stroked line, so the chrome stays out of its way. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #fff; }
body {
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #111;
  overflow: hidden;
}
#pool { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }

#say {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: min(560px, 76vw);
  display: flex; align-items: center; gap: 8px;
}
#say input {
  flex: 1 1 auto; min-width: 0;
  padding: 9px 12px; border: 1px solid #ccc; border-radius: 2px;
  background: rgba(255,255,255,.86); font: inherit; color: #111;
}
#say input:focus { outline: none; border-color: #111; }

/* The one red thing in a black and white piece, because a record light is a
   record light and nobody has to be taught what it means. */
#micbtn {
  flex: 0 0 auto;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid #ccc; border-radius: 50%;
  background: rgba(255,255,255,.86);
  display: grid; place-items: center;
  cursor: pointer;
  transition: border-color .15s;
}
#micbtn span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #bbb;
  transition: background .15s;
}
#micbtn:hover { border-color: #111; }
#micbtn:hover span { background: #777; }
#micbtn:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
#micbtn.on { border-color: #c00; }
#micbtn.on span { background: #c00; animation: listening 1.4s ease-in-out infinite; }
/* it could not start — hollow, so it never reads as recording */
#micbtn.bad { border-color: #c00; }
#micbtn.bad span { background: transparent; box-shadow: inset 0 0 0 2px #c00; }
@keyframes listening { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  #micbtn.on span { animation: none; }
}
button {
  font: inherit; padding: 4px 9px; background: #fff; color: #111;
  border: 1px solid #bbb; border-radius: 2px; cursor: pointer;
}
button:hover { border-color: #111; }

#panel {
  position: fixed; top: 0; right: 0; z-index: 2;
  width: 310px; height: 100%; overflow-y: auto;
  padding: 12px 12px 40px; background: rgba(255,255,255,.94);
  border-left: 1px solid #e2e2e2;
}
#panel.hidden { display: none; }
#panel header { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; padding-right: 54px; }
#stat { color: #888; font-size: 11px; }
#err { border: 1px solid #c00; color: #c00; padding: 5px 7px; margin: 0 0 8px;
  font-size: 11px; line-height: 1.4; word-break: break-word; }

details { border-top: 1px solid #eee; padding: 4px 0; }
summary { cursor: pointer; color: #555; padding: 3px 0; user-select: none; }
summary:hover { color: #111; }

.ctl { padding: 9px 0; border-top: 1px solid #eee; }
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; }
.ctl-name { color: #111; }
.ctl-val { width: 62px; text-align: right; border: 1px solid #ddd; background: #fff;
  font: inherit; padding: 1px 4px; color: #111; }
.ctl input[type=range] { width: 100%; margin: 6px 0 2px; accent-color: #111; height: 16px; }
.ctl-hint { color: #999; font-size: 11px; line-height: 1.35; }

.row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.row .k { flex: 0 0 96px; color: #666; overflow: hidden; text-overflow: ellipsis; }
.row input[type=range] { flex: 1 1 auto; min-width: 0; accent-color: #111; height: 16px; }
.row .v { flex: 0 0 54px; border: 1px solid #ddd; background: #fff; font: inherit; padding: 1px 3px; color: #111; }
.row #url { flex: 1 1 auto; min-width: 0; border: 1px solid #ddd; padding: 3px 5px; font: inherit; }
.note { color: #888; }
.foot { margin-top: 12px; }

.log { max-height: 210px; overflow-y: auto; }
.log div { padding: 2px 0; border-bottom: 1px dotted #eee; }
.log b { color: #888; font-weight: normal; }

#out {
  width: 100%; height: 130px; margin-top: 8px; padding: 6px;
  border: 1px solid #ddd; font: 11px/1.45 ui-monospace, monospace; color: #111;
  background: #fafafa; resize: vertical;
}
