.dt-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990; height: 42vh; min-height: 140px;
  display: none; flex-direction: column; background: #0d0d0f; color: #d4d4d8; border-top: 1px solid #2a2a30;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; box-shadow: 0 -12px 32px rgba(0,0,0,0.45);
}
.dt-panel.open { display: flex; }
.dt-panel.dragging { user-select: none; }
.dt-grip { height: 6px; cursor: ns-resize; flex-shrink: 0; background: transparent; }
.dt-grip:hover, .dt-panel.dragging .dt-grip { background: rgba(255,255,255,0.08); }
.dt-head { display: flex; align-items: center; gap: 8px; padding: 0 8px 6px; border-bottom: 1px solid #222228; flex-shrink: 0; flex-wrap: wrap; }
.dt-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.dt-tab { border: none; background: none; color: #a1a1aa; padding: 6px 10px; border-radius: 6px; cursor: pointer; font: 600 12px system-ui, sans-serif; }
.dt-tab:hover { background: #1c1c21; color: #fff; }
.dt-tab.on { background: #26262d; color: #fff; }
.dt-tab i { margin-right: 4px; opacity: 0.8; }
.dt-head-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.dt-select, .dt-input { background: #16161a; color: #e4e4e7; border: 1px solid #2a2a30; border-radius: 6px; padding: 4px 8px; font: 12px system-ui, sans-serif; outline: none; }
.dt-input:focus, .dt-select:focus { border-color: #52525b; }
.dt-icon { width: 26px; height: 26px; border: none; border-radius: 6px; background: none; color: #a1a1aa; cursor: pointer; }
.dt-icon:hover { background: #26262d; color: #fff; }
.dt-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.dt-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #1c1c21; flex-shrink: 0; flex-wrap: wrap; }
.dt-grow { flex: 1; }
.dt-muted { color: #71717a; font-family: system-ui, sans-serif; }
.dt-chip { border: 1px solid #2a2a30; background: #16161a; color: #d4d4d8; border-radius: 999px; padding: 3px 10px; cursor: pointer; font: 12px system-ui, sans-serif; }
.dt-chip:hover { background: #222228; }
.dt-chip.on { background: #e4e4e7; color: #0d0d0f; border-color: #e4e4e7; }
.dt-chip.danger { color: #fca5a5; border-color: rgba(239,68,68,0.4); }
.dt-empty { padding: 16px; color: #71717a; font-family: system-ui, sans-serif; }
.dt-section { padding: 10px 8px 4px; color: #a1a1aa; font: 700 11px system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.05em; }

.dt-console { flex: 1; overflow-y: auto; }
.dt-log { display: flex; gap: 8px; align-items: flex-start; padding: 3px 10px; border-bottom: 1px solid #17171b; white-space: pre-wrap; overflow-wrap: anywhere; }
.dt-log-icon { margin-top: 2px; width: 12px; flex-shrink: 0; }
.dt-log-text { flex: 1; min-width: 0; }
.dt-log-src { color: #52525b; font-size: 10px; flex-shrink: 0; }
.dt-log.warn { background: rgba(250, 204, 21, 0.07); color: #fde68a; }
.dt-log.error { background: rgba(239, 68, 68, 0.09); color: #fca5a5; }
.dt-log.info .dt-log-icon { color: #60a5fa; }
.dt-log.input { color: #93c5fd; }
.dt-log.result { color: #a7f3d0; }
.dt-eval { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px; border-top: 1px solid #222228; flex-shrink: 0; }
.dt-prompt { color: #60a5fa; font-weight: 700; line-height: 22px; }
.dt-eval-input { flex: 1; resize: none; border: none; outline: none; background: none; color: #f4f4f5; font: inherit; line-height: 22px; max-height: 140px; }

.dt-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.dt-tree { overflow: auto; padding: 4px 0; border-right: 1px solid #1c1c21; }
.dt-node-row { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; cursor: default; padding-right: 8px; }
.dt-node-row:hover { background: #18181d; }
.dt-node-row.sel { background: #1e293b; }
.dt-node-toggle { width: 12px; display: inline-block; color: #71717a; cursor: pointer; flex-shrink: 0; }
.dt-tag-name { color: #7dd3fc; }
.dt-attr-name { color: #fdba74; }
.dt-attr-value { color: #a5b4fc; }
.dt-node-text { color: #d4d4d8; }
.dt-details { overflow: auto; padding: 8px 10px; }
.dt-detail-title { color: #7dd3fc; font-weight: 700; margin-bottom: 8px; overflow-wrap: anywhere; }
.dt-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; }
.dt-kv.wide { padding: 10px; overflow: auto; }
.dt-k { color: #fdba74; }
.dt-v { color: #e4e4e7; overflow-wrap: anywhere; }
.dt-highlight { position: fixed; z-index: 99989; pointer-events: none; display: none; background: rgba(96, 165, 250, 0.25); outline: 1px solid #60a5fa; }
.dt-highlight-label { position: absolute; left: 0; top: -20px; background: #1e3a8a; color: #fff; font: 11px ui-monospace, monospace; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }

.dt-net { flex: 1; overflow: auto; }
.dt-net-row { display: grid; grid-template-columns: minmax(0, 3fr) 90px 60px 80px 70px 60px; gap: 8px; padding: 3px 10px; border-bottom: 1px solid #17171b; white-space: nowrap; }
.dt-net-row span { overflow: hidden; text-overflow: ellipsis; }
.dt-net-row.head { position: sticky; top: 0; background: #121216; color: #a1a1aa; font: 700 11px system-ui, sans-serif; }
.dt-net-row.bad { color: #fca5a5; }
.dt-net-name { color: #e4e4e7; }

.dt-store { overflow: auto; }
.dt-store-row { display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 2fr) auto; gap: 10px; align-items: start; padding: 4px 10px; border-bottom: 1px solid #17171b; }
.dt-store-key { color: #fdba74; overflow-wrap: anywhere; }
.dt-store-val { color: #e4e4e7; overflow-wrap: anywhere; cursor: text; max-height: 90px; overflow: hidden; }
.dt-store-edit { min-height: 80px; width: 100%; font-family: ui-monospace, monospace; }
.dt-body > .dt-store { flex: 1; }

#code-btn.on { background: var(--c-accent) !important; color: var(--c-bg) !important; }
#code-btn.dt-has-errors { position: relative; }
#code-btn.dt-has-errors::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
@media (max-width: 700px) {
  .dt-split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .dt-tree { border-right: none; border-bottom: 1px solid #1c1c21; }
  .dt-net-row { grid-template-columns: minmax(0, 2fr) 60px 50px 60px; }
  .dt-net-row span:nth-child(5), .dt-net-row span:nth-child(6) { display: none; }
}
