.tv {
  --tv-muted: #6b7280;
  --tv-hover: rgba(127, 127, 127, 0.12);
  --tv-border: rgba(127, 127, 127, 0.25);
  --tv-stripe: rgba(127, 127, 127, 0.06);
  --tv-cols: 220px 110px 90px 90px 1fr;
  --tv-indent: 16;
  font:
    13px/1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  user-select: none;
  border: 1px solid var(--tv-border);
  border-radius: 6px;
  overflow: hidden;
  color: #fff;
}
.tv-header,
.tv-row {
  display: grid;
  grid-template-columns: var(--tv-cols);
  align-items: center;
  column-gap: 10px;
}
.tv-header {
  padding: 4px 8px;
  font-weight: 600;
  background: var(--tv-hover);
  border-bottom: 1px solid var(--tv-border);
  position: sticky;
  top: 0;
}
.tv-header > span:not(:first-child) {
  text-align: center;
}
.tv-cell-offset,
.tv-cell-hex,
.tv-cell-value {
  text-align: center;
}
.tv-header-cell {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.tv-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -5px;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
}
.tv-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: var(--tv-border);
}
.tv-resizer:hover::after,
.tv-resizer.tv-resizing::after {
  background: currentColor;
}
.tv-row {
  padding: 1px 8px;
  border-radius: 3px;
}
.tv-row.tv-row-alt {
  background: var(--tv-stripe);
}
.tv-row:hover {
  background: var(--tv-hover);
}
.tv-cell-name {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.tv-node.tv-expandable > .tv-row > .tv-cell-name {
  cursor: pointer;
}
.tv-indent {
  flex: none;
}
.tv-toggle,
.tv-spacer {
  flex: none;
  width: 14px;
  height: 14px;
}
.tv-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.tv-toggle::before {
  content: "";
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent currentColor;
  transition: transform 0.12s;
}
.tv-expanded > .tv-row > .tv-cell-name > .tv-toggle::before {
  transform: rotate(90deg);
}
.tv-name,
.tv-type,
.tv-cell-offset,
.tv-cell-hex,
.tv-cell-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.tv-name {
  font-weight: 600;
}
.tv-name-unknown {
  font-weight: normal !important;
  color: var(--tv-muted) !important;
}
.tv-type {
  color: var(--tv-muted);
}
.tv-cell-offset {
  color: var(--tv-muted);
}
.tv-placeholder {
  color: var(--tv-muted);
}
.tv-children {
  display: block;
}
.tv-node:not(.tv-expanded) > .tv-children {
  display: none;
}
.tv-more {
  padding: 1px 8px 1px calc(8px + var(--tv-indent));
}
.tv-more-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--tv-muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.tv-select,
.tv-checkbox {
  font: inherit;
}
.tv-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  text-align: right;
  border: 1px solid #6b7280;
  border-radius: 3px;
  background: transparent;
  padding: 0 4px;
  color: inherit;
}
.tv-input:disabled {
  color: var(--tv-muted);
}
.tv-input:not(:disabled):hover,
.tv-input:not(:disabled):focus {
  border-color: var(--tv-border);
}
.tv-input.tv-input-error {
  border-color: #dc2626;
}

.tv-input::-webkit-outer-spin-button,
.tv-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tv-input[type="number"] {
  -moz-appearance: textfield;
}
