/* qf · lab instrument（design-spec 01）。data 不在此檔；view only. */
* { box-sizing: border-box; transition: none !important; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
html { scroll-behavior: auto; }
body {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.2px;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
}
button { appearance: none; border: none; background: none; font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; background: transparent; border: none; outline: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px dashed #000; outline-offset: 0; }

/* topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #000;
}
.crumb { font-size: 12px; }
.status { flex: 1; font-size: 11px; color: #ff0000; text-align: right; }
.actions { display: inline-flex; gap: 8px; }

.btn {
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 11px;
  padding: 1px 6px;
  line-height: 1.2;
}
.btn:hover { background: #000; color: #fff; }
.btn.armed { border-color: #ff0000; color: #ff0000; }
.btn.armed:hover { background: #ff0000; color: #fff; }

.glyph { font-size: 12px; padding: 0 4px; line-height: 1; }
.glyph:hover { background: #000; color: #fff; }

/* filter */
.filterbar {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid #e8e8e8;
}
.filterbar label { font-size: 11px; color: #666; }
.filterbar input {
  flex: 1;
  max-width: 320px;
  border-bottom: 1px solid #000;
  font-size: 12px;
  padding: 0 2px;
}

/* list */
#list { flex: 1; overflow-y: auto; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.group {
  font-size: 10px;
  color: #666;
  text-transform: lowercase;
  margin: 10px 0 4px;
}
.group:first-child { margin-top: 0; }
.row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 4px;
  border-top: 1px solid #e8e8e8;
  cursor: pointer;
}
.row:hover, .row.copy-success { background: #000; color: #fff; }
.row:hover .k, .row.copy-success .k { color: #fff; }
.row .k { flex: none; width: 160px; font-size: 11px; color: #666;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .v { flex: 1; min-width: 0; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .c { flex: none; font-size: 11px; opacity: 0.25; }
.row:hover .c { opacity: 1; }

/* empty */
.void {
  height: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0.3;
  user-select: none;
}

/* modal · CRT glow */
.modal-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal {
  width: min(480px, 92vw);
  background: #fff;
  border: 1px solid #000;
  box-shadow: 0 0 15px #000;
  padding: 12px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.modal label { display: block; font-size: 11px; color: #666; margin: 6px 0 0; }
.modal input, .modal textarea {
  width: 100%;
  border: 1px solid #000;
  padding: 3px 4px;
  font-size: 12px;
}
.modal textarea { min-height: 140px; resize: vertical; }
.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.modal-note { font-size: 10px; color: #666; }
