.face-editor-toolbar-row label[for],
#face-editor-part-key-wrap {
  min-width: 0;
}
#face-editor-part-key-input {
  min-width: 220px;
}

.face-editor-target-summary {
  position: sticky;
  top: 0;
  z-index: 6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #eefbff;
  background: rgba(6, 16, 24, 0.92);
  border: 1px solid rgba(132, 209, 235, 0.2);
  border-radius: 10px;
  padding: 9px 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.face-editor-target-summary .muted { opacity: .75; }
.face-editor-override-tools {
  justify-content: space-between;
  align-items: center;
}
.face-editor-override-legend {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color: rgba(221, 244, 255, 0.82);
}
.face-editor-legend-dot {
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
  border:1px solid rgba(255,255,255,0.16);
  vertical-align:middle;
}
.face-editor-legend-dot-exact { background: rgba(255, 212, 0, 0.95); }
.face-editor-legend-dot-current { background: rgba(132, 209, 235, 0.95); }

.face-editor-legend-dot-dirty { background: rgba(255, 128, 190, 0.98); }
.face-editor-dirty-session::before {
  content:'';
  position:absolute;
  top:5px;
  left:5px;
  width:8px;
  height:8px;
  border-radius:999px;
  background: rgba(255, 128, 190, 0.98);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.face-editor-override-summary {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: rgba(221, 244, 255, 0.86);
  background: rgba(8, 18, 28, 0.42);
  border: 1px solid rgba(132, 209, 235, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
}
.face-editor-nav-row { flex-wrap: wrap; }
.face-editor-nav-row button { flex: 1 1 140px; }
.face-editor-has-exact::after {
  content:'';
  position:absolute;
  top:5px;
  right:5px;
  width:8px;
  height:8px;
  border-radius:999px;
  background: rgba(255, 212, 0, 0.98);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
.face-editor-frame-thumb,
.face-editor-dir-chip,
.face-editor-frame-chip-wrap,
.face-editor-part-chip,
.face-editor-dir-preview-thumb { position: relative; }
.face-editor-is-hidden-by-filter { display:none !important; }
.face-editor-template-preview {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: rgba(221, 244, 255, 0.88);
  background: rgba(8, 18, 28, 0.5);
  border: 1px solid rgba(132, 209, 235, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
}
.face-editor-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(8, 18, 28, 0.5);
  border: 1px solid rgba(132, 209, 235, 0.14);
  border-radius: 10px;
  padding: 8px 10px;
}
.face-editor-card {
  background: rgba(8, 18, 28, 0.72);
  border: 1px solid rgba(132, 209, 235, 0.2);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.face-editor-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.face-editor-offset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.face-editor-offset-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #d8eef4;
}
.face-editor-flags {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.face-editor-toggle.small {
  padding: 4px 8px;
  font-size: 12px;
}
.face-editor-piece-hover {
  outline: 2px solid #ffd400 !important;
  outline-offset: 1px;
}
.face-editor-piece-selected {
  outline: 2px solid #ffd400 !important;
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(255,212,0,0.35);
}
.face-editor-nudge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.face-editor-nudge-grid button[data-nudge="up"] { grid-column: 2; }
.face-editor-nudge-grid button[data-nudge="left"] { grid-column: 1; }
.face-editor-nudge-grid button[data-nudge="right"] { grid-column: 3; }
.face-editor-nudge-grid button[data-nudge="down"] { grid-column: 2; }
.face-editor-card button {
  background: rgba(42, 108, 146, 0.9);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.face-editor-batch-row {
  flex-wrap: wrap;
}
.face-editor-batch-row button {
  flex: 1 1 120px;
}
#face-editor-scope-hint {
  margin-top: 8px;
  min-height: 18px;
}
#face-editor-part-key-list {
  display: none;
}
.face-editor-browser-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.face-editor-frame-strip,
.face-editor-part-browser {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}
.face-editor-frame-thumb,
.face-editor-part-chip {
  background: rgba(8, 18, 28, 0.72);
  border: 1px solid rgba(132, 209, 235, 0.18);
  border-radius: 10px;
  color: #eefbff;
}
.face-editor-frame-thumb {
  width: 64px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.face-editor-frame-thumb.is-active,
.face-editor-part-chip.is-active {
  border-color: rgba(255, 212, 0, 0.95);
  box-shadow: 0 0 0 2px rgba(255,212,0,0.28);
}
.face-editor-frame-thumb-preview {
  width: 48px;
  height: 48px;
  align-self: center;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-position: 0 0;
}
.face-editor-frame-thumb-label {
  font-size: 11px;
  text-align: center;
}
.face-editor-part-browser {
  max-height: 140px;
  overflow: auto;
  padding-right: 4px;
}
.face-editor-part-chip {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}
.face-editor-targeted-row {
  flex-wrap: wrap;
  align-items: center;
}
.face-editor-targeted-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #d8eef4;
}
.face-editor-targeted-row input[type="number"] {
  width: 70px;
}

.face-editor-dir-selection,
.face-editor-frame-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.face-editor-dir-chip,
.face-editor-frame-chip,
.face-editor-frame-chip-clear {
  border: 1px solid rgba(132, 209, 235, 0.18);
  background: rgba(8, 18, 28, 0.72);
  color: #eefbff;
  cursor: pointer;
  font-size: 12px;
}
.face-editor-dir-chip {
  border-radius: 999px;
}
