.jv-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .jv-layout {
    /* 40% / 60% — Tree 側に横幅を寄せる */
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
  }
}

.jv-path-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.jv-path-block__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.jv-path {
  display: block;
  width: 100%;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  padding: 0.85rem 1rem;
  border: 2px solid #c4b5fd;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #f5f3ff 0%, #eef2ff 100%);
  color: #1e1b4b;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(76, 29, 149, 0.06);
}

.jv-path:hover:not(.jv-path--empty) {
  background: linear-gradient(180deg, #ede9fe 0%, #e0e7ff 100%);
  border-color: #8b5cf6;
}

.jv-path--empty {
  font-weight: 500;
  color: #94a3b8;
  border-color: #e2e8f0;
  background: #f8fafc;
  box-shadow: none;
  cursor: default;
}

.jv-path--copied {
  border-color: #34d399;
  background: #ecfdf5;
}

.jv-input {
  min-height: 14rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.jv-search-inline {
  position: relative;
}

.jv-search-inline__input {
  padding-right: 4.75rem;
}

.jv-search-inline__meta {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #64748b;
  pointer-events: none;
  white-space: nowrap;
}

.jv-tree-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: -0.15rem;
}

.jv-tree-wrap {
  border: 1px solid var(--sg-border, #e2e8f0);
  border-radius: 0.5rem;
  background: #fff;
  min-height: 14rem;
  max-height: min(70vh, 32rem);
  overflow: auto;
}

.jv-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  padding: 0 0.5rem;
  font-size: 12px;
  line-height: 1.35;
  border-bottom: 1px solid #f1f5f9;
}

.jv-row:hover {
  background: #f8fafc;
}

.jv-row--match {
  background: #fffbeb;
}

.jv-row--focus-flash {
  animation: jv-flash 0.9s ease-out;
}

@keyframes jv-flash {
  0% { background: #fde68a; }
  100% { background: #fffbeb; }
}

.jv-row__toggle {
  width: 1.1rem;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  font-size: 10px;
  line-height: 1;
}

.jv-row__toggle:disabled {
  opacity: 0;
  cursor: default;
}

.jv-row__key {
  color: #5b21b6;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.jv-row__preview {
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  cursor: copy;
  user-select: none;
}

.jv-row__preview:hover {
  background: #e2e8f0;
  border-radius: 0.2rem;
}

.jv-row--notice {
  background: #f8fafc;
}

.jv-row__notice {
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
  padding: 0.25rem 0;
}

.jv-row__type {
  flex-shrink: 0;
  font-size: 10px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0 0.35rem;
}

.jv-empty {
  padding: 1rem;
  font-size: 12px;
  color: #64748b;
}

.jv-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(0.5rem);
  z-index: 50;
  padding: 0.55rem 0.95rem;
  border-radius: 0.5rem;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.jv-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.jv-toast--error {
  background: #fff1f2;
  color: #9f1239;
  border-color: #fecdd3;
  box-shadow: 0 8px 24px rgba(159, 18, 57, 0.12);
}
