:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.4 system-ui, sans-serif; background: #111114; color: #ddd; }
button, select, input { font: inherit; }
button { background: #2a2a32; color: #eee; border: 1px solid #444; border-radius: 6px;
  padding: 5px 12px; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: #7a2a55; border-color: #a03a70; }
button.big { font-size: 20px; padding: 10px 44px; margin-top: 8px; }

.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 12px;
  background: #1b1b20; border-bottom: 1px solid #2a2a30; }
.spacer { flex: 1; }
#stop { background: #b00020; border-color: #e0002a; font-weight: bold; }
#battery.low { color: #ff6b6b; }

.view { padding: 12px 16px; max-width: 1100px; margin: 0 auto; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled { opacity: 0.5; }
h2 { font-size: 16px; margin: 18px 0 6px; color: #f0a0c8; }
.row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 6px; }
.val { display: inline-block; min-width: 3.5em; }
.hint { color: #999; font-size: 13px; }

.patlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px 14px; max-height: 42vh; overflow: auto; padding: 8px; background: #18181c;
  border-radius: 6px; }
.pat { display: block; padding: 3px 0; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.pat .src { color: #c78; font-size: 11px; }
.pat .desc { color: #888; font-size: 12px; }

#running { text-align: center; padding-top: 12vh; }
#running h1 { font-size: 44px; font-weight: 300; letter-spacing: 2px; margin: 0; }
.lights { display: flex; justify-content: center; gap: 60px; margin: 56px 0; }
.light { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  font-size: 68px; font-weight: bold; background: #1e1e24; color: #444;
  border: 4px solid #2e2e36; user-select: none; }
#lightA { --c: #e0559a; }
#lightB { --c: #4aa3e0; }
.light.on { border-color: var(--c); animation: flash 0.9s ease-in-out infinite; }
@keyframes flash {
  0%, 100% { background: var(--c); color: #fff; box-shadow: 0 0 50px var(--c); }
  50% { background: #1e1e24; color: var(--c); box-shadow: none; }
}
#done { text-align: center; padding-top: 12vh; }
