/* ============================================================
 * 基准数据在线编辑器 — 样式（移动端优先，复用 style.css 的 .btn 系列）
 * ============================================================ */
* { box-sizing: border-box; }
body { margin: 0; padding-bottom: 72px; background: #f5f6fb; color: #1f2330;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }

.ed-header { position: sticky; top: 0; z-index: 20; background: #fff;
  border-bottom: 1px solid #eceef5; box-shadow: 0 2px 10px rgba(31,35,48,.04); }
.ed-header-inner { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; }
.ed-header-inner h1 { font-size: 17px; margin: 0; font-weight: 700; }
.ed-back { font-size: 13px; color: #5b6cff; text-decoration: none; white-space: nowrap; }
.ed-back:active { opacity: .6; }

.ed-nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ed-nav::-webkit-scrollbar { display: none; }
.ed-nav a { flex: 0 0 auto; font-size: 12.5px; color: #5a6072; text-decoration: none;
  padding: 6px 10px; border-radius: 999px; background: #f1f2f8; white-space: nowrap; }
.ed-nav a:active { background: #e3e5f5; }

.ed-main { max-width: 760px; margin: 0 auto; padding: 14px 14px 24px; }
.ed-intro { font-size: 13px; line-height: 1.6; color: #5a6072; background: #eef1ff;
  border: 1px solid #dfe3ff; border-radius: 12px; padding: 11px 13px; margin: 12px 0 18px; }
.ed-intro code { background: #fff; padding: 1px 5px; border-radius: 5px; font-size: 12px;
  color: #3a3f55; border: 1px solid #e3e6f2; }
.ed-intro b { color: #3a3f55; }

.ed-sec { margin-bottom: 18px; scroll-margin-top: 104px; }
.ed-sec h2 { font-size: 15px; margin: 0 0 10px; padding-left: 9px; border-left: 4px solid #5b6cff; }

.ed-card { background: #fff; border: 1px solid #eceef5; border-radius: 14px;
  padding: 12px 13px; margin-bottom: 12px; box-shadow: 0 3px 12px rgba(31,35,48,.04); }
.ed-card h4 { font-size: 14px; margin: 0 0 10px; color: #2b3045; }
.ed-card h4 small { color: #9aa0b4; font-weight: 500; font-size: 12px; }

.ed-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; flex-wrap: wrap; }
.ed-row-col { flex-direction: column; align-items: stretch; }
.ed-row-3 { gap: 6px; }
.ed-label { font-size: 12.5px; color: #6b7184; flex: 0 0 auto; min-width: 56px; }
.ed-unit { font-size: 12.5px; color: #9aa0b4; }
.ed-dash { color: #b6bccb; }

.ed-num, .ed-text, .ed-ta, .ed-card select {
  border: 1px solid #dde0ea; border-radius: 9px; padding: 8px 9px; font-size: 13.5px;
  background: #fff; color: #1f2330; outline: none; font-family: inherit; width: 100%; }
.ed-num:focus, .ed-text:focus, .ed-ta:focus, .ed-card select:focus {
  border-color: #5b6cff; box-shadow: 0 0 0 3px rgba(91,108,255,.12); }
.ed-num { width: 84px; flex: 0 0 auto; }
.ed-weight { width: 70px; }
.ed-ta { min-height: 56px; resize: vertical; line-height: 1.5; }
.ed-ta-sm { min-height: 40px; }
.ed-hint { font-size: 12px; color: #9aa0b4; margin: 4px 0 2px; }

.ed-plan { border: 1px dashed #e0e3f0; border-radius: 12px; padding: 10px 11px;
  margin: 10px 0; background: #fafbff; }
.ed-cbx { font-size: 12.5px; color: #6b7184; display: inline-flex; align-items: center; gap: 5px; }
.ed-cbx input { width: auto; }

.ed-plan .ed-row > .ed-text { flex: 1 1 120px; }
.ed-row-3 .ed-label { min-width: 48px; }
.ed-row-3 .ed-num { width: 70px; flex: 1 1 70px; }

.ed-pain-row { align-items: center; }
.ed-pain-row .ed-text { flex: 1 1 140px; }
.ed-del { padding: 6px 10px; line-height: 1; }
.ed-add { margin-top: 4px; }

/* 预览 JSON */
.ed-json-wrap { background: #1f2330; border-radius: 12px; padding: 0; }
.ed-json-wrap summary { color: #cfd3e6; font-size: 13px; padding: 11px 14px; cursor: pointer;
  list-style: none; user-select: none; }
.ed-json-wrap summary::-webkit-details-marker { display: none; }
.ed-json-wrap summary::before { content: "▸ "; }
.ed-json-wrap[open] summary::before { content: "▾ "; }
#ed-json { margin: 0; padding: 0 14px 14px; color: #b8f0c2; font-size: 11.5px; line-height: 1.55;
  max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-all; font-family:
  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#ed-json.invalid { color: #ffb3b3; }

/* 底部操作栏 */
.ed-actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid #eceef5; box-shadow: 0 -2px 12px rgba(31,35,48,.06); }
.ed-actionbar .btn { flex: 0 0 auto; }
.ed-status { font-size: 11.5px; color: #9aa0b4; margin-left: auto; text-align: right;
  flex: 1 1 auto; line-height: 1.35; }
.ed-status.ok { color: #1a9b54; }
.ed-status.err { color: #d8453a; }

@media (min-width: 720px) {
  .ed-row-3 { flex-wrap: nowrap; }
}
