.catalog-navigation { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
.catalog-sidebar .sidebar-footer { flex: 0 0 auto; }
.catalog-content:has(#developer-view:not([hidden])), .catalog-content:has(.naming-view:not([hidden])) { padding: calc(var(--header-height) + 8px) 8px 8px; }
.dev-workspace { background: var(--surface); min-width: 0; border: 1px solid var(--line); }
.dev-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.dev-settings, .dev-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.dev-settings > label, .dev-time-options > label, .dev-batch-heading > label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; font-size: 12px; }
.dev-settings .form-control, .dev-settings .form-select, .dev-crypto-settings .form-control, .dev-crypto-settings .form-select { font-size: 12px; min-height: 32px; }
.dev-settings .form-select { width: auto; max-width: 200px; }
.dev-settings input[type="text"], #dev-table { width: 140px; }
.dev-check { min-height: 32px; }
.dev-check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.dev-action-slot { margin-left: auto; flex: 0 0 auto; }
.dev-actions { gap: 2px; flex: 0 0 auto; }
.dev-action, .dev-copy { width: 34px; height: 34px; flex-basis: 34px; }
.dev-copy { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; color: var(--muted); }
.dev-copy:disabled { opacity: .35; }
.dev-copy:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dev-copy.copied { color: var(--green); border-color: var(--green); }
.dev-segmented { display: inline-flex; align-items: stretch; background: var(--subtle); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px; gap: 2px; }
.dev-segmented button { border: 0; border-radius: 3px; background: transparent; color: var(--muted); padding: 5px 9px; min-height: 28px; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.dev-segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dev-status { color: var(--muted); overflow-wrap: anywhere; font: 11px/1.6 var(--bs-body-font-family); margin-right: auto; }
.dev-status.is-error { color: var(--red); }
.dev-result-footer:has(.is-error) { background: var(--red-soft); }
.dev-editor-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-width: 0; }
#dev-editors { height: max(580px, calc(100dvh - var(--header-height) - 18px)); }
.dev-editor { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.dev-input-editor { border-right: 1px solid var(--line-strong); }
.dev-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 4px 8px; min-height: 52px; flex: 0 0 auto; border-bottom: 1px solid var(--line); background: var(--subtle); }
.dev-editor-header > label { font-size: 13px; font-weight: 600; margin: 0; }
.dev-editor-header > span { font-size: 11px; color: var(--faint); white-space: nowrap; }
.dev-output-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 2px; min-width: 0; margin-left: auto; }
.dev-output-actions .dev-copy { width: 44px; height: 44px; flex-basis: 44px; margin-left: 2px; }
.dev-code-input { width: 100%; min-width: 0; min-height: 440px; height: max(440px, calc(100vh - 390px)); resize: vertical; border: 0; outline: none; border-radius: 0; background: var(--surface); color: var(--ink); padding: 18px 20px; tab-size: 2; font: 13px/1.8 Consolas,"Cascadia Code",monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.dev-code-input:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); outline: 0; }
.dev-code-input::placeholder { color: var(--faint); }
.dev-code-output { background: var(--subtle); }
.dev-action[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.dev-code-editor { --syntax-key: #075ca8; --syntax-string: #16723c; --syntax-number: #a6540a; --syntax-keyword: #8a267a; --syntax-comment: #707070; --syntax-tag: #256e78; width: 100%; min-width: 0; height: 0; min-height: 240px; flex: 1 1 0; overflow: hidden; background: var(--surface); }
:root[data-theme="dark"] .dev-code-editor { --syntax-key: #8ac1fa; --syntax-string: #85cf96; --syntax-number: #eabe8a; --syntax-keyword: #e8a0cb; --syntax-comment: #a0a0a0; --syntax-tag: #7bd1d7; }
.dev-code-editor.is-readonly { background: var(--subtle); }
.dev-code-editor .cm-editor { height: 100%; color: var(--ink); background: transparent; font: 13px/1.8 Consolas,"Cascadia Code",monospace; }
.dev-code-editor .cm-editor.cm-focused { outline: 0; box-shadow: inset 0 0 0 2px var(--accent-soft); }
.dev-code-editor .cm-scroller { overflow: auto; font-family: inherit; line-height: 1.8; overscroll-behavior: contain; }
.dev-code-editor .cm-content { padding: 14px 12px; caret-color: var(--ink); }
.dev-code-editor .cm-content:focus-visible { outline: 0; }
.dev-code-editor .cm-line { padding: 0 2px; }
.dev-code-editor .cm-hanging-indent { --wrap-indent: min(var(--line-indent), 40%); padding-left: calc(2px + var(--wrap-indent)); text-indent: calc(-1 * var(--wrap-indent)); }
.dev-code-editor .cm-hanging-indent.cm-indent-markers::before { right: auto; width: min(var(--line-indent), 40%); }
.dev-code-editor .cm-gutters { padding: 0; border-right: 1px solid var(--line); background: var(--subtle); color: var(--syntax-comment); user-select: none; }
.dev-code-editor .cm-lineNumbers .cm-gutterElement { padding: 0 8px 0 10px; min-width: 36px; font-size: 11px; }
.dev-code-editor .cm-foldGutter .cm-gutterElement { width: 18px; padding: 0 2px; cursor: pointer; }
.dev-code-editor .cm-activeLine, .dev-code-editor .cm-activeLineGutter { background: var(--accent-soft); }
.dev-code-editor .cm-activeLineGutter { color: var(--ink); }
.dev-code-editor .cm-cursor { border-left-color: var(--ink); }
.dev-code-editor .cm-selectionBackground { background: rgba(96,150,215,.22) !important; }
.dev-code-editor .cm-selectionMatch { background: rgba(96,150,215,.14); }
.dev-code-editor .cm-matchingBracket { color: var(--ink) !important; background: var(--accent-soft) !important; outline: 1px solid var(--accent); border-radius: 2px; }
.dev-code-editor .cm-nonmatchingBracket { color: var(--red); text-decoration: underline wavy; }
.dev-code-editor .cm-foldPlaceholder { border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); color: var(--muted); padding: 0 5px; }
.dev-code-editor .cm-placeholder { color: var(--faint); }
.dev-code-editor .tok-propertyName, .dev-code-editor .tok-variableName2 { color: var(--syntax-key); }
.dev-code-editor .tok-string, .dev-code-editor .tok-inserted { color: var(--syntax-string); }
.dev-code-editor .tok-number, .dev-code-editor .tok-literal { color: var(--syntax-number); }
.dev-code-editor .tok-keyword, .dev-code-editor .tok-bool, .dev-code-editor .tok-atom { color: var(--syntax-keyword); }
.dev-code-editor .tok-typeName, .dev-code-editor .tok-className, .dev-code-editor .tok-labelName { color: var(--syntax-tag); }
.dev-code-editor .tok-comment, .dev-code-editor .tok-meta { color: var(--syntax-comment); }
.dev-code-editor .tok-string2, .dev-code-editor .tok-operator { color: var(--syntax-tag); }
.dev-code-editor .tok-invalid, .dev-code-editor .tok-deleted { color: var(--red); }
.dev-code-editor .cm-panels { background: var(--subtle); color: var(--ink); border-color: var(--line); }
.dev-code-editor .cm-search { padding: 8px 32px 8px 10px; font: 12px/1.8 var(--bs-body-font-family); }
.dev-code-editor .cm-textfield { width: 150px; max-width: 100%; min-height: 30px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); padding: 3px 6px; font: inherit; }
.dev-code-editor .cm-button { min-height: 30px; padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; }
.dev-code-editor .cm-panel.cm-search label { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; }
.dev-code-editor .cm-search input[type="checkbox"] { accent-color: var(--accent); }
.dev-code-editor .cm-search button[name="close"] { width: 28px; height: 30px; color: var(--muted); font-size: 20px; }
.dev-code-editor .cm-searchMatch { background: rgba(230,178,57,.23) !important; }
.dev-code-editor .cm-searchMatch-selected { background: rgba(230,178,57,.48) !important; outline: 1px solid var(--amber); }
.dev-editor-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; flex: 0 0 auto; min-height: 30px; padding: 5px 12px; color: var(--faint); border-top: 1px solid var(--line); font: 11px/1.5 Consolas,monospace; }
.dev-crypto-options { border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.dev-crypto-options > summary { list-style: none; display: flex; align-items: center; gap: 6px; width: fit-content; padding: 7px 12px; font-size: 12px; color: var(--muted); cursor: pointer; }
.dev-crypto-options > summary::-webkit-details-marker { display: none; }
.dev-crypto-options > summary .ui-icon:last-child { width: 12px; height: 12px; flex-basis: 12px; }
.dev-crypto-options[open] > summary .ui-icon:last-child { transform: rotate(180deg); }
.dev-crypto-settings { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; padding: 4px 12px 10px; }
.dev-crypto-settings > label { display: grid; gap: 6px; font-size: 12px; min-width: 0; max-width: 100%; }
.dev-key-field { flex: 1 1 180px; }
.dev-secret-input { display: flex; align-items: center; gap: 4px; min-width: 0; }
.dev-secret-input input { width: 100%; min-width: 0; font-family: Consolas,monospace; }
.dev-crypto-settings .form-select { width: auto; }
.dev-security-note { margin: 0; padding: 4px 12px 10px; color: var(--amber); font-size: 11px; line-height: 1.7; }
.dev-tree-wrap { min-height: 240px; flex: 1 1 0; display: flex; flex-direction: column; }
.dev-tree-toolbar { display: flex; gap: 4px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dev-tree-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: var(--faint); }
.dev-tree-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 12px; }
.dev-tree { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; font: 12px/1.9 Consolas,monospace; }
.dev-tree details { padding-left: 12px; border-left: 1px solid var(--line); margin: 4px 0 4px 2px; }
.dev-tree details > summary { cursor: pointer; overflow-wrap: anywhere; }
.dev-tree button { border: 0; background: none; padding: 3px 4px; text-align: left; color: var(--ink); font: inherit; border-radius: 3px; max-width: 100%; overflow-wrap: anywhere; white-space: pre-wrap; }
.dev-tree button:hover { background: var(--accent-soft); }
.dev-tree .dev-tree-scalar { padding-left: 12px; }
.dev-tree mark { background: var(--accent-soft); color: var(--accent); padding: 0; }
.dev-tree-path { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 4px 12px; color: var(--muted); font: 11px/1.5 Consolas,monospace; overflow-wrap: anywhere; }
.dev-tree-path > span { min-width: 0; }
.dev-url-table-wrap { overflow: auto; min-height: 240px; flex: 1 1 0; }
.dev-url-table { width: 100%; font-size: 12px; border-collapse: collapse; table-layout: fixed; }
.dev-url-table th { color: var(--muted); background: var(--subtle); font-weight: 500; }
.dev-url-table th, .dev-url-table td { border-bottom: 1px solid var(--line); padding: 10px 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.dev-url-table th:first-child { width: 32%; }
.dev-url-table th:last-child { width: 68px; }
.dev-url-table td:last-child { padding: 6px; }
.dev-html-preview { border: 0; width: 100%; min-height: 240px; flex: 1 1 0; background: #fff; }
.dev-time-toolbar { display: flex; align-items: center; gap: 8px; padding: 4px 12px; min-height: 44px; border-bottom: 1px solid var(--line); }
.dev-time-toolbar h1 { margin: 0; font-size: 13px; font-weight: 600; }
.naming-view .naming-input-band { padding-top: 16px; }
.dev-time { min-width: 0; }
.dev-clock { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.dev-small-label { color: var(--muted); font-size: 12px; }
.dev-clock-value { display: flex; align-items: baseline; gap: 12px; margin: 4px 0; flex-wrap: wrap; }
.dev-clock-value output { font: 28px/1.5 Consolas,monospace; font-weight: 600; overflow-wrap: anywhere; }
.dev-clock-value > span, #dev-clock-date { font-size: 12px; color: var(--muted); }
.dev-clock-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dev-clock-actions .form-select { width: auto; }
.dev-time-options { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.dev-time-options .form-select { width: min(100%,270px); }
.dev-time-row { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.dev-time h2 { margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.dev-time-fields { display: flex; align-items: end; gap: 12px; }
.dev-time-fields > label { display: grid; gap: 8px; font-size: 12px; min-width: 0; }
.dev-time-source, .dev-time-result { flex: 1 1 200px; }
.dev-time-fields input { font: 13px/1.7 Consolas,monospace; width: 100%; min-width: 0; min-height: 40px; }
.dev-time-fields .form-select { min-height: 40px; width: 120px; }
.dev-transform-arrow { align-self: center; color: var(--faint); margin-top: 22px; }
.dev-field-error { margin: 8px 0 0; min-height: 17px; color: var(--red); font-size: 12px; line-height: 1.6; }
.dev-time-batch { padding: 22px 24px; }
.dev-batch-heading { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.dev-batch-heading h2 { margin: 0 auto 0 0; }
.dev-batch-heading .form-select { width: auto; font-size: 12px; }
.dev-time-batch .dev-editor-grid { gap: 16px; }
.dev-time-batch .dev-batch-editor { min-width: 0; display: grid; gap: 8px; font-size: 12px; }
.dev-time-batch .dev-code-input { height: 220px; min-height: 220px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 12px; }
.dev-time-batch .dev-code-editor { height: 220px; min-height: 220px; border: 1px solid var(--line-strong); border-radius: 5px; }
.dev-workspace.is-expanded { position: fixed; z-index: 95; inset: 12px; overflow: auto; box-shadow: 0 8px 40px rgba(0,0,0,.15); }
.dev-workspace.is-expanded #dev-editors { height: calc(100dvh - 26px); }
body.dev-expanded { overflow: hidden; }
@media (max-width: 1200px) {
    .dev-editor-header { flex-wrap: wrap; }
    .dev-output-actions { margin-left: auto; }
    .dev-view-toggle span { display: none; }
    .dev-settings { gap: 4px 8px; }
}
@media (max-width: 960px) {
    .dev-editor-grid { grid-template-columns: minmax(0,1fr); }
    #dev-editors { height: auto; }
    .dev-input-editor { border-right: 0; border-bottom: 1px solid var(--line-strong); }
    .dev-code-input { height: 300px; min-height: 300px; }
    .dev-code-editor { height: 360px; min-height: 360px; flex: 0 0 360px; }
    .dev-tree-wrap, .dev-url-table-wrap { height: 420px; max-height: 420px; flex: 0 0 420px; }
    .dev-html-preview { height: 360px; flex: 0 0 360px; }
    .dev-workspace.is-expanded #dev-editors { height: auto; }
    .dev-time-fields { flex-wrap: wrap; }
    .dev-transform-arrow { display: none; }
    .dev-time-source { flex-basis: calc(100% - 150px); }
    .dev-time-result { flex-basis: calc(100% - 70px); }
    .dev-clock-value output { font-size: 24px; }
}
@media (max-width: 720px) {
    .dev-toolbar { gap: 4px 8px; }
    .dev-toolbar > .dev-settings { gap: 6px 10px; }
    .dev-settings > label { font-size: 11px; gap: 6px; }
    .dev-code-input { padding: 14px; }
    .dev-view-toggle span { display: inline; }
    .dev-crypto-settings { gap: 8px 12px; }
    .dev-crypto-settings .dev-key-field { flex-basis: 100%; }
    .dev-crypto-settings > label { flex: 1 1 auto; }
    .dev-output-actions { gap: 2px; }
    .dev-output-actions .dev-action { width: 32px; height: 36px; flex-basis: 32px; }
    .dev-view-toggle button { padding: 5px 6px; }
    .dev-time-row, .dev-time-batch, .dev-time-options { padding: 16px 12px; }
    .dev-clock { align-items: start; flex-direction: column; padding: 16px 12px; gap: 12px; }
    .dev-clock-actions { width: 100%; }
    .dev-clock-actions .form-select { margin-right: auto; }
    .dev-clock-value output { font-size: 24px; }
    .dev-clock-value { gap: 8px; }
    .dev-time-fields { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: end; }
    .dev-time-fields > label { grid-column: 1 / -1; }
    .dev-time-fields > label:not(.dev-time-source):not(.dev-time-result) { max-width: 160px; }
    .dev-time-fields .form-select { width: 100%; }
    .dev-time-fields > .dev-time-result { grid-column: 1; }
    .dev-time-fields .dev-copy { grid-column: 2; grid-row: 3; margin-bottom: 0; width: 44px; height: 44px; }
    .dev-time-options > label { width: 100%; }
    .dev-batch-heading { gap: 12px 8px; }
    .dev-batch-heading > h2 { width: calc(100% - 56px); order: -2; }
    .dev-batch-heading > .dev-copy { order: -1; }
    .dev-batch-heading > label { white-space: normal; }
    .dev-workspace.is-expanded { inset: 0; }
    .dev-workspace.is-expanded #dev-editors { height: auto; }
}
