.jr-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.jr-toolbar-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jr-toolbar-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.jr-opt { display: flex; align-items: center; gap: 6px; min-width: 0; }
.jr-opt label { font-size: 0.8125rem; color: var(--color-text-muted); white-space: nowrap; }
.jr-opt select { min-height: 36px; padding-top: 0.3rem; padding-bottom: 0.3rem; font-size: 0.875rem; }
.jr-kbd { font-family: var(--font-mono); font-size: 0.6875rem; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.2); font-weight: 500; }
.jr-status { font-size: 0.8125rem; color: var(--color-text-muted); margin-left: 4px; }
.jr-status.is-busy { color: var(--color-warning); }
.jr-status.is-ok { color: var(--color-success); }
.jr-status.is-bad { color: var(--color-danger); }

.jr-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; align-items: stretch; }
.jr-work > .tb-card { margin-top: 0; }
.jr-pane { display: flex; flex-direction: column; min-width: 0; }
.jr-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.jr-pane-head .tb-card-title { margin: 0; }
.jr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--color-text-secondary); cursor: pointer; min-height: 32px; }

.jr-editor { display: flex; height: 460px; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-card); }
.jr-editor:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.jr-gutter { flex: none; min-width: 44px; padding: 12px 8px 12px 6px; text-align: right; white-space: pre; overflow: hidden; user-select: none; background: var(--color-surface); color: var(--color-text-muted); border-right: 1px solid var(--color-border); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }
textarea.jr-code { flex: 1; min-width: 0; height: 100%; border: 0; border-radius: 0; resize: none; padding: 12px; white-space: pre; overflow: auto; tab-size: 2; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; background: transparent; box-shadow: none; }
textarea.jr-code:focus { box-shadow: none; }

.jr-snippets { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.jr-snippet-save { display: flex; gap: 8px; }
.jr-snippet-save input { flex: 1; min-width: 0; }
.jr-snippet-list { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-snip { display: inline-flex; align-items: stretch; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); overflow: hidden; max-width: 100%; }
.jr-snip button { appearance: none; border: 0; background: transparent; color: var(--color-text-secondary); font: inherit; font-size: 0.8125rem; cursor: pointer; min-height: 32px; padding: 0 10px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-snip button:hover { color: var(--color-primary); }
.jr-snip button.jr-snip-del { padding: 0 10px 0 6px; color: var(--color-text-muted); flex: none; }
.jr-snip button.jr-snip-del:hover { color: var(--color-danger); }
.jr-snip.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); }

.jr-console { flex: 1; min-height: 0; height: 460px; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--color-surface); font-family: var(--font-mono); font-size: 13px; line-height: 1.55; }
.jr-line { display: flex; gap: 8px; padding: 4px 12px; border-bottom: 1px solid var(--color-border); border-left: 3px solid transparent; white-space: pre-wrap; word-break: break-word; }
.jr-line-body { flex: 1; min-width: 0; }
.jr-line-mark { flex: none; width: 1em; color: var(--color-text-muted); user-select: none; }
.jr-line.is-info { border-left-color: var(--color-info); }
.jr-line.is-warn { border-left-color: var(--color-warning); background: color-mix(in srgb, var(--color-warning) 10%, transparent); }
.jr-line.is-error { border-left-color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 9%, transparent); color: var(--color-danger); }
.jr-line.is-debug { color: var(--color-text-muted); }
.jr-line.is-input { color: var(--color-text-secondary); }
.jr-line.is-input .jr-line-mark { color: var(--color-primary); }
.jr-line.is-result .jr-line-mark { color: var(--color-text-muted); }
.jr-line.is-system { color: var(--color-text-muted); font-family: var(--font-sans); font-size: 0.8125rem; }
.jr-line-meta { flex: none; color: var(--color-text-muted); font-size: 11px; align-self: flex-start; }
.jr-console-empty { padding: 2rem 1rem; text-align: center; color: var(--color-text-muted); font-family: var(--font-sans); font-size: 0.875rem; }

.jv-string { color: var(--color-secondary); }
.jv-number, .jv-bigint, .jv-boolean { color: var(--color-info); }
.jv-null, .jv-undefined { color: var(--color-text-muted); }
.jv-symbol { color: var(--color-hot); }
.jv-function { color: var(--color-text-secondary); font-style: italic; }
.jv-key { color: var(--color-primary); }
.jv-cls { color: var(--color-text-muted); }
.jv-error { color: var(--color-danger); }
details.jv-tree { display: inline-block; vertical-align: top; max-width: 100%; }
details.jv-tree > summary { cursor: pointer; list-style: none; display: inline-block; }
details.jv-tree > summary::-webkit-details-marker { display: none; }
details.jv-tree > summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--color-text-muted); }
details.jv-tree[open] > summary::before { content: '▾'; }
.jv-children { padding-left: 1.3em; border-left: 1px dashed var(--color-border-hover); margin-left: 0.3em; }
.jv-children > div { white-space: pre-wrap; }
.jr-table-wrap { max-width: 100%; overflow-x: auto; margin: 2px 0; }
.jr-table-wrap table { border-collapse: collapse; background: var(--color-bg-card); font-size: 12px; }
.jr-table-wrap th, .jr-table-wrap td { border: 1px solid var(--color-border); padding: 3px 10px; text-align: left; white-space: nowrap; }
.jr-table-wrap th { background: var(--color-surface); color: var(--color-text-secondary); }

.jr-repl { display: flex; align-items: center; gap: 8px; border: 1px solid var(--color-border); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); padding: 6px 8px 6px 12px; background: var(--color-bg-card); }
.jr-prompt { color: var(--color-primary); font-family: var(--font-mono); font-weight: 700; }
.jr-repl input { flex: 1; min-width: 0; border: 0; box-shadow: none; background: transparent; font-family: var(--font-mono); font-size: 13px; padding: 4px 0; min-height: 34px; }
.jr-repl input:focus { box-shadow: none; }
.jr-preview { margin-top: 12px; }
.jr-frame-host iframe { width: 100%; height: 160px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; margin-top: 6px; display: block; }
.jr-frame-host iframe.is-hidden { display: none; }

.jr-notes summary { cursor: pointer; font-weight: 600; font-size: 0.9375rem; }
.jr-notes ul { margin: 0.75rem 0 0; padding-left: 1.3rem; color: var(--color-text-secondary); font-size: 0.875rem; display: flex; flex-direction: column; gap: 6px; }
.jr-notes code { background: var(--color-surface); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

@media (max-width: 900px) {
    .jr-work { grid-template-columns: minmax(0, 1fr); }
    .jr-editor { height: 320px; }
    .jr-console { height: 300px; flex: none; }
}
@media (max-width: 640px) {
    .jr-toolbar-main { width: 100%; }
    .jr-toolbar-main .tb-btn { flex: 1; }
    .jr-status { flex-basis: 100%; margin-left: 0; }
    .jr-kbd { display: none; }
    .jr-toolbar-opts { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .jr-opt label { width: 4.5em; flex: none; }
    .jr-opt select { flex: 1; min-width: 0; min-height: 40px; }
    .jr-editor { height: 280px; }
    .jr-gutter { min-width: 34px; padding-left: 4px; padding-right: 6px; }
    .jr-repl input { font-size: 16px; }
}
