.json-drop-zone {
  border: 2px dashed #adb5bd;
  border-radius: .5rem;
  padding: 1.25rem;
  text-align: center;
  color: #6c757d;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.json-drop-zone.drag-over {
  border-color: #198754;
  background: #e8f3ec;
  color: #146c43;
}
.json-stat {
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: .75rem 1rem;
  background: #fff;
  height: 100%;
}
.json-stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.json-stat-label {
  font-size: .85rem;
  color: #6c757d;
}
.json-search {
  max-width: 360px;
}
.json-tree-container {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  background: #fff;
}
.json-tree {
  min-width: max-content;
  padding: .65rem .75rem;
  font-family: var(--bs-font-monospace);
  font-size: .9rem;
}
.json-branch {
  margin-left: 1.15rem;
  border-left: 1px solid #dee2e6;
}
.json-branch > summary {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .45rem;
  min-height: 1.8rem;
  padding: .15rem .35rem .15rem .6rem;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.json-branch > summary::-webkit-details-marker {
  display: none;
}
.json-branch > summary::before {
  content: "";
  position: absolute;
  left: -.34rem;
  top: .66rem;
  width: .38rem;
  border-top: 1px solid #adb5bd;
}
.json-branch > summary::after {
  content: "";
  order: -1;
  width: 0;
  height: 0;
  border-top: .28rem solid transparent;
  border-bottom: .28rem solid transparent;
  border-left: .38rem solid #6c757d;
  margin-left: -.48rem;
  margin-right: .1rem;
  transform: translateY(.08rem);
  transition: transform .12s;
}
.json-branch[open] > summary::after {
  transform: rotate(90deg) translateX(.08rem);
}
.json-children {
  padding: .05rem 0 .2rem .15rem;
}
.json-leaf {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  min-height: 1.8rem;
  margin-left: 1.15rem;
  padding: .15rem .35rem .15rem .6rem;
  border-left: 1px solid #dee2e6;
  white-space: pre;
}
.json-root-label,
.json-key {
  color: #155e75;
  font-weight: 600;
}
.json-key-colon {
  color: #6c757d;
  margin-left: -.4rem;
}
.json-type {
  font-family: var(--bs-font-sans-serif);
  font-size: .65rem;
  font-weight: 500;
}
.json-type-object { color: #055160; background: #cff4fc; }
.json-type-array { color: #146c43; background: #d1e7dd; }
.json-type-string { color: #664d03; background: #fff3cd; }
.json-type-number { color: #084298; background: #cfe2ff; }
.json-type-boolean { color: #6f42c1; background: #e2d9f3; }
.json-type-null { color: #41464b; background: #e2e3e5; }
.json-item-count,
.json-empty {
  color: #6c757d;
  font-family: var(--bs-font-sans-serif);
  font-size: .78rem;
}
.json-value-string { color: #8a5a00; }
.json-value-number { color: #0a58ca; }
.json-value-boolean { color: #6f42c1; font-weight: 600; }
.json-value-null { color: #6c757d; font-style: italic; }
.json-node-match > summary,
.json-node-match.json-leaf {
  background: #fff3cd;
  border-radius: .2rem;
}
.json-copy-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 1rem);
  background: #198754;
  color: #fff;
  padding: .5rem 1rem;
  border-radius: .5rem;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 1080;
}
.json-copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 575.98px) {
  .json-search { max-width: none; flex-basis: 100%; }
  .json-tree { font-size: .82rem; }
}