/* ===========================================================
   Right properties panel
   =========================================================== */

.properties {
  width: 280px;
  min-width: 220px;
  max-width: 440px;
  border-left: 1px solid var(--border);
  flex: 0 0 auto;
}
.properties .panel-head { justify-content: flex-start; }

.props-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 14px 30px;
}

.props-empty {
  margin-top: 40px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1.6;
}

.prop-objhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.prop-objhead .mini {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.prop-objhead .mini svg { width: 100%; height: 100%; }
.prop-objhead .meta { min-width: 0; }
.prop-objhead .meta .t { font-weight: 600; font-size: 14px; }
.prop-objhead .meta .s { font-size: 11.5px; color: var(--text-mute); }

.prop-section {
  margin-bottom: 16px;
}
.prop-section > .sec-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-mute);
  margin: 0 0 8px;
  font-weight: 600;
}

.prop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.prop-row label {
  flex: 0 0 78px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.prop-row .field { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; }

.prop-input {
  width: 100%;
  height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 12.5px;
  transition: var(--t-fast);
}
.prop-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,150,243,.16); }

textarea.prop-input { height: 64px; padding: 7px 9px; resize: vertical; line-height: 1.4; }

.prop-row.dual .field { gap: 6px; }

.prop-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: var(--border-2);
  outline: none;
}
.prop-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.prop-range::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
}
.prop-val {
  flex: 0 0 46px;
  text-align: right;
  font-size: 12px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.prop-color {
  width: 34px; height: 30px;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  cursor: pointer;
}
input[type="color"].prop-color::-webkit-color-swatch { border: none; border-radius: 4px; }
input[type="color"].prop-color::-webkit-color-swatch-wrapper { padding: 0; }

.prop-select {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
}

/* contents / reaction info card */
.contents-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.contents-list { display: flex; flex-wrap: wrap; gap: 6px; }
.content-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--card);
  color: var(--text-dim);
}
.content-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.contents-empty { font-size: 12px; color: var(--text-mute); }
.reaction-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--good);
  line-height: 1.4;
  display: flex;
  gap: 6px;
}
.reaction-note.warn { color: var(--warn); }

.prop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 6px;
}
.prop-actions button {
  height: 32px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  transition: var(--t-fast);
}
.prop-actions button:hover { background: var(--card-hover); color: var(--text); border-color: var(--border-2); }
.prop-actions button.danger:hover { background: var(--danger); color: #fff; border-color: transparent; }

/* ---- reaction-engine readouts ---- */
.ph-line {
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-dim);
}
.ph-line b { color: var(--accent-2); }
.ph-bar {
  position: relative;
  height: 6px;
  margin-top: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e23b3b, #ef7d2e, #f2c310, #4caf50, #1f9bd6, #3050c0, #6a2bb0);
}
.ph-bar span {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #11151c;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.rx-detail, .rx-predict {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
}
.rx-predict { border-style: dashed; border-color: var(--accent-dim); }
.rx-predict-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--accent-2); margin-bottom: 6px; font-weight: 600;
}
.rx-eq {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--text);
  background: var(--card); padding: 5px 8px; border-radius: 5px;
  margin-bottom: 7px; word-break: break-word;
}
.rx-line {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; margin: 3px 0;
}
.rx-k { flex: 0 0 92px; color: var(--text-mute); }
.rx-v { color: var(--text-dim); display: inline-flex; align-items: center; gap: 5px; }
.rx-v .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rx-hint { margin-top: 7px; font-size: 11.5px; color: var(--text-mute); }
.rx-hint b { color: var(--accent-2); }
