/* ======================================================================== */
/* Combo List UI (manual-first authoring) */
/* ======================================================================== */
#comboView.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px var(--page-pad) 24px;
    overflow: hidden;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

.combo-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.combo-header {
    display: grid;
    grid-template-columns: 220px 1fr minmax(420px, 2fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 12px;
    background: #0f0f0f;
}

.combo-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.combo-char-btn {
    border: 1px solid var(--border-light);
    background: #111;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
}

.combo-char-btn img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.combo-mode-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.combo-mode-btn {
    border: 1px solid var(--border-light);
    background: #141414;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
}

.combo-mode-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(249, 115, 6, 0.35);
}

.combo-mode-btn img {
    width: 90px;
    height: 22px;
    object-fit: contain;
}

.combo-header-title h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 0.06em;
}

.combo-header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.combo-search {
    display: flex;
    gap: 6px;
    width: 100%;
    justify-content: flex-end;
}

.combo-search input {
    width: 220px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #0c0c0c;
    color: var(--text-main);
    padding: 6px 10px;
}

.combo-search button {
    border: 1px solid var(--border-light);
    background: #151515;
    color: var(--text-main);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

.combo-header-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-ghost,
.btn-primary {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ghost:hover,
.btn-primary:hover {
    border-color: var(--accent);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #f97306, #ffb347);
    color: #0d0d0d;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(249, 115, 6, 0.35);
}

.combo-list-card,
.combo-editor-card {
    background: #0f0f0f;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.combo-table-card {
    background: #0f0f0f;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.combo-table-wrap {
    overflow: auto;
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.combo-draft-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1200px;
    color: var(--text-main);
    font-size: 12px;
}

.combo-draft-table thead th {
    background: linear-gradient(135deg, #1f1f1f, #111);
    border: 1px solid var(--border-light);
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
    position: sticky;
    top: 0;
    z-index: 2;
}

.combo-draft-table tbody td {
    border: 1px solid var(--border-light);
    padding: 8px 6px;
    vertical-align: middle;
    background: #0d0d0d;
}

.combo-draft-table tbody tr:nth-child(odd) td {
    background: #111;
}

.combo-draft-table tbody tr.selected td {
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.16), rgba(249, 115, 6, 0.04));
    border-color: var(--accent);
}

.combo-draft-table .sticky-col {
    position: sticky;
    left: 0;
    background: #151515;
    z-index: 3;
    min-width: 220px;
}

.cell-input,
.combo-draft-table select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #0f0f0f;
    color: var(--text-main);
    padding: 4px 6px;
}

.cell-input:focus,
.combo-draft-table select:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.cmd-cell {
    min-width: 180px;
    background: #0f0f0f;
    border: 1px dashed var(--border-light);
    border-radius: 6px;
    padding: 6px;
}

.cmd-cell:focus-visible {
    outline: 1px solid var(--accent);
}

.cmd-cell.cmd-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(249, 115, 6, 0.4);
}

.combo-cell-title {
    font-weight: 700;
    margin: 0;
}

.combo-cell-sub {
    color: var(--text-dim);
    font-size: 11px;
}

.combo-note {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.combo-head-row-1 th {
    font-size: 13px;
    letter-spacing: 0.06em;
}

.combo-head-row-2 th,
.combo-head-row-3 th {
    font-size: 11px;
    letter-spacing: 0.03em;
}

.combo-table-wrap::-webkit-scrollbar {
    height: 10px;
}

.combo-table-wrap::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 20px;
}

.command-input-bar {
    margin-top: 8px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    background: #0f0f0f;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.command-input-group input {
    flex: 1 1 auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #0c0c0c;
    color: var(--text-main);
    padding: 8px 10px;
}

.command-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.command-buttons button,
.command-shortcuts button {
    border: 1px solid var(--border-light);
    background: #151515;
    color: var(--text-main);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

.command-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.command-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-dim);
}

.combo-bottom {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    align-items: start;
}

.combo-customize {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    background: #0f0f0f;
    text-align: center;
}

.combo-customize p {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

.combo-customize button {
    width: 100%;
    margin-top: 6px;
}

.combo-topbar .input-legend {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 10px;
    background: #0f0f0f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.legend-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: var(--text-main);
}

.legend-header,
.legend-footer {
    font-weight: 700;
}

.legend-row span {
    display: inline-flex;
    justify-content: center;
    padding: 6px 4px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #151515;
}

.combo-actions {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    background: #0f0f0f;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-box {
    display: flex;
    gap: 6px;
}

.search-box input {
    flex: 1 1 auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #0c0c0c;
    color: var(--text-main);
    padding: 8px 10px;
}

.search-box button {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: #151515;
    color: var(--text-main);
    padding: 8px 12px;
    cursor: pointer;
}

.action-buttons,
.mode-buttons {
    display: flex;
    gap: 8px;
}

.input-mode {
    border-top: 1px solid var(--border-light);
    padding-top: 6px;
}

.input-mode-title {
    margin: 4px 0;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

.input-mode-buttons {
    display: flex;
    gap: 6px;
}

.pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
}

.combo-editor-card {
    padding: 14px;
    gap: 10px;
}

.combo-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.field-grid label,
.result-grid label,
.notes-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-dim);
}

.field-grid input,
.field-grid select,
.result-grid input,
.notes-block textarea {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: #0c0c0c;
    color: var(--text-main);
    padding: 8px 10px;
    font-size: 14px;
}

.notes-block textarea {
    min-height: 70px;
}

@media (max-width: 1100px) {
    #comboView.active {
        padding: 10px 12px 20px;
    }

    .combo-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .combo-header-actions {
        align-items: center;
    }

    .combo-bottom {
        grid-template-columns: 1fr;
    }

    .combo-table-wrap {
        overflow-x: auto;
    }
}

/* ======================================================================== */
/* Combo List UI (context index.html layout) */
/* ======================================================================== */
#comboView {
    position: relative;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #0f0f0f;
    font-family: 'Noto Sans JP', sans-serif;
    --ui-cell-size: 38px;
    --ui-auto-scale: 0;
    --ui-dir-cell-size: 39px;
    --ui-dir-icon-row-height: 39px;
    --ui-dir-cell-height: 39px;
    --ui-icon-row-height: 31px;
    --ui-desc-row-height: 20px;
    --shortcut-cell-size: 150px;
    --combo-col-size: 60px;
    --combo-ui-reserve: 30px;
    --command-font-size: 13px;
    --fat-frame-meter-startup: #17a075;
    --fat-frame-meter-active: #ae165e;
    --fat-frame-meter-recovery: #0d6898;
    --fat-frame-meter-invalid: #4d4d4d;
}

#comboView,
#comboView * {
    font-family: 'Noto Sans JP', sans-serif;
}

#comboView #Table1 p,
#comboView #Table1 span,
#comboView .combo-search-shell p,
#comboView .combo-search-shell span,
#comboView .combo-search-shell label,
#comboView .combo-search-shell button,
#comboView .combo-search-shell input,
#comboView .combo-search-shell select {
    font-family: inherit !important;
}

#comboView.active {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    gap: 0;
}

/* Prevent flash of legacy static combo rows before JS rebuild completes */
#comboView:not(.combo-ready) #comboTableScroll,
#comboView:not(.combo-ready) #comboRowToggles,
#comboView:not(.combo-ready) .combo-col-controls,
#comboView:not(.combo-ready) #comboColumnTogglePanel,
#comboView:not(.combo-ready) #comboCrudBar,
#comboView:not(.combo-ready) #Table2,
#comboView:not(.combo-ready) #Table3,
#comboView:not(.combo-ready) #Table4,
#comboView:not(.combo-ready) #Table5 {
    visibility: hidden;
}

#comboView #FlexGrid1 {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#comboView table {
    border-collapse: collapse;
}

#comboView #Table1 th,
#comboView #Table1 td {
    border: 1px solid #343434;
    background: #121212;
    color: #f1f1f1;
    padding: 4px 6px;
    font-size: 10px;
    line-height: 1.2;
    box-sizing: border-box;
}

#comboView #Table1 {
    --combo-header-row-height: 22px;
    --combo-subheader-row-height: 22px;
    --combo-sticky-col1-width: 0px;
    --combo-sticky-col2-width: 0px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

#comboView #Table1 thead {
    position: relative;
}

#comboView #Table1 thead tr:nth-child(1)>th,
#comboView #Table1 thead tr:nth-child(1)>td {
    position: sticky;
    top: 0;
    z-index: 3;
    height: var(--combo-header-row-height, 25px);
    min-height: var(--combo-header-row-height, 25px);
    background-clip: padding-box;
    padding: 2px 5px;
}

#comboView #Table1 thead tr:nth-child(2)>th,
#comboView #Table1 thead tr:nth-child(2)>td {
    position: sticky;
    top: var(--combo-header-row-height, 25px);
    z-index: 2;
    height: var(--combo-subheader-row-height, 25px);
    min-height: var(--combo-subheader-row-height, 25px);
    background-clip: padding-box;
    padding: 2px 5px;
}

#comboView #Table1 .combo-sticky-col {
    position: sticky;
    z-index: 6;
}

#comboView #Table1 thead .combo-sticky-col {
    z-index: 9;
}


#comboView #comboTableHeaderWrap {
    display: none !important;
}

#comboView #comboTableHeader {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

#comboView .combo-col-eye {
    position: absolute;
    right: 4px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #3a3a3a;
    background: #1b1b1b;
    color: #f0f0f0;
    font-size: 11px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
}

#comboView .combo-col-eye:hover {
    border-color: #555;
    background: #222;
}

#comboView #comboColumnTogglePanel {
    position: fixed;
    min-width: 360px;
    max-width: 720px;
    max-height: min(72vh, 560px);
    padding: 10px 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: rgba(14, 14, 14, 0.98);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
    z-index: 1400;
    overflow-y: auto;
}

#comboView #comboColumnTogglePanel.hidden {
    display: none;
}

#comboView #comboColumnTogglePanel .combo-col-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 12px;
    max-height: min(62vh, 500px);
    overflow: auto;
}

#comboView #comboColumnTogglePanel .combo-col-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #f0f0f0;
    white-space: nowrap;
}

#comboView #comboTableHeader th,
#comboView #comboTableHeader td {
    border: 1px solid #454545;
    background: #1b1b1b;
    color: #f1f1f1;
    padding: 2px 5px;
    font-size: 9px;
    line-height: 1.05;
    box-sizing: border-box;
    text-align: center;
    vertical-align: middle;
}

#comboView #Table1 th {
    background: #1b1b1b;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    border-color: #4a4a4a;
}

#comboView #comboTableHeader tr:nth-child(1) th,
#comboView #comboTableHeader tr:nth-child(1) td {
    background: #222;
    height: var(--combo-header-row-height, 25px);
    min-height: var(--combo-header-row-height, 25px);
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
}

#comboView #comboTableHeader tr:nth-child(2) th,
#comboView #comboTableHeader tr:nth-child(2) td {
    background: #1a1a1a;
    border-bottom: 2px solid #5a5a5a;
    height: var(--combo-subheader-row-height, 25px);
    min-height: var(--combo-subheader-row-height, 25px);
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
}

#comboView #comboTableHeader tr:nth-child(2) {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#comboView #comboTableHeader tr:nth-child(2) th,
#comboView #comboTableHeader tr:nth-child(2) td {
    display: table-cell !important;
    visibility: visible !important;
}

/* Keep bottom divider thickness consistent for top-level headers without subheaders. */
#comboView #comboTableHeader tr:nth-child(1) th[rowspan="2"],
#comboView #comboTableHeader tr:nth-child(1) td[rowspan="2"] {
    border-bottom: 2px solid #5a5a5a;
}

#comboView #Table1 .combo-sortable {
    cursor: pointer;
    position: relative;
}

#comboView #Table1 .combo-sortable::after {
    content: "\25B2/\25BC";
    position: absolute;
    right: 3px;
    bottom: 2px;
    font-size: 8px;
    color: #9a9a9a;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

#comboView #Table1 .combo-sortable[data-sort="asc"]::after,
#comboView #Table1 .combo-sortable[data-sort="desc"]::after {
    color: #f0f0f0;
}

#comboView #comboTableHeader .combo-sortable {
    cursor: pointer;
    position: relative;
}

#comboView #comboTableHeader .combo-sortable::after {
    content: "\25B2/\25BC";
    position: absolute;
    right: 3px;
    bottom: 2px;
    font-size: 8px;
    color: #9a9a9a;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

#comboView #comboTableHeader .combo-sortable[data-sort="asc"]::after,
#comboView #comboTableHeader .combo-sortable[data-sort="desc"]::after {
    color: #f0f0f0;
}

#comboView #Table1 .combo-sortable[data-sort="asc"]::after {
    content: "\25B2";
}

#comboView #Table1 .combo-sortable[data-sort="desc"]::after {
    content: "\25BC";
}

#comboView #comboTableHeader .combo-sortable[data-sort="asc"]::after {
    content: "\25B2";
}

#comboView #comboTableHeader .combo-sortable[data-sort="desc"]::after {
    content: "\25BC";
}

/* Hide sort glyphs in header cells; context menu handles sort actions now. */
#comboView #Table1 .combo-sortable::after,
#comboView #Table1 .combo-sortable[data-sort="asc"]::after,
#comboView #Table1 .combo-sortable[data-sort="desc"]::after,
#comboView #comboTableHeader .combo-sortable::after,
#comboView #comboTableHeader .combo-sortable[data-sort="asc"]::after,
#comboView #comboTableHeader .combo-sortable[data-sort="desc"]::after {
    content: "" !important;
    display: none !important;
}

#comboView #Table1 .combo-sortable.combo-header-selected,
#comboView #comboTableHeader .combo-sortable.combo-header-selected {
    /* Layer semi-transparent orange over solid base so sticky headers stay opaque. */
    background: linear-gradient(rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.2)), #1b1b1b !important;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.6);
}

#comboView #Table1 tr:not(.selected) td.combo-column-selected,
#comboView #Table1 tr:not(.selected) th.combo-column-selected,
#comboView #comboTableHeader td.combo-column-selected,
#comboView #comboTableHeader th.combo-column-selected {
    /* Same layering for body column highlight. */
    background: linear-gradient(rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0.14)), #121212 !important;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

/* Suppress browser default focus outline on sortable headers on mouse click.
   :focus-visible still shows the ring for keyboard navigation. */
#comboView #Table1 .combo-sortable:focus,
#comboView #comboTableHeader .combo-sortable:focus {
    outline: none;
}

#comboView #Table1 .combo-sortable:focus-visible,
#comboView #comboTableHeader .combo-sortable:focus-visible {
    outline: 1px solid rgba(249, 115, 22, 0.7);
    outline-offset: -2px;
}

#comboView #Table1 tr:nth-child(2) td {
    text-align: center;
    vertical-align: middle;
}

#comboView #Table1 tr:nth-child(2) td p {
    text-align: center;
}

#comboView #Table1 tr:nth-child(1) th p,
#comboView #Table1 tr:nth-child(1) th span,
#comboView #Table1 tr:nth-child(1) td p,
#comboView #Table1 tr:nth-child(1) td span,
#comboView #comboTableHeader tr:nth-child(1) th p,
#comboView #comboTableHeader tr:nth-child(1) th span,
#comboView #comboTableHeader tr:nth-child(1) td p,
#comboView #comboTableHeader tr:nth-child(1) td span {
    font-size: 9px !important;
    line-height: 1.1 !important;
    font-family: inherit !important;
}

#comboView #Table1 tr:nth-child(1) th p,
#comboView #Table1 tr:nth-child(1) td p,
#comboView #Table1 tr:nth-child(2) th p,
#comboView #Table1 tr:nth-child(2) td p,
#comboView #comboTableHeader tr:nth-child(1) th p,
#comboView #comboTableHeader tr:nth-child(1) td p,
#comboView #comboTableHeader tr:nth-child(2) th p,
#comboView #comboTableHeader tr:nth-child(2) td p {
    margin: 0 !important;
    white-space: normal !important;
}

#comboView #Table1 tr:nth-child(1) th span,
#comboView #Table1 tr:nth-child(1) td span,
#comboView #Table1 tr:nth-child(2) th span,
#comboView #Table1 tr:nth-child(2) td span,
#comboView #comboTableHeader tr:nth-child(1) th span,
#comboView #comboTableHeader tr:nth-child(1) td span,
#comboView #comboTableHeader tr:nth-child(2) th span,
#comboView #comboTableHeader tr:nth-child(2) td span {
    display: inline-block;
    vertical-align: middle;
}

#comboView #Table1 tr:nth-child(2) th p,
#comboView #Table1 tr:nth-child(2) th span,
#comboView #Table1 tr:nth-child(2) td p,
#comboView #Table1 tr:nth-child(2) td span,
#comboView #comboTableHeader tr:nth-child(2) th p,
#comboView #comboTableHeader tr:nth-child(2) th span,
#comboView #comboTableHeader tr:nth-child(2) td p,
#comboView #comboTableHeader tr:nth-child(2) td span {
    font-size: 9px !important;
    line-height: 1.1 !important;
    font-family: inherit !important;
}

#comboView #Table1 tr:nth-child(1) th,
#comboView #Table1 tr:nth-child(1) td,
#comboView #Table1 tr:nth-child(2) th,
#comboView #Table1 tr:nth-child(2) td,
#comboView #comboTableHeader tr:nth-child(1) th,
#comboView #comboTableHeader tr:nth-child(1) td,
#comboView #comboTableHeader tr:nth-child(2) th,
#comboView #comboTableHeader tr:nth-child(2) td {
    font-size: 9px !important;
    line-height: 1.1 !important;
    font-family: inherit !important;
}

#comboView #Table1 tr:nth-child(1) th:nth-child(1),
#comboView #Table1 tr:nth-child(1) th:nth-child(2) {
    border-bottom-color: #5a5a5a;
}

#comboView #Table1 .combo-hidden-col {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-shadow: none !important;
    visibility: hidden !important;
}

#comboView #Table1 .combo-hidden-col>* {
    display: none !important;
}

#comboView #comboTableHeader .combo-hidden-col {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-shadow: none !important;
    visibility: hidden !important;
}

#comboView #comboTableHeader .combo-hidden-col>* {
    display: none !important;
}

#comboView #Table1 {
    table-layout: fixed;
}

#comboView #comboTableScroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #6a6a6a rgba(255, 255, 255, 0.06);
    border-bottom: 2px solid #3a3a3a;
    height: 754px;
    max-height: 754px;
    cursor: grab;
}

#comboView #comboTableScroll.grabbing {
    cursor: grabbing;
}

#comboView #comboTableScroll #Table1 {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: max-content !important;
    min-width: 100% !important;
    height: auto !important;
}

#comboView.combo-compact-cols #comboTableScroll #Table1 {
    min-width: 0 !important;
}

#comboView #comboTableScroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#comboView #comboTableScroll::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.72);
    border-radius: 10px;
}

#comboView #comboTableScroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

/* Keep group zebra backgrounds explicit (non-selected rows). */
#comboView #Table1 tbody tr.combo-group-even:not(.selected) td {
    background: #151515;
}

#comboView #Table1 tbody tr.combo-group-odd:not(.selected) td {
    background: #0b0b0b;
}

#comboView #Table1 tr.combo-group-even:not(.selected) td {
    background: #151515;
}

#comboView #Table1 tr.combo-group-odd:not(.selected) td {
    background: #0b0b0b;
}

/* Re-striped by currently visible groups (after filters/mode). */
#comboView #Table1 tr.combo-group-visible-even:not(.selected) td {
    background: #151515 !important;
}

#comboView #Table1 tr.combo-group-visible-odd:not(.selected) td {
    background: #0b0b0b !important;
}

#comboView #Table1 tr.selected td {
    background: rgba(249, 115, 6, 0.2);
    border-color: #f97306;
}

/* Keep selected-row borders consistent on the first two frozen columns. */
#comboView #Table1 tr.selected td:nth-child(1),
#comboView #Table1 tr.selected td:nth-child(2) {
    border-left-style: solid !important;
    border-right-style: solid !important;
    border-left-width: 1px !important;
    border-right-width: 1px !important;
    border-left-color: #f97306 !important;
    border-right-color: #f97306 !important;
}

/* Keep frozen columns visually clean while horizontally scrolled. */
#comboView #Table1 tr.selected td.combo-sticky-col {
    background: #402516;
}

/* Avoid double/thick separator rendering on selected sticky separator cells. */
#comboView #Table1 tr.selected td.combo-sticky-col.combo-sep-right,
#comboView #Table1 tr.selected td.combo-sticky-col.combo-sep-right-tail {
    box-shadow: none !important;
}

/* Do not highlight section separator lines on non-sticky cells in selected rows. */
#comboView #Table1 tr.selected td.combo-sep-right:not(.combo-sticky-col),
#comboView #Table1 tr.selected td.combo-sep-right-tail:not(.combo-sticky-col) {
    border-right-color: #515151 !important;
}

/* Keep first two columns highlighted even if separator classes are present. */
#comboView #Table1 tr.selected td:nth-child(1).combo-sep-right,
#comboView #Table1 tr.selected td:nth-child(1).combo-sep-right-tail,
#comboView #Table1 tr.selected td:nth-child(2).combo-sep-right,
#comboView #Table1 tr.selected td:nth-child(2).combo-sep-right-tail {
    border-right-color: #f97306 !important;
}

.combo-cell-locked {
    position: relative;
}

.combo-lock-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 11px;
    line-height: 1;
    opacity: 0.95;
    pointer-events: none;
}

#comboView #Table1 .combo-input-locked {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.55);
}

.combo-row-context-menu {
    position: fixed;
    z-index: 1200;
    min-width: 180px;
    max-width: min(240px, 88vw);
    padding: 4px 0;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background: #121212;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.combo-row-context-menu.hidden {
    display: none;
}

.combo-header-context-menu {
    position: fixed;
    z-index: 1200;
    min-width: 190px;
    max-width: min(250px, 90vw);
    padding: 4px 0 8px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background: #121212;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;
}

.combo-header-context-menu.hidden {
    display: none;
}

.combo-row-context-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: #f3f4f6;
    text-align: left;
    font-size: 12px;
    line-height: 1.3;
    padding: 7px 12px;
    cursor: pointer;
}

.combo-header-context-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: #f3f4f6;
    text-align: left;
    font-size: 12px;
    line-height: 1.3;
    padding: 7px 12px;
    cursor: pointer;
}

.combo-header-context-item.has-submenu {
    position: relative;
    padding-right: 22px;
}

.combo-header-context-item.has-submenu::after {
    content: ">";
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
}

.combo-row-context-item:hover,
.combo-row-context-item:focus {
    outline: none;
    background: rgba(249, 115, 22, 0.25);
}

.combo-header-context-item:hover,
.combo-header-context-item:focus {
    outline: none;
    background: rgba(249, 115, 22, 0.25);
}

.combo-row-context-item[disabled] {
    color: #7b7f87;
    background: transparent;
    cursor: default;
}

.combo-header-context-item[disabled] {
    color: #7b7f87;
    background: transparent;
    cursor: default;
}

.combo-header-context-item.is-active {
    color: #fbbf24;
}

.combo-row-context-sep {
    height: 1px;
    margin: 3px 0;
    background: #2b2b2b;
}

.combo-header-context-actions {
    padding: 0;
}

.combo-header-context-divider {
    height: 1px;
    margin: 5px 0 7px;
    background: #2b2b2b;
}

.combo-header-filter-wrap {
    padding: 0 8px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.combo-header-filter-search-label {
    display: block;
    font-size: 11px;
    color: #d1d5db;
    margin: 0 0 4px;
}

.combo-header-filter-search {
    width: 100%;
    box-sizing: border-box;
    height: 26px;
    border: 1px solid #4b5563;
    border-radius: 4px;
    background: #0b0b0b;
    color: #f3f4f6;
    font-size: 12px;
    padding: 4px 7px;
    margin: 0 0 6px;
}

.combo-header-filter-options {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #3b3b3b;
    border-radius: 4px;
    background: #0f0f10;
    max-height: min(280px, 42vh);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 150, 150, 0.75) rgba(255, 255, 255, 0.06);
    padding: 2px 0;
}

.combo-header-filter-options::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.combo-header-filter-options::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.75);
    border-radius: 10px;
}

.combo-header-filter-options::-webkit-scrollbar-thumb:hover {
    background: rgba(170, 170, 170, 0.82);
}

.combo-header-filter-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

.combo-header-filter-option {
    display: grid;
    grid-template-columns: 16px 1fr;
    align-items: center;
    gap: 7px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    font-size: 12px;
    color: #f3f4f6;
    padding: 3px 8px;
}

.combo-header-filter-option:hover {
    background: rgba(249, 115, 22, 0.16);
}

.combo-header-filter-option input[type="checkbox"] {
    margin: 0 0 2px;
}

.combo-header-filter-option span {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.combo-header-filter-option-all {
    border-bottom: 1px solid #2f2f2f;
    margin-bottom: 2px;
    padding-bottom: 5px;
}

.combo-header-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.combo-header-filter-numeric {
    margin: 0 0 8px;
    padding: 6px;
    border: 1px solid #3b3b3b;
    border-radius: 4px;
    background: #0f0f10;
}

.combo-header-filter-numeric-title {
    margin: 0 0 5px;
    font-size: 11px;
    color: #d1d5db;
}

.combo-header-filter-numeric-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
}

.combo-header-filter-numeric-op,
.combo-header-filter-numeric-input {
    width: 100%;
    box-sizing: border-box;
    height: 26px;
    border: 1px solid #4b5563;
    border-radius: 4px;
    background: #0b0b0b;
    color: #f3f4f6;
    font-size: 12px;
    padding: 4px 7px;
}

.combo-header-filter-btn {
    width: 100%;
    box-sizing: border-box;
    height: 30px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background: #151515;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
}

.combo-header-filter-btn:hover,
.combo-header-filter-btn:focus {
    outline: none;
    border-color: #f97306;
    background: #151515;
}

.combo-header-filter-btn[disabled] {
    opacity: 0.45;
    cursor: default;
}

.combo-header-filter-flyout {
    position: fixed;
    z-index: 1215;
    min-width: 250px;
    max-width: min(300px, 88vw);
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    background: #121212;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    padding: 8px;
}

.combo-header-filter-flyout.hidden {
    display: none;
}

.combo-header-filter-flyout .combo-header-filter-numeric {
    margin: 0;
}

#comboView #Table1 tr.combo-group-empty {
    display: none;
}

#comboView #Table1 tr.combo-group-row td {
    padding: 0 1px;
    line-height: 1;
    vertical-align: middle;
    border-top-width: 0 !important;
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    border-bottom-color: #2a2a2a !important;
}

#comboView #Table1 tr.combo-group-row:not(.selected) td {
    border-top-color: transparent !important;
    border-bottom-color: #2a2a2a !important;
    box-shadow: none !important;
}

#comboView #Table1 tr.combo-row-visible td {
    border-top-color: transparent !important;
    border-bottom-color: #2a2a2a !important;
    box-shadow: none !important;
}

#comboView #Table1 tr.combo-row-visible-start td {
    border-top-color: #2f2f2f !important;
    border-top-style: solid !important;
    border-top-width: 1px !important;
    box-shadow: none !important;
}

#comboView #Table1 tr.combo-row-visible-end td {
    border-bottom-color: #333333 !important;
    box-shadow: none !important;
}

#comboView #Table1 tbody td,
#comboView #Table1 tbody td p,
#comboView #Table1 tbody td span {
    font-size: 10px !important;
    line-height: 1.1 !important;
    font-family: inherit !important;
}

#comboView #Table1 tr.combo-group-row td:first-child,
#comboView #Table1 tr.combo-group-row td:first-child p,
#comboView #Table1 tr.combo-group-row td:first-child span {
    font-size: 10px !important;
    line-height: 1.1 !important;
    text-align: left !important;
}

/* Keep first-column labels consistent across initial/example and loaded rows. */
#comboView #Table1 tbody tr td:first-child,
#comboView #Table1 tbody tr td:first-child p,
#comboView #Table1 tbody tr td:first-child span {
    font-size: 10px !important;
    line-height: 1.1 !important;
}

/* Keep body column 1 strictly inside its own width (no bleed into col 2+). */
#comboView #Table1 tbody tr td:first-child {
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#comboView #Table1 tbody tr td:first-child p,
#comboView #Table1 tbody tr td:first-child span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#comboView #Table1 tr.combo-group-row {
    height: auto;
}

#comboView #Table1 tr.combo-virtual-spacer td {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    height: 0;
}

#comboView #Table1 tr.combo-group-row td:nth-child(n+3) {
    contain: paint;
}

#comboView #Table1 tr.combo-group-row td:nth-child(2),
#comboView #Table1 tr.combo-group-row td:nth-child(2) p,
#comboView #Table1 tr.combo-group-row td:nth-child(2) span {
    font-size: 10px !important;
    line-height: 1.1 !important;
}

/* Dynamic vertical separators (driven by field columns in JS) */
#comboView #Table1 .combo-sep-right,
#comboView #comboTableHeader .combo-sep-right {
    border-right-color: #515151 !important;
    border-right-width: 1px !important;
}

#comboView #Table1 .combo-sticky-col.combo-sep-right,
#comboView #comboTableHeader .combo-sticky-col.combo-sep-right {
    box-shadow: inset -1px 0 0 #515151;
}

/* Remove vertical grid lines on frame-meter/notes rows (col 3+) */
#comboView #Table1 tr.combo-row-frame td:nth-child(n+3),
#comboView #Table1 tr.combo-row-notes td:nth-child(n+3) {
    border-left-color: transparent;
    border-right-color: transparent;
}

/* Non-command rows: remove grid on column 3 like the row body region */
#comboView #Table1 tr.combo-row-frame td:nth-child(3),
#comboView #Table1 tr.combo-row-buttons td:nth-child(3),
#comboView #Table1 tr.combo-row-notes td:nth-child(3) {
    border-left-style: none !important;
    border-right-style: none !important;
    border-top-style: none !important;
    border-bottom-style: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

/* Keep first-column borders stable even when rows are hidden/shown */
#comboView #Table1 tr.combo-row-frame td:first-child,
#comboView #Table1 tr.combo-row-notes td:first-child {
    border-left-color: #343434;
    border-right-color: #343434;
    border-top-color: #2a2a2a;
    border-bottom-color: #2a2a2a;
}

#comboView #Table1 tr.combo-row-frame td:first-child,
#comboView #Table1 tr.combo-row-buttons td:first-child,
#comboView #Table1 tr.combo-row-notes td:first-child {
    border-top-color: #2a2a2a !important;
    border-bottom-color: #2a2a2a !important;
}

/* Keep separator on button row only */
#comboView #Table1 tr.combo-row-buttons td:nth-child(1),
#comboView #Table1 tr.combo-row-buttons td:nth-child(2) {
    border-right-color: #2a2a2a;
}

/* Match frame/notes styling on button row after column 3 */
#comboView #Table1 tr.combo-row-buttons td:nth-child(n+4) {
    border-left-style: none !important;
    border-right-style: none !important;
    border-top-style: none !important;
    border-bottom-style: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

/* Main table body rule: keep grid lines only on command rows. */
#comboView #Table1 tr.combo-row-frame td:nth-child(n+3),
#comboView #Table1 tr.combo-row-buttons td:nth-child(n+3),
#comboView #Table1 tr.combo-row-notes td:nth-child(n+3) {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

/* Keep the top separator for command rows on col 3+. */
#comboView #Table1 tr.combo-row-command td:nth-child(n+3) {
    border-top-style: solid !important;
    border-top-width: 1px !important;
    border-top-color: #2f2f2f !important;
}

/* Keep group separator visible across col 3+ even when row grids are suppressed. */
#comboView #Table1 tr.combo-row-visible-end td:nth-child(n+3) {
    border-bottom-style: solid !important;
    border-bottom-width: 1px !important;
    border-bottom-color: #333333 !important;
}

/* Keep only the group separator line across visible group end rows. */
#comboView #Table1 tr.combo-row-visible-end td {
    border-bottom-style: solid !important;
    border-bottom-width: 1px !important;
    border-bottom-color: #333333 !important;
}

#comboView #Table2,
#comboView #Table4,
#comboView #Table5 {
    border-collapse: collapse;
    table-layout: fixed;
}

#comboView #Table2 td,
#comboView #Table4 td,
#comboView #Table5 td {
    border: 1px solid #2a2a2a;
    background: #121212;
    color: #f1f1f1;
    text-align: center;
    vertical-align: middle;
    padding: 1px 2px;
    font-size: 9px;
    line-height: 1.05;
    width: var(--ui-cell-size);
    height: var(--ui-cell-size);
    position: relative;
}

#comboView #Table2 td {
    width: var(--ui-dir-cell-size);
    height: var(--ui-dir-cell-height);
}

#comboView #Table2 td p,
#comboView #Table4 td p {
    margin: 0;
}

#comboView #Table2 tr.ui-icon-row td,
#comboView #Table4 tr.ui-icon-row td {
    height: var(--ui-icon-row-height);
}

#comboView #Table2 tr.ui-icon-row td {
    height: var(--ui-dir-cell-height) !important;
    min-height: var(--ui-dir-cell-height) !important;
}

#comboView #Table2 tr.ui-icon-row {
    height: var(--ui-dir-cell-height) !important;
}

#comboView #Table2 tr.ui-icon-row td {
    padding: 0 !important;
    line-height: 1 !important;
}

#comboView #Table2 tr.ui-desc-row td,
#comboView #Table4 tr.ui-desc-row td {
    height: var(--ui-desc-row-height) !important;
    min-height: 0 !important;
}

#comboView #Table2 tr.ui-icon-row,
#comboView #Table4 tr.ui-icon-row {
    height: var(--ui-icon-row-height) !important;
}

#comboView #Table2 tr.ui-desc-row,
#comboView #Table4 tr.ui-desc-row {
    height: var(--ui-desc-row-height) !important;
}

#comboView #Table2 tr.ui-desc-row td,
#comboView #Table4 tr.ui-desc-row td {
    padding: 0 !important;
    line-height: 1 !important;
}

#comboView #Table2 {
    width: calc(var(--ui-dir-cell-size) * 3) !important;
    min-width: calc(var(--ui-dir-cell-size) * 3) !important;
    height: auto !important;
}

#comboView #Table2 tr {
    height: auto !important;
}

#comboView #Table4 {
    width: calc(var(--ui-cell-size) * 8) !important;
    min-width: calc(var(--ui-cell-size) * 8) !important;
    height: auto !important;
}

#comboView #Table4 tr:nth-child(2) td,
#comboView #Table4 tr:nth-child(4) td,
#comboView #Table4 tr:nth-child(6) td {
    height: var(--ui-desc-row-height) !important;
    padding: 0 !important;
    line-height: 1 !important;
}

#comboView #Table4 tr:nth-child(2) .ui-btn-desc,
#comboView #Table4 tr:nth-child(4) .ui-btn-desc,
#comboView #Table4 tr:nth-child(6) .ui-btn-desc {
    height: 100%;
    padding: 0;
    line-height: 1;
}

#comboView #Table2 tr.ui-desc-row .ui-btn-desc,
#comboView #Table4 tr.ui-desc-row .ui-btn-desc {
    height: 100%;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

#comboView #Table5 {
    width: calc(var(--shortcut-cell-size) * 3) !important;
    min-width: calc(var(--shortcut-cell-size) * 3) !important;
}

#comboView #Table5 td {
    width: var(--shortcut-cell-size);
    min-width: var(--shortcut-cell-size);
}

#comboView #Table2 td:nth-child(4) {
    display: none;
}

#comboView #Table2 tr:nth-child(2),
#comboView #Table2 tr:nth-child(6) {
    display: none;
}

#comboView .ui-btn-keycell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
}

#comboView #Table2 .ui-btn-keycell,
#comboView #Table4 .ui-btn-keycell,
#comboView #Table5 .ui-btn-keycell {
    position: static;
    height: 100%;
    min-height: 0;
    cursor: pointer;
}

#comboView .ui-btn-keycell img {
    max-height: 20px;
}

#comboView .ui-btn-key {
    position: absolute;
    right: 2px;
    bottom: 1px;
    font-size: 9px;
    color: #fff;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

#comboView #Table2 .ui-btn-key,
#comboView #Table4 .ui-btn-key,
#comboView #Table5 .ui-btn-key {
    right: 0px !important;
    bottom: 1px !important;
    text-align: right;
}

#comboView .ui-btn-hotkey-icon {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

#comboView .ui-btn-hotkey-plus {
    font-size: 9px;
    line-height: 1;
    margin: 0 1px;
}

#comboView .ui-btn-desc {
    font-size: 6.5px;
    line-height: 1.00;
    color: #d0d0d0;
    padding: 0 0px;
    height: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#comboView #Table2 img,
#comboView #Table4 img,
#comboView #Table5 img {
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

#comboView #Table2 .ui-btn-keycell>img {
    width: 27px !important;
    height: 27px !important;
}

#comboView #Table2 .ui-btn-keycell>img {
    transform: translateY(-4px);
}

#comboView #Table2 .ui-btn-key .ui-btn-hotkey-icon {
    width: 16px;
    height: 16px;
}


#comboView #Table4 .ui-btn-keycell>img {
    transform: translateY(-3px) scale(0.8);
}

#comboView #wb_Line1 {
    z-index: 13;
}

#comboView .cell-input,
#comboView #Table1 select,
#comboView .cmd-input {
    width: 100%;
    box-sizing: border-box;
    background: #0f0f0f;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 1px 3px;
    font-size: 11px;
}

#comboView .cell-input,
#comboView #Table1 select {
    text-align: center;
}

#comboView .cmd-input {
    text-align: left;
}

#comboView .cell-input[data-field="combo_notes"] {
    font-size: 13px;
    line-height: 1.2;
    padding-bottom: 2px;
    resize: none;
    overflow: hidden;
    height: auto;
    min-height: 18px;
    white-space: pre-wrap;
}

#comboView #Table1 tbody td .cmd-input[data-field="command"] {
    font-size: var(--command-font-size, 12px) !important;
    line-height: 1.1 !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
}

#comboView #Table1 tbody td .cmd-input[data-field="command"] * {
    font-size: inherit !important;
    line-height: inherit !important;
}

#comboView .cell-input.align-left {
    text-align: left;
}

#comboView .cell-input,
#comboView .cmd-input {
    display: block;
    min-height: 18px;
    cursor: text;
}

#comboView .cmd-input {
    min-height: 18px;
}

#comboView .cmd-output {
    background: #0b0b0b;
    border-color: #2a2a2a;
    cursor: default;
}

#comboView .frame-meter-wrap {
    width: min(100%, var(--combo-command-col-width, 440px));
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: var(--combo-command-col-width, 440px);
    box-sizing: border-box;
}

#comboView .combo-tags-wrap {
    width: min(100%, var(--combo-command-col-width, 440px));
    display: flex;
    align-items: center;
    min-height: 22px;
    min-width: 0;
    max-width: var(--combo-command-col-width, 440px);
    box-sizing: border-box;
    position: relative;
    gap: 6px;
}

#comboView .combo-tags-input {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    /* Leave room for the + button so the overlay rect matches the chip area. */
    right: 30px;
    opacity: 0;
    pointer-events: none;
}

#comboView .combo-tags-chips {
    width: 100%;
    min-height: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-width: 0;
}

#comboView .combo-tags-add-btn {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #1b1b1b;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
    padding: 0;
}

#comboView .combo-tags-add-btn:hover {
    border-color: #f97306;
}

#comboView .combo-tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.4;
    border: none;
    color: #f1f5f9;
    background: rgba(148, 163, 184, 0.16);
    user-select: none;
    white-space: nowrap;
    position: relative;
}

#comboView .combo-tag-chip-empty {
    opacity: 0.7;
}

#comboView .combo-tag-chip-del {
    border: none;
    background: transparent;
    color: rgba(241, 245, 249, 0.7);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

#comboView .combo-tag-chip:hover .combo-tag-chip-del {
    opacity: 1;
    pointer-events: auto;
}

#comboView .combo-tag-chip-del:hover {
    color: #fff;
}

#comboView .combo-tag-chip.tagmod-0 {
    background: rgba(56, 189, 248, 0.18);
}

#comboView .combo-tag-chip.tagmod-1 {
    background: rgba(52, 211, 153, 0.18);
}

#comboView .combo-tag-chip.tagmod-2 {
    background: rgba(251, 113, 133, 0.18);
}

#comboView .combo-tag-chip.tagmod-3 {
    background: rgba(251, 191, 36, 0.18);
}

#comboView .combo-tag-chip.tagmod-4 {
    background: rgba(167, 139, 250, 0.18);
}

#comboView .combo-tag-chip.tagmod-5 {
    background: rgba(34, 197, 94, 0.18);
}

#comboView .combo-tag-chip.tagmod-6 {
    background: rgba(249, 115, 22, 0.18);
}

#comboView .combo-tag-chip.tagmod-7 {
    background: rgba(96, 165, 250, 0.18);
}

#comboView .combo-tag-chip.tagmod-8 {
    background: rgba(45, 212, 191, 0.18);
}

#comboView .combo-tag-chip.tagmod-9 {
    background: rgba(244, 114, 182, 0.18);
}

#comboView .combo-tag-chip.tagmod-10 {
    background: rgba(248, 113, 113, 0.18);
}

#comboView .combo-tag-chip.tagmod-11 {
    background: rgba(253, 224, 71, 0.18);
}

#comboView .combo-tag-chip.tagmod-12 {
    background: rgba(129, 140, 248, 0.18);
}

#comboView .combo-tag-chip.tagmod-13 {
    background: rgba(74, 222, 128, 0.18);
}

#comboView .combo-tag-chip.tagmod-14 {
    background: rgba(251, 146, 60, 0.18);
}

#comboView .combo-tag-chip.tagmod-15 {
    background: rgba(103, 232, 249, 0.18);
}

/* Tag picker (multi-input panel when editing tags) */
.combo-multi-body.combo-tag-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 360px;
    max-height: 260px;
}

.combo-multi-body.combo-tag-picker .combo-tag-opt {
    border-radius: 999px;
    border: none;
    background: rgba(148, 163, 184, 0.16);
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.combo-multi-body.combo-tag-picker .combo-tag-opt:hover {
    outline: 1px solid rgba(241, 245, 249, 0.35);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.is-selected,
.combo-multi-body.combo-tag-picker .combo-tag-opt:disabled {
    outline: 1px solid rgba(241, 245, 249, 0.45);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-0 {
    background: rgba(56, 189, 248, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-1 {
    background: rgba(52, 211, 153, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-2 {
    background: rgba(251, 113, 133, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-3 {
    background: rgba(251, 191, 36, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-4 {
    background: rgba(167, 139, 250, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-5 {
    background: rgba(34, 197, 94, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-6 {
    background: rgba(249, 115, 22, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-7 {
    background: rgba(96, 165, 250, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-8 {
    background: rgba(45, 212, 191, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-9 {
    background: rgba(244, 114, 182, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-10 {
    background: rgba(248, 113, 113, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-11 {
    background: rgba(253, 224, 71, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-12 {
    background: rgba(129, 140, 248, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-13 {
    background: rgba(74, 222, 128, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-14 {
    background: rgba(251, 146, 60, 0.18);
}

.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-15 {
    background: rgba(103, 232, 249, 0.18);
}

/* Override tag palette with a more distinct 16-color HSL wheel (chips + modal + picker). */
#comboView .combo-tag-chip.tagmod-0,
#frameMeterOverlay .combo-tag-chip.tagmod-0,
#comboCompareOverlay .combo-tag-chip.tagmod-0,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-0 {
    background: linear-gradient(135deg, hsla(200, 90%, 55%, 0.38), hsla(220, 90%, 55%, 0.22));
}

#comboView .combo-tag-chip.tagmod-1,
#frameMeterOverlay .combo-tag-chip.tagmod-1,
#comboCompareOverlay .combo-tag-chip.tagmod-1,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-1 {
    background: linear-gradient(135deg, hsla(165, 90%, 48%, 0.38), hsla(185, 90%, 48%, 0.22));
}

#comboView .combo-tag-chip.tagmod-2,
#frameMeterOverlay .combo-tag-chip.tagmod-2,
#comboCompareOverlay .combo-tag-chip.tagmod-2,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-2 {
    background: linear-gradient(135deg, hsla(135, 90%, 50%, 0.38), hsla(155, 90%, 50%, 0.22));
}

#comboView .combo-tag-chip.tagmod-3,
#frameMeterOverlay .combo-tag-chip.tagmod-3,
#comboCompareOverlay .combo-tag-chip.tagmod-3,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-3 {
    background: linear-gradient(135deg, hsla(105, 90%, 48%, 0.38), hsla(125, 90%, 48%, 0.22));
}

#comboView .combo-tag-chip.tagmod-4,
#frameMeterOverlay .combo-tag-chip.tagmod-4,
#comboCompareOverlay .combo-tag-chip.tagmod-4,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-4 {
    background: linear-gradient(135deg, hsla(75, 95%, 50%, 0.38), hsla(95, 95%, 50%, 0.22));
}

#comboView .combo-tag-chip.tagmod-5,
#frameMeterOverlay .combo-tag-chip.tagmod-5,
#comboCompareOverlay .combo-tag-chip.tagmod-5,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-5 {
    background: linear-gradient(135deg, hsla(50, 95%, 52%, 0.38), hsla(70, 95%, 52%, 0.22));
}

#comboView .combo-tag-chip.tagmod-6,
#frameMeterOverlay .combo-tag-chip.tagmod-6,
#comboCompareOverlay .combo-tag-chip.tagmod-6,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-6 {
    background: linear-gradient(135deg, hsla(28, 95%, 55%, 0.38), hsla(48, 95%, 55%, 0.22));
}

#comboView .combo-tag-chip.tagmod-7,
#frameMeterOverlay .combo-tag-chip.tagmod-7,
#comboCompareOverlay .combo-tag-chip.tagmod-7,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-7 {
    background: linear-gradient(135deg, hsla(10, 95%, 55%, 0.38), hsla(30, 95%, 55%, 0.22));
}

#comboView .combo-tag-chip.tagmod-8,
#frameMeterOverlay .combo-tag-chip.tagmod-8,
#comboCompareOverlay .combo-tag-chip.tagmod-8,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-8 {
    background: linear-gradient(135deg, hsla(350, 95%, 58%, 0.38), hsla(10, 95%, 58%, 0.22));
}

#comboView .combo-tag-chip.tagmod-9,
#frameMeterOverlay .combo-tag-chip.tagmod-9,
#comboCompareOverlay .combo-tag-chip.tagmod-9,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-9 {
    background: linear-gradient(135deg, hsla(330, 95%, 58%, 0.38), hsla(350, 95%, 58%, 0.22));
}

#comboView .combo-tag-chip.tagmod-10,
#frameMeterOverlay .combo-tag-chip.tagmod-10,
#comboCompareOverlay .combo-tag-chip.tagmod-10,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-10 {
    background: linear-gradient(135deg, hsla(305, 90%, 58%, 0.38), hsla(325, 90%, 58%, 0.22));
}

#comboView .combo-tag-chip.tagmod-11,
#frameMeterOverlay .combo-tag-chip.tagmod-11,
#comboCompareOverlay .combo-tag-chip.tagmod-11,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-11 {
    background: linear-gradient(135deg, hsla(280, 90%, 60%, 0.38), hsla(300, 90%, 60%, 0.22));
}

#comboView .combo-tag-chip.tagmod-12,
#frameMeterOverlay .combo-tag-chip.tagmod-12,
#comboCompareOverlay .combo-tag-chip.tagmod-12,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-12 {
    background: linear-gradient(135deg, hsla(255, 90%, 60%, 0.38), hsla(275, 90%, 60%, 0.22));
}

#comboView .combo-tag-chip.tagmod-13,
#frameMeterOverlay .combo-tag-chip.tagmod-13,
#comboCompareOverlay .combo-tag-chip.tagmod-13,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-13 {
    background: linear-gradient(135deg, hsla(230, 90%, 58%, 0.38), hsla(250, 90%, 58%, 0.22));
}

#comboView .combo-tag-chip.tagmod-14,
#frameMeterOverlay .combo-tag-chip.tagmod-14,
#comboCompareOverlay .combo-tag-chip.tagmod-14,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-14 {
    background: linear-gradient(135deg, hsla(210, 90%, 56%, 0.38), hsla(230, 90%, 56%, 0.22));
}

#comboView .combo-tag-chip.tagmod-15,
#frameMeterOverlay .combo-tag-chip.tagmod-15,
#comboCompareOverlay .combo-tag-chip.tagmod-15,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-15 {
    background: linear-gradient(135deg, hsla(190, 90%, 52%, 0.38), hsla(210, 90%, 52%, 0.22));
}

#comboView .frame-meter-hidden-input {
    display: none !important;
}

#comboView .frame-meter-visual {
    width: min(100%, var(--combo-command-col-width, 440px));
    min-height: 26px;
    min-width: 0;
    max-width: var(--combo-command-col-width, 440px);
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 0;
    padding: 0;
    border: 1px solid #000;
    background: #0b0f14;
    overflow: hidden;
    scrollbar-width: thin;
    scrollbar-color: #1f2733 #0b0f14;
    user-select: none;
    contain: layout paint style;
    overflow-x: hidden;
}

/* ======================================================================== */
/* Frame Meter Details Modal */
/* ======================================================================== */
#frameMeterOverlay {
    --fat-frame-meter-startup: #17a075;
    --fat-frame-meter-active: #ae165e;
    --fat-frame-meter-recovery: #0d6898;
    --fat-frame-meter-invalid: #4d4d4d;
}

#frameMeterOverlay .frame-meter-panel {
    /* Inner content needs ~1540px (field table min-width + stats); padding is border-box. */
    max-width: 1580px;
    width: min(98vw, 1580px);
    /* Keep the modal usable on smaller displays. */
    max-height: 92vh;
    overflow: hidden;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
}

#frameMeterOverlay .modal-meta:empty {
    display: none;
}

#frameMeterOverlay .modal-title {
    margin-bottom: 14px;
}

#frameMeterOverlay .combo-details-help-trigger {
    position: absolute;
    top: 10px;
    right: 12px;
    min-width: 22px;
    height: 22px;
    padding: 0;
    line-height: 20px;
    border-radius: 4px;
}

#frameMeterOverlay .modal-meta {
    margin: -2px 0 10px;
}

#frameMeterOverlay .frame-meter-panel,
#treeView .tree-view-shell,
#treeView .tree-detail-pane {
    font-family: inherit;
}

#frameMeterOverlay .frame-meter-panel,
#treeView .tree-view-shell,
#treeView .tree-detail-pane {
    font-family: inherit;
}

#frameMeterOverlay .frame-meter-panel,
#treeView .tree-view-shell,
#treeView .tree-detail-pane {
    font-family: inherit;
}

#frameMeterOverlay .frame-meter-panel,
#treeView .tree-view-shell,
#treeView .tree-detail-pane {
    font-family: inherit;
}

#frameMeterOverlay .frame-meter-panel,
#treeView .tree-view-shell,
#treeView .tree-detail-pane {
    font-family: inherit;
}

#frameMeterOverlay .combo-details-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 10px;
}

#frameMeterOverlay .combo-details-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 0;
    scrollbar-width: thin;
    scrollbar-color: #6a6a6a rgba(255, 255, 255, 0.06);
}

#frameMeterOverlay .combo-details-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #6a6a6a;
    border-radius: 10px;
}

#frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

#frameMeterOverlay .combo-details-btn-danger {
    border-color: #7f1d1d;
    color: #fecaca;
}

#frameMeterOverlay .combo-details-btn-danger:hover {
    border-color: #ef4444;
    color: #fff;
}

#frameMeterOverlay .combo-details-bar {
    background: #0f0f0f;
    border: 1px solid #444;
    border-radius: 6px;
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 6px 8px;
}

#frameMeterOverlay .combo-details-bar:focus-within {
    border-color: rgba(241, 245, 249, 0.55);
}

#frameMeterOverlay .combo-details-bar-command {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 2px;
    padding-top: 4px;
    padding-bottom: 4px;
}

#frameMeterOverlay .combo-details-bar-buttons {
    min-height: 32px;
}

#frameMeterOverlay #comboDetailsTags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

#frameMeterOverlay .combo-tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.4;
    border: none;
    color: #f1f5f9;
    background: rgba(148, 163, 184, 0.16);
    user-select: none;
    white-space: nowrap;
    position: relative;
}

#frameMeterOverlay .combo-tag-chip-del {
    border: none;
    background: transparent;
    color: rgba(241, 245, 249, 0.7);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

#frameMeterOverlay .combo-tag-chip:hover .combo-tag-chip-del {
    opacity: 1;
    pointer-events: auto;
}

#frameMeterOverlay .combo-tag-chip-del:hover {
    color: #fff;
}

#frameMeterOverlay .combo-tag-chip.tagmod-0 {
    background: rgba(56, 189, 248, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-1 {
    background: rgba(52, 211, 153, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-2 {
    background: rgba(251, 113, 133, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-3 {
    background: rgba(251, 191, 36, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-4 {
    background: rgba(167, 139, 250, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-5 {
    background: rgba(34, 197, 94, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-6 {
    background: rgba(249, 115, 22, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-7 {
    background: rgba(96, 165, 250, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-8 {
    background: rgba(45, 212, 191, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-9 {
    background: rgba(244, 114, 182, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-10 {
    background: rgba(248, 113, 113, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-11 {
    background: rgba(253, 224, 71, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-12 {
    background: rgba(129, 140, 248, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-13 {
    background: rgba(74, 222, 128, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-14 {
    background: rgba(251, 146, 60, 0.18);
}

#frameMeterOverlay .combo-tag-chip.tagmod-15 {
    background: rgba(103, 232, 249, 0.18);
}

#frameMeterOverlay .combo-details-buttons-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
}

#frameMeterOverlay .combo-details-buttons-icons .btn-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

#frameMeterOverlay .combo-details-buttons-icons .btn-token img {
    /* Modal icons: 75% of prior 27px (was 1.5× table 18px). */
    width: calc(27px * 0.75);
    height: calc(27px * 0.75);
    object-fit: contain;
}

#frameMeterOverlay .combo-details-buttons-icons .btn-token[data-token="Hold2"] img,
#frameMeterOverlay .combo-details-buttons-icons .btn-token[data-token="Hold3"] img {
    width: auto;
    height: calc(27px * 0.75);
}

#frameMeterOverlay .combo-details-buttons-icons .btn-token-text {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#frameMeterOverlay .combo-details-bar-meter {
    overflow: visible;
}

#frameMeterOverlay .combo-details-bar-tags {
    color: #cbd5e1;
    font-family: inherit;
    font-size: 12px;
}

#frameMeterOverlay .combo-details-command {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: calc(12px * 0.75);
    color: #f1f5f9;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#frameMeterOverlay .combo-details-command-edit {
    display: block;
    width: 100%;
    min-height: 20px;
    /* The surrounding bar already provides the panel styling. */
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
    font-family: inherit;
    font-size: calc(18px * 0.75);
    color: #f1f5f9;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.35;
    padding-top: 2px;
    padding-bottom: 2px;
}

#frameMeterOverlay .combo-details-command-edit .frame-meter-command-step {
    color: var(--fm-step-accent, #f1f5f9);
    font-weight: 700;
}

#frameMeterOverlay .frame-meter-modal-visual-wrap {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    overflow: visible;
}

#frameMeterOverlay .frame-meter-block[data-step] {
    box-shadow: inset 0 -2px 0 var(--fm-step-accent, rgba(148, 163, 184, 0.0));
}

#frameMeterOverlay .frame-meter-block.frame-meter-step-start {
    border-left-width: 2px;
    border-left-color: var(--fm-step-accent, #000);
}

#frameMeterOverlay .combo-details-command .frame-meter-command-step {
    color: var(--fm-step-accent, #f1f5f9);
    font-weight: 700;
}

#frameMeterOverlay .frame-meter-block.is-step-highlight {
    outline: 1px solid rgba(241, 245, 249, 0.75);
    outline-offset: -1px;
}

/* Cycle per-move accent colors (repeats every 8 moves). */
#frameMeterOverlay .frame-meter-stepmod-0 {
    --fm-step-accent: #38bdf8;
}

#frameMeterOverlay .frame-meter-stepmod-1 {
    --fm-step-accent: #34d399;
}

#frameMeterOverlay .frame-meter-stepmod-2 {
    --fm-step-accent: #fb7185;
}

#frameMeterOverlay .frame-meter-stepmod-3 {
    --fm-step-accent: #fbbf24;
}

#frameMeterOverlay .frame-meter-stepmod-4 {
    --fm-step-accent: #a78bfa;
}

#frameMeterOverlay .frame-meter-stepmod-5 {
    --fm-step-accent: #22c55e;
}

#frameMeterOverlay .frame-meter-stepmod-6 {
    --fm-step-accent: #f97316;
}

#frameMeterOverlay .frame-meter-stepmod-7 {
    --fm-step-accent: #60a5fa;
}

#frameMeterOverlay .frame-meter-visual {
    width: 100%;
    max-width: 100%;
    min-height: 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    border: 1px solid #000;
    background: #0b0f14;
    user-select: none;
    contain: layout paint style;
}

/* Combo details: section chrome is on .combo-details-bar-meter; strip inner meter “TV frame”. */
#frameMeterOverlay .combo-details-meter-wrap .frame-meter-visual,
#frameMeterOverlay .frame-meter-modal-visual-wrap .frame-meter-visual {
    border: none;
    background: transparent;
    box-shadow: none;
}

#frameMeterOverlay .frame-meter-line-break {
    flex: 0 0 100%;
    height: 0;
}

#frameMeterOverlay .frame-meter-empty {
    color: #8d8d8d;
    font-size: 11px;
    line-height: 1;
}

#frameMeterOverlay .frame-meter-block {
    width: 10px;
    min-width: 10px;
    min-height: 20px;
    padding: 0;
    box-sizing: border-box;
    border: solid #000;
    border-width: 2px 1px;
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 1;
    color: transparent;
    margin: 0;
    contain: paint;
}

#frameMeterOverlay .frame-meter-startup {
    background-color: var(--fat-frame-meter-startup);
}

#frameMeterOverlay .frame-meter-active {
    background-color: var(--fat-frame-meter-active);
}

#frameMeterOverlay .frame-meter-recovery {
    background-color: var(--fat-frame-meter-recovery);
}

#frameMeterOverlay .frame-meter-delay {
    background-color: #0b0f14;
    color: #f1f5f9;
}

#frameMeterOverlay .frame-meter-state-complete-invincible {
    background: repeating-linear-gradient(0deg, #f8fafc 0 2px, #cfd4db 2px 4px);
    color: #111827;
    text-shadow: none;
}

#frameMeterOverlay .frame-meter-state-projectile-invincible {
    background: repeating-linear-gradient(0deg, #f3a311 0 2px, #f8fafc 2px 4px);
    color: #111827;
    text-shadow: none;
}

#frameMeterOverlay .frame-meter-state-atk-projectile-invincible {
    background-image:
        repeating-linear-gradient(0deg, #d61f78 0 2px, #f8fafc 2px 4px),
        repeating-linear-gradient(0deg, #f3a311 0 2px, #f8fafc 2px 4px);
    background-size: 100% 50%, 100% 50%;
    background-position: top left, bottom left;
    background-repeat: no-repeat, no-repeat;
    color: #111827;
    text-shadow: none;
}

#frameMeterOverlay .frame-meter-state-atk-throw-invincible {
    background: repeating-linear-gradient(0deg, #d61f78 0 2px, #f8fafc 2px 4px);
    color: #111827;
    text-shadow: none;
}

#frameMeterOverlay .frame-meter-state-projectile {
    background: #f3a311;
}

#frameMeterOverlay .frame-meter-state-parry {
    background: #7b2fb5;
}

#frameMeterOverlay .frame-meter-segment-end {
    padding: 0;
    font-size: 12px;
    font-family: inherit;
    font-weight: 800;
    color: #ffffff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#frameMeterOverlay .frame-meter-gap {
    width: 10px;
    min-width: 10px;
    min-height: 20px;
    padding: 0 2px;
    box-sizing: border-box;
    border: solid #000;
    border-width: 2px 1px;
    background: var(--fat-frame-meter-invalid);
    color: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    margin: 0;
}

#frameMeterOverlay .combo-details-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0 0 10px;
}

#frameMeterOverlay .combo-details-label {
    font-size: 12px;
    color: var(--text-dim, #c9c9c9);
}

#frameMeterOverlay .combo-details-input,
#frameMeterOverlay .combo-details-textarea {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    padding: 5px 7px;
    font-size: 11px;
    font-family: inherit;
    box-sizing: border-box;
}

#frameMeterOverlay .combo-details-video-wrap[hidden] {
    display: none;
}

#frameMeterOverlay .combo-details-video-embed {
    width: min(520px, 60%);
    border: 1px solid #444;
    border-radius: 6px;
    background: #0f0f0f;
    padding: 8px;
    box-sizing: border-box;
    margin: 0 auto;
}

#frameMeterOverlay .combo-details-video-embed iframe,
#frameMeterOverlay .combo-details-video-embed video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    border: 0;
    border-radius: 4px;
    background: #000;
}

#frameMeterOverlay .combo-details-textarea {
    resize: vertical;
    min-height: 60px;
}

#frameMeterOverlay #comboDetailsExtraNotes {
    resize: none;
}

#frameMeterOverlay .combo-details-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
    margin: 10px 0 10px;
}

#frameMeterOverlay .combo-details-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 11px;
    overflow-x: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
}

#frameMeterOverlay .combo-details-stats-head,
#frameMeterOverlay .combo-details-stats-row {
    display: grid;
    /* Use narrow numeric columns; keep command columns flexible for long routes. */
    grid-template-columns:
        150px
        /* Field */
        90px
        /* Value */
        110px
        /* Starter Avg */
        60px
        /* Rank */
        95px
        /* Top Damage/Eff */
        minmax(260px, 1fr)
        /* Top Combo (starter) */
        160px
        /* Spent Avg */
        60px
        /* Rank */
        110px
        /* Top Eff */
        minmax(260px, 1fr);
    /* Top Combo (spent) */
    column-gap: 0;
    row-gap: 0;
    align-items: center;
}

#frameMeterOverlay .combo-details-stats-head {
    padding: 0;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

#frameMeterOverlay .combo-details-stats-head>div {
    text-align: center;
    line-height: 1.1;
}

#frameMeterOverlay .combo-details-head-this {
    grid-column: 1 / 3;
}

#frameMeterOverlay .combo-details-stats-row {
    color: #ffffff;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#frameMeterOverlay .combo-details-stats-row>div:nth-child(2),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(3),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(4),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(5),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(7),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(8),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(9) {
    text-align: right;
}

#frameMeterOverlay .combo-details-stats-row>div:nth-child(6),
#frameMeterOverlay .combo-details-stats-row>div:nth-child(10) {
    text-align: left;
}

#frameMeterOverlay .combo-details-jump {
    color: #93c5fd;
    text-decoration: underline;
    cursor: pointer;
}

#frameMeterOverlay .combo-details-jump:hover {
    color: #bfdbfe;
}

#frameMeterOverlay .combo-details-stats-row:nth-of-type(even) {
    background: rgba(255, 255, 255, 0.02);
}

#frameMeterOverlay .combo-details-stats-row>div:nth-child(1) {
    color: #ffffff;
}

#frameMeterOverlay .combo-details-stats-row>div:not(:first-child) {
    font-family: inherit;
    font-size: 11px;
    color: #f1f5f9;
}

#frameMeterOverlay .combo-details-stats-row>div,
#frameMeterOverlay .combo-details-stats-head>div {
    padding: 3px 8px;
}

#frameMeterOverlay .combo-details-stats-head>div:not(:first-child),
#frameMeterOverlay .combo-details-stats-row>div:not(:first-child) {
    border-left: 1px solid rgba(255, 255, 255, 0.10);
}

#frameMeterOverlay .combo-details-actions {
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    background: transparent;
    padding-top: 6px;
    padding-bottom: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#frameMeterOverlay .combo-details-allfields {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-x: hidden;
    min-width: 0;
}

#frameMeterOverlay .combo-details-auto-toggles {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

#frameMeterOverlay .combo-details-auto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 6px;
    border-radius: 18px;
    background: #161616;
    border: 1px solid #2a2a2a;
}

#frameMeterOverlay .combo-details-auto-toggle-label {
    color: #d0d0d0;
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

#frameMeterOverlay .combo-details-auto-toggle-group {
    display: inline-flex;
    border: 1px solid #2c2c2c;
    border-radius: 999px;
    margin-right: 0;
    height: 22px;
    padding: 2px;
    gap: 2px;
    background: #1f1f1f;
}

#frameMeterOverlay .combo-details-auto-toggle-btn {
    border: 0;
    background: transparent;
    color: #d0d0d0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    min-width: 40px;
    height: 18px;
    padding: 0 8px;
    cursor: pointer;
}

#frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #2a2a2a;
    color: #f5f5f5;
}

#frameMeterOverlay .combo-details-auto-toggle-btn.is-disabled {
    opacity: 0.45;
    cursor: default;
}

#frameMeterOverlay .combo-details-allfields-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d7d7d7;
}

#frameMeterOverlay .combo-details-allfields-grid {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    overflow: hidden;
}

/* Whole field table: outer edge (table borders are unreliable with collapse + wide grids). */
#frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
}

#frameMeterOverlay .combo-details-layout-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 1540px;
    border: none;
    border-radius: 0;
    overflow: visible;
}

#frameMeterOverlay .combo-details-layout-table td,
#frameMeterOverlay .combo-details-layout-table th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    vertical-align: top;
}

#frameMeterOverlay .combo-details-layout-table td:last-child,
#frameMeterOverlay .combo-details-layout-table th:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#frameMeterOverlay .combo-details-layout-table tr:last-child td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

#frameMeterOverlay .combo-details-layout-section th {
    padding: 4px 8px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d0d0d0;
    background: rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

#frameMeterOverlay .combo-details-layout-section.split th.empty {
    background: transparent;
    border: 0 !important;
    border-top: 0 !important;
}

#frameMeterOverlay .combo-details-layout-table tr > td:nth-last-child(2):not(.combo-details-layout-empty),
#frameMeterOverlay .combo-details-layout-table tr > th:nth-last-child(2):not(.empty) {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#frameMeterOverlay .combo-details-layout-cell-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 4px 6px;
    text-align: center;
}

#frameMeterOverlay .combo-details-layout-cell[data-field="special_condition"] {
    min-width: 150px;
}

#frameMeterOverlay .combo-details-layout-cell[data-field="special_condition"] .combo-details-allfields-input {
    min-width: 0;
}

#frameMeterOverlay .combo-details-layout-label {
    font-size: 10px;
    color: #b9b9b9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

#frameMeterOverlay .combo-details-layout-empty {
    background: transparent;
    border: 0 !important;
    box-shadow: none !important;
}


#frameMeterOverlay .combo-details-layout-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#frameMeterOverlay .combo-details-layout-compact-section {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    overflow: hidden;
}

#frameMeterOverlay .combo-details-layout-compact-section-title {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d0d0d0;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

#frameMeterOverlay .combo-details-layout-compact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

#frameMeterOverlay .combo-details-layout-compact-cell {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#frameMeterOverlay .combo-details-layout-compact-cell:last-child {
    border-bottom: 0;
}

#frameMeterOverlay .combo-details-layout-compact-label {
    font-size: 10px;
    color: #b9b9b9;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#frameMeterOverlay .combo-details-layout-compact-control {
    min-width: 0;
}

#frameMeterOverlay .combo-details-allfields-grid>div {
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.35;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#frameMeterOverlay .combo-details-allfields-grid>div.combo-details-allfields-section {
    grid-column: 1 / -1;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d0d0d0;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

#frameMeterOverlay .combo-details-allfields-grid>div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

#frameMeterOverlay .combo-details-allfields-grid>div:nth-child(odd) {
    color: #bdbdbd;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.10);
}

#frameMeterOverlay .combo-details-allfields-grid>div:nth-child(even) {
    color: #f5f5f5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    overflow-wrap: anywhere;
}

#frameMeterOverlay .combo-details-allfields-input {
    width: 100%;
    box-sizing: border-box;
    background: #0f0f0f;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    text-align: center;
}

#comboView .combo-url-input,
#frameMeterOverlay .combo-url-input,
#treeView .combo-url-input {
    cursor: alias;
}

#frameMeterOverlay .combo-details-allfields-input option {
    text-align: center;
}

@media (max-width: 1100px) {

    #frameMeterOverlay .combo-details-stats-head,
    #frameMeterOverlay .combo-details-stats-row {
        grid-template-columns:
            140px 80px 110px 60px 90px minmax(220px, 1fr) 140px 60px 90px minmax(220px, 1fr);
    }
}

@media (max-width: 900px) {
    #frameMeterOverlay .combo-details-stats {
        overflow-x: auto;
    }
}

#comboView #Table1 tr.combo-row-frame td p {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 24px;
    width: min(100%, var(--combo-command-col-width, 440px));
    max-width: var(--combo-command-col-width, 440px);
    min-width: 0;
    overflow: hidden;
}

/* Keep first visible tag/frame row from looking compressed under the fixed header. */
#comboView #Table1 tr.combo-row-visible-start.combo-row-frame td p {
    min-height: 26px;
}

/* Tag row baseline height: keep consistent for first and subsequent groups. */
#comboView #Table1 tr.combo-row-frame {
    height: var(--combo-tag-row-height, 34px) !important;
}

#comboView #Table1 tr.combo-row-frame td {
    height: var(--combo-tag-row-height, 34px) !important;
    min-height: var(--combo-tag-row-height, 34px) !important;
    vertical-align: middle !important;
}

/* Left label cell on tag rows: vertically center text against the tag chip area. */
#comboView #Table1 tr.combo-row-frame td:first-child p {
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#comboView #Table1 tr.combo-row-frame td:nth-child(2) p {
    min-height: 26px;
    display: flex;
    align-items: center;
}

#comboView .frame-meter-empty {
    color: #8d8d8d;
    font-size: 11px;
    line-height: 1;
}

#comboView .frame-meter-block {
    min-width: 10px;
    min-height: 20px;
    padding: 0;
    box-sizing: border-box;
    border: solid #000;
    border-width: 2px 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 1;
    color: transparent;
    margin: 0;
    contain: paint;
}

#comboView .frame-meter-startup {
    background-color: var(--fat-frame-meter-startup);
}

#comboView .frame-meter-active {
    background-color: var(--fat-frame-meter-active);
}

#comboView .frame-meter-recovery {
    background-color: var(--fat-frame-meter-recovery);
}

#comboView .frame-meter-delay {
    background-color: #0b0f14;
    color: #f1f5f9;
}

#comboView .frame-meter-state-complete-invincible {
    background: repeating-linear-gradient(0deg, #f8fafc 0 2px, #cfd4db 2px 4px);
    color: #111827;
    text-shadow: none;
}

#comboView .frame-meter-state-projectile-invincible {
    background: repeating-linear-gradient(0deg, #f3a311 0 2px, #f8fafc 2px 4px);
    color: #111827;
    text-shadow: none;
}

#comboView .frame-meter-state-atk-projectile-invincible {
    background-image:
        repeating-linear-gradient(0deg, #d61f78 0 2px, #f8fafc 2px 4px),
        repeating-linear-gradient(0deg, #f3a311 0 2px, #f8fafc 2px 4px);
    background-size: 100% 50%, 100% 50%;
    background-position: top left, bottom left;
    background-repeat: no-repeat, no-repeat;
    color: #111827;
    text-shadow: none;
}

#comboView .frame-meter-state-atk-throw-invincible {
    background: repeating-linear-gradient(0deg, #d61f78 0 2px, #f8fafc 2px 4px);
    color: #111827;
    text-shadow: none;
}

#comboView .frame-meter-state-projectile {
    background: #f3a311;
}

#comboView .frame-meter-state-parry {
    background: #7b2fb5;
}

#comboView .frame-meter-segment-end {
    padding: 0 2px;
    font-size: 14px;
    font-family: "Roboto", "Helvetica Neue", sans-serif;
    font-weight: 700;
    color: #ffffff;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#comboView .frame-meter-gap {
    min-width: 10px;
    min-height: 20px;
    padding: 0 2px;
    box-sizing: border-box;
    border: solid #000;
    border-width: 2px 1px;
    background: var(--fat-frame-meter-invalid);
    color: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-family: "Roboto", "Helvetica Neue", sans-serif;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    margin: 0;
}

/* High-volume mode: reduce paint cost of frame meters on large datasets. */
#comboView .frame-meter-visual.frame-meter-lite {
    border-width: 1px;
}

#comboView .frame-meter-visual.frame-meter-lite .frame-meter-block,
#comboView .frame-meter-visual.frame-meter-lite .frame-meter-gap {
    border-width: 1px;
    text-shadow: none;
}

#comboView .frame-meter-visual.frame-meter-lite .frame-meter-lite-segment {
    min-width: 14px;
    padding: 0 4px;
}

#comboView .frame-meter-visual.frame-meter-lite .frame-meter-state-complete-invincible {
    background: #d7dbe2;
    color: #111827;
}

#comboView .frame-meter-visual.frame-meter-lite .frame-meter-state-projectile-invincible {
    background: #f3a311;
    color: #111827;
}

#comboView .frame-meter-visual.frame-meter-lite .frame-meter-state-atk-throw-invincible {
    background: #d61f78;
    color: #111827;
}

#comboView .frame-meter-visual.frame-meter-lite .frame-meter-state-atk-projectile-invincible {
    background: linear-gradient(to bottom, #d61f78 0 50%, #f3a311 50% 100%);
    color: #111827;
}

body[data-theme="light"] #comboView .frame-meter-block {
    border-color: #000;
    color: transparent;
    text-shadow: none;
}

/* In light mode, keep numeric labels visible on segment-end blocks. */
body[data-theme="light"] #comboView .frame-meter-block.frame-meter-segment-end {
    color: #ffffff;
    text-shadow: -1px -1px 0 #0b0f14, 1px -1px 0 #0b0f14, -1px 1px 0 #0b0f14, 1px 1px 0 #0b0f14;
}

body[data-theme="light"] #comboView .frame-meter-state-complete-invincible {
    color: #111827;
    border-color: #000;
}

body[data-theme="light"] #comboView .frame-meter-visual {
    border-color: #000;
    background: #e2e8f0;
    scrollbar-color: #94a3b8 #e2e8f0;
}

body[data-theme="light"] #comboView .frame-meter-gap {
    border-color: #000;
    background: #4d4d4d;
    color: #f1f5f9;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    letter-spacing: -1px;
}

#comboView .cmd-input[data-field="buttons"] {
    border: none;
    background: transparent;
    padding: 0 0 0 6px;
    line-height: 1.45;
}

#comboView .cmd-input.cmd-active {
    border-color: #f97306;
    box-shadow: 0 0 0 1px rgba(249, 115, 6, 0.4);
}

#comboView .cmd-input.cmd-warning {
    position: relative;
    padding-right: 14px;
    border-color: #f5c451;
    box-shadow: 0 0 0 1px rgba(245, 196, 81, 0.35);
}

#comboView .cmd-input.cmd-warning::after {
    content: "!";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #f5c451;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
}

body[data-theme="light"] #comboView .cmd-input.cmd-warning {
    border-color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.42);
}

body[data-theme="light"] #comboView .cmd-input.cmd-warning::after {
    color: #92400e;
}

#comboView .btn-token {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    vertical-align: middle;
}

#comboView .cmd-input[data-field="buttons"] .btn-token {
    margin-right: 4px;
    margin-bottom: 2px;
}

#comboView .cmd-input[data-field="buttons"] .btn-token:last-child {
    margin-right: 0;
}

#comboView .btn-token img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

#comboView .btn-token[data-token="Hold2"] img,
#comboView .btn-token[data-token="Hold3"] img {
    width: auto;
    height: 18px;
}

#comboView .btn-token-text {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#comboView #Table5 p.shortcut-seq {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-wrap: nowrap;
}

#comboView .cmd-input:focus,
#comboView .cell-input:focus,
#comboView #Table1 select:focus {
    outline: 1px solid #f97306;
    border-color: #f97306;
}

#comboView #SiteSearch1 {
    background: #0c0c0c;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 3px 6px;
}

#comboView #Button1,
#comboView #Button2,
#comboView #Button3,
#comboView #Button4 {
    background: #151515;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

#comboView #Button1:hover,
#comboView #Button2:hover,
#comboView #Button3:hover,
#comboView #Button4:hover {
    border-color: #f97306;
}

#comboView .combo-search-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #fff;
    position: absolute;
    padding-top: 14px;
}

#comboView .combo-search-shell .search-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

#comboView .combo-search-shell .search-page-heading {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #bfbfbf;
}

#comboView .combo-search-shell .search-page-heading__page-title {
    font-size: 12px;
}

#comboView .combo-search-shell .search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#comboView .combo-search-shell #SiteSearch1 {
    flex: 0 0 240px;
    width: 240px;
    min-width: 240px;
    height: 28px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #3a3a3a;
    background: #0c0c0c;
    color: #fff;
}

#comboView .combo-search-shell .combo-search-scope {
    height: 28px;
    border-radius: 6px;
    border: 1px solid #3a3a3a;
    background: #0f0f0f;
    color: #fff;
    padding: 0 6px;
    min-width: 110px;
}

#comboView .combo-search-shell .combo-search-btn,
#comboView .combo-search-shell .combo-search-adv-btn,
#comboView .combo-search-shell .combo-search-secondary,
#comboView .combo-search-shell .filter-actions button {
    border: 1px solid #3a3a3a;
    background: #151515;
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    height: 28px;
    font-size: 11px;
    cursor: pointer;
}

#comboView .combo-search-shell .combo-search-btn:hover,
#comboView .combo-search-shell .combo-search-adv-btn:hover,
#comboView .combo-search-shell .combo-search-secondary:hover,
#comboView .combo-search-shell .filter-actions button:hover {
    border-color: #f97306;
}

#comboView .combo-search-shell .combo-search-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

#comboView .combo-save-status {
    position: absolute;
    top: 4px;
    right: 12px;
    z-index: 30;
    font-size: 11px;
    opacity: 0.8;
    white-space: nowrap;
    color: #d1d5db;
}

#comboView .combo-save-status.dirty {
    opacity: 1;
    color: #f97306;
}

#comboView .combo-save-status.recovered {
    opacity: 1;
    color: #f59e0b;
}

#comboView .combo-loading-status {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 31;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: #fbbf24;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 999px;
    padding: 4px 12px;
    pointer-events: none;
}

#comboView .combo-loading-status.hidden {
    display: none;
}

#comboView .combo-load-more-wrap {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 32;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #2f2f2f;
    border-radius: 8px;
    background: rgba(12, 12, 12, 0.88);
}

#comboView .combo-load-more-wrap.hidden {
    display: none;
}

#comboView .combo-load-more-info {
    font-size: 10px;
    color: #bdbdbd;
    white-space: nowrap;
}

#comboView .combo-load-more-btn {
    border: 1px solid #3a3a3a;
    background: #171717;
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    height: 26px;
    font-size: 11px;
    cursor: pointer;
}

#comboView .combo-load-more-btn:hover {
    border-color: #f97306;
}

#comboView .combo-load-more-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

#comboView .combo-search-shell .combo-export-wrapper {
    position: relative;
    display: inline-flex;
}

#comboView .combo-search-shell .combo-export-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 340;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 6px 6px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    background: #0f0f0f;
    min-width: 180px;
}

#comboView .combo-search-shell .combo-export-menu .tutorial-flow-trigger-export {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    margin: 0;
}

#comboView .combo-search-shell .combo-export-options {
    display: grid;
    gap: 6px;
    padding: 2px 2px 6px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 4px;
}

#comboView .combo-search-shell .combo-export-options label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: #bfbfbf;
}

#comboView .combo-search-shell .combo-export-options select {
    background: #101010;
    color: #fff;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
}

.combo-export-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    padding: 8px 12px;
    border-radius: 6px;
    background: #101010;
    color: #fff;
    border: 2px solid #6b6b6b;
    font-size: 11px;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 6px));
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.combo-export-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.combo-export-toast.error {
    background: #3a1212;
    border-color: #d14b4b;
}

.combo-export-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
}

.combo-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    pointer-events: none;
}

#comboView .combo-search-shell .combo-export-menu.hidden {
    display: none;
}

#comboView .combo-search-shell .combo-export-menu button:not(.tutorial-flow-trigger) {
    border: 1px solid #3a3a3a;
    background: #151515;
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    height: 28px;
    font-size: 11px;
    cursor: pointer;
    text-align: left;
}

#comboView .combo-search-shell .combo-export-menu button:not(.tutorial-flow-trigger):hover {
    border-color: #f97306;
}

#comboView .combo-search-shell .search-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    align-items: flex-end;
}

#comboView .combo-search-shell .advanced-filters {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 320;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background: #0f0f0f;
    padding: 28px 6px 6px;
    width: min(900px, calc(100vw - 24px));
    min-width: min(700px, calc(100vw - 24px));
    max-width: min(900px, calc(100vw - 24px));
}

#comboView .combo-search-shell .advanced-filters[open] {
    display: block;
}

#comboView .combo-search-shell .advanced-filters summary {
    display: none;
}

#comboView .combo-search-shell .search-advanced-filters {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-top: 0;
}

#comboView .combo-search-shell .search-advanced-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 5px 8px;
    padding-right: 0;
}

#comboView .combo-search-shell .search-advanced-options .control-group.field-search {
    grid-column: 1 / -1;
}

#comboView .combo-search-shell .control-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
    padding: 4px 5px;
    background: #101010;
}

/* Combo Tree page right pane does not need "Combo Tree" button. */
#treeView #frameMeterOverlay.tree-docked #comboDetailsOpenTreeBtn {
    display: none !important;
}

/* Combo Tree page right pane does not need "Combo Tree" button. */
#treeView #frameMeterOverlay.tree-docked #comboDetailsOpenTreeBtn {
    display: none !important;
}

#comboView .combo-search-shell .control-label {
    font-size: 10px;
    color: #bfbfbf;
}

#comboView .combo-search-shell .field-search-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#comboView .combo-search-shell .field-search-controls input[type="text"],
#comboView .combo-search-shell .field-search-controls input[type="search"] {
    width: 100%;
    height: 22px;
    border-radius: 5px;
    border: 1px solid #3a3a3a;
    background: #0c0c0c;
    color: #fff;
    padding: 0 4px;
    font-size: 10px;
    box-sizing: border-box;
}

#comboView .combo-search-shell .field-search-group {
    gap: 4px 7px;
}

#comboView .combo-search-shell .field-command-scope {
    margin-top: 2px;
    margin-left: 12px;
    gap: 2px 6px;
}

#comboView .combo-search-shell .field-command-scope.hidden {
    display: none;
}

#comboView .combo-search-shell .field-command-scope .checkbox-item {
    font-size: 9px;
}

#comboView .combo-search-shell .field-search-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

#comboView .combo-search-shell .field-search-inline-label {
    font-size: 10px;
    color: #bfbfbf;
    white-space: nowrap;
}

#comboView .combo-search-shell .field-search-row .field-search-group {
    flex: 1;
}

#comboView .combo-search-shell .controls select {
    width: 100%;
    height: 22px;
    border-radius: 5px;
    border: 1px solid #3a3a3a;
    background: #0c0c0c;
    color: #fff;
    padding: 0 4px;
}

#comboView .combo-search-shell .controls input[type="text"],
#comboView .combo-search-shell .controls input[type="number"] {
    width: 100%;
    height: 22px;
    border-radius: 5px;
    border: 1px solid #3a3a3a;
    background: #0c0c0c;
    color: #fff;
    padding: 0 4px;
    font-size: 9px;
    box-sizing: border-box;
    box-shadow: none;
}

#comboView .combo-search-shell .grouped-control {
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

#comboView .combo-search-shell .grouped-control-label {
    font-size: 11px;
    color: #bfbfbf;
}

#comboView .combo-search-shell .grouped-control-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #e0e0e0;
}

#comboView .combo-search-shell .grouped-control-field input {
    margin: 0;
}

#comboView .combo-search-shell .inline-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

#comboView .combo-search-shell .search-advanced-additional-options {
    margin-top: 5px;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
    padding: 5px 7px;
    background: #101010;
}

#comboView .combo-search-shell .search-advanced-additional-options summary {
    cursor: pointer;
    font-size: 10px;
    color: #bfbfbf;
    margin-bottom: 5px;
}

#comboView .combo-search-shell .count-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

#comboView .combo-search-shell .count-group .controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

#comboView .combo-search-shell .count-group .controls input {
    width: 90px;
}

#comboView .combo-search-shell .range-sep {
    color: #9a9a9a;
    font-size: 11px;
}

#comboView .combo-search-shell .second-search-button {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

#comboView .combo-search-shell .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
}

#comboView .combo-search-shell .checkbox-group.checkbox-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

#comboView .combo-search-shell .checkbox-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: #e6e6e6;
}

#comboView .combo-search-shell .checkbox-item input {
    margin: 0;
}

#comboView .combo-search-shell .search-advanced-filters {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

#comboView .combo-search-shell .range-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 3px 8px;
    margin-top: 5px;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized {
    display: block;
    margin-top: 5px;
}

#comboView .combo-search-shell .range-row {
    display: grid;
    grid-template-columns: minmax(52px, 66px) minmax(0, 1fr);
    align-items: start;
    gap: 2px 4px;
    font-size: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2px 0;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .range-row {
    display: grid;
    grid-template-columns: minmax(50px, 64px) minmax(0, 1fr);
    align-items: center;
    gap: 2px 4px;
    width: 100%;
    padding: 2px 0;
    border-bottom: none;
    min-width: 0;
}

#comboView .combo-search-shell .range-row .range-label {
    padding-right: 0;
    border-right: none;
    font-size: 9px;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .range-row .range-label {
    align-items: center;
    justify-content: flex-start;
    display: flex;
    width: 100%;
    text-align: left;
    line-height: 1.15;
    font-size: 8px;
    font-weight: 600;
    white-space: normal;
}

#comboView .combo-search-shell .range-inputs {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding-right: 8px;
    margin-right: 6px;
}

#comboView .combo-search-shell .range-row:last-child {
    border-bottom: none;
}

#comboView .combo-search-shell .range-row input {
    height: 18px;
    font-size: 9px;
    border-radius: 5px;
    border: 1px solid #3a3a3a;
    background: #0c0c0c;
    color: #fff;
    padding: 0 3px;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    background-clip: padding-box;
}

#comboView .combo-search-shell .range-row input:focus {
    box-shadow: none;
}

#comboView .combo-search-shell .range-inputs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .range-inputs {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    width: 100%;
    max-width: 100%;
}

#comboView .combo-search-shell .range-minmax {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 3px;
    width: 100%;
    max-width: 100%;
}

#comboView .combo-search-shell .range-minmax .range-min,
#comboView .combo-search-shell .range-minmax .range-max {
    width: 100%;
    min-width: 0;
}

#comboView .combo-search-shell .range-exact {
    width: 100%;
    min-width: 0;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .range-minmax {
    width: 100%;
    min-width: 0;
    max-width: none;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .range-exact,
#comboView .combo-search-shell .range-grid.range-grid-categorized .range-minmax .range-min,
#comboView .combo-search-shell .range-grid.range-grid-categorized .range-minmax .range-max {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .range-exact {
    max-width: 100%;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table {
    width: 100%;
    table-layout: fixed;
    font-size: 9px;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table td,
#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table th {
    padding: 4px 4px;
    vertical-align: top;
    font-size: 9px;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
    overflow: hidden;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-cell .range-row,
#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-cell .range-inputs,
#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-cell .range-minmax {
    min-width: 0;
    max-width: 100%;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-empty {
    background: #111;
    border: 0;
}

#comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-section th {
    text-align: center;
    font-size: 9px;
    font-weight: 600;
}

#comboView .combo-search-shell .filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

#comboView .combo-search-shell .combo-filter-panel {
    position: relative;
    min-width: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

#comboView .combo-search-shell .combo-filter-panel.hidden {
    display: none;
}

#comboView #wb_Image1 {
    cursor: pointer;
    height: 100px;
}

#comboView #wb_Image1 img {
    display: block;
}

#comboView #wb_Image1 .combo-portrait-caret {
    position: absolute;
    right: 21px;
    bottom: 4px;
    font-size: 12px;
    line-height: 1;
    color: #f5f5f5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

#comboView .combo-control-tabs img {
    opacity: 1;
    filter: none;
}

#comboView .combo-control-tabs {
    width: auto;
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
    margin: 0;
}

#comboView .combo-control-tabs .char-control-tabs-list {
    justify-content: flex-start;
    padding: 4px;
    gap: 4px;
    border-radius: 18px;
}

#comboView .combo-control-tabs .char-control-tabs-list li {
    padding: 4px 8px;
    border-radius: 14px;
}

#comboView .combo-control-tabs .char-control-tabs-list img {
    height: 16px;
    width: auto;
}

#comboView .combo-control-tabs .combo-auto-input-toggles {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#comboView .combo-control-tabs .combo-poison-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 6px;
    border-radius: 18px;
    background: #161616;
    border: 1px solid #2a2a2a;
}

#comboView .combo-control-tabs .combo-poison-toggle-label {
    color: #d0d0d0;
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

#comboView .combo-control-tabs .combo-poison-toggle-group.lang-toggle {
    margin-right: 0;
    height: 22px;
    padding: 2px;
    gap: 2px;
    background: #1f1f1f;
    border-color: #2c2c2c;
}

#comboView .combo-control-tabs .combo-poison-toggle-btn {
    min-width: 40px;
    height: 18px;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: none;
}

#comboView .combo-control-tabs .combo-poison-toggle-btn.is-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

#comboView #Table1 td.combo-auto-source-marker {
    position: relative;
}

#comboView #Table1 td.combo-auto-source-marker::before {
    content: "*";
    position: absolute;
    top: 1px;
    right: 4px;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    pointer-events: none;
    opacity: 0.95;
}

/* Frame meter cells should not show auto-source asterisk marker. */
#comboView #Table1 tr.combo-row-frame td.combo-auto-source-marker::before {
    content: none;
}

#comboView #Table1 td.combo-cell-auto-source-auto::before {
    color: #3cc5f7;
}

#comboView #Table1 td.combo-cell-auto-source-user::before {
    color: #ffcc70;
}


body[data-theme="light"] #comboView {
    background: #efefef;
    color: #111;
}

/* Combo view top strip should not inherit frame-view top/bottom lines in light mode. */
body[data-theme="light"] #comboView .char-control-tabs.combo-control-tabs {
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
}

body[data-theme="light"] #comboView .combo-control-tabs .combo-poison-toggle-label {
    color: #333;
}

body[data-theme="light"] #comboView .combo-control-tabs .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #comboView #Table1 th {
    background: #e1e1e1;
    color: #111;
    border-color: #dcdcdc;
}

body[data-theme="light"] #comboView #Table1 td {
    background: #ffffff;
    color: #111;
    border-color: #d6d6d6;
}

body[data-theme="light"] #comboView #comboTableHeader th,
body[data-theme="light"] #comboView #comboTableHeader td {
    background: #e1e1e1;
    color: #111;
    border-color: #dcdcdc;
}

body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(1) th,
body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(1) td {
    background: #d8d8d8;
}

body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(2) th,
body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(2) td {
    background: #ececec;
    border-bottom-color: #b9b9b9;
}

/* Light-mode parity: same bottom border thickness for rowspan headers. */
body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(1) th[rowspan="2"],
body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(1) td[rowspan="2"] {
    border-bottom: 2px solid #b9b9b9;
}

body[data-theme="light"] #comboView .combo-col-eye {
    background: #ececec;
    color: #111;
    border-color: #bdbdbd;
}

body[data-theme="light"] #comboView #comboColumnTogglePanel {
    background: #f7f7f7;
    border-color: #c9c9c9;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] #comboView #comboColumnTogglePanel .combo-col-checkbox {
    color: #111;
}

body[data-theme="light"] #comboView #Table1 tbody tr.combo-group-even:not(.selected) td {
    background: #f1f1f1;
}

body[data-theme="light"] #comboView #Table1 tbody tr.combo-group-odd:not(.selected) td {
    background: #dddddd;
}

body[data-theme="light"] #comboView #Table1 tr.combo-group-even:not(.selected) td {
    background: #f1f1f1;
}

body[data-theme="light"] #comboView #Table1 tr.combo-group-odd:not(.selected) td {
    background: #dddddd;
}

body[data-theme="light"] #comboView #Table1 tr.combo-group-visible-even:not(.selected) td {
    background: #f1f1f1 !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-group-visible-odd:not(.selected) td {
    background: #dddddd !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-group-row:not(.selected) td {
    border-top-color: transparent !important;
    border-bottom-color: #d6d6d6 !important;
    box-shadow: none !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-group-row td {
    border-bottom-color: #d6d6d6 !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible td {
    border-top-color: transparent !important;
    border-bottom-color: #d6d6d6 !important;
    box-shadow: none !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible-start td {
    border-top-color: #cbcbcb !important;
    border-top-style: solid !important;
    border-top-width: 1px !important;
    box-shadow: none !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible-end td {
    border-bottom-color: #c6c6c6 !important;
    box-shadow: none !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-frame td:nth-child(n+3),
body[data-theme="light"] #comboView #Table1 tr.combo-row-notes td:nth-child(n+3) {
    border-left-color: transparent;
    border-right-color: transparent;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-frame td:nth-child(3),
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td:nth-child(3),
body[data-theme="light"] #comboView #Table1 tr.combo-row-notes td:nth-child(3) {
    border-left-style: none !important;
    border-right-style: none !important;
    border-top-style: none !important;
    border-bottom-style: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td:nth-child(1),
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td:nth-child(2) {
    border-right-color: #d6d6d6;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td:nth-child(n+4) {
    border-left-style: none !important;
    border-right-style: none !important;
    border-top-style: none !important;
    border-bottom-style: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 .combo-sep-right,
body[data-theme="light"] #comboView #comboTableHeader .combo-sep-right {
    border-right-color: #b4b4b4 !important;
    border-right-width: 1px !important;
}

body[data-theme="light"] #comboView #Table1 .combo-sticky-col.combo-sep-right,
body[data-theme="light"] #comboView #comboTableHeader .combo-sticky-col.combo-sep-right {
    box-shadow: inset -1px 0 0 #b4b4b4;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-frame td:first-child,
body[data-theme="light"] #comboView #Table1 tr.combo-row-notes td:first-child {
    border-left-color: #d6d6d6;
    border-right-color: #d6d6d6;
    border-top-color: #dcdcdc;
    border-bottom-color: #dcdcdc;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-frame td:first-child,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td:first-child,
body[data-theme="light"] #comboView #Table1 tr.combo-row-notes td:first-child {
    border-top-color: #dcdcdc !important;
    border-bottom-color: #dcdcdc !important;
}

body[data-theme="light"] #comboView #Table1 tr.selected td {
    background: rgba(249, 115, 6, 0.16);
    border-color: #f97306;
}

body[data-theme="light"] #comboView #Table1 tr.selected td:nth-child(1),
body[data-theme="light"] #comboView #Table1 tr.selected td:nth-child(2) {
    border-left-style: solid !important;
    border-right-style: solid !important;
    border-left-width: 1px !important;
    border-right-width: 1px !important;
    border-left-color: #f97306 !important;
    border-right-color: #f97306 !important;
}

body[data-theme="light"] #comboView #Table1 tr.selected td.combo-sticky-col {
    background: #f2dccc;
}

body[data-theme="light"] #comboView #Table1 tr.selected td.combo-sticky-col.combo-sep-right,
body[data-theme="light"] #comboView #Table1 tr.selected td.combo-sticky-col.combo-sep-right-tail {
    box-shadow: none !important;
}

body[data-theme="light"] #comboView #Table1 tr.selected td.combo-sep-right:not(.combo-sticky-col),
body[data-theme="light"] #comboView #Table1 tr.selected td.combo-sep-right-tail:not(.combo-sticky-col) {
    border-right-color: #b4b4b4 !important;
}

body[data-theme="light"] #comboView #Table1 tr.selected td:nth-child(1).combo-sep-right,
body[data-theme="light"] #comboView #Table1 tr.selected td:nth-child(1).combo-sep-right-tail,
body[data-theme="light"] #comboView #Table1 tr.selected td:nth-child(2).combo-sep-right,
body[data-theme="light"] #comboView #Table1 tr.selected td:nth-child(2).combo-sep-right-tail {
    border-right-color: #f97306 !important;
}

body[data-theme="light"] .combo-lock-badge {
    opacity: 0.9;
}

body[data-theme="light"] #comboView #Table1 .combo-input-locked {
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.45);
}

body[data-theme="light"] .combo-row-context-menu {
    border-color: #c6ccd6;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .combo-header-context-menu {
    border-color: #c6ccd6;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

body[data-theme="light"] .combo-row-context-item {
    color: #1f2937;
}

body[data-theme="light"] .combo-header-context-item {
    color: #1f2937;
}

body[data-theme="light"] .combo-row-context-item:hover,
body[data-theme="light"] .combo-row-context-item:focus {
    background: rgba(249, 115, 22, 0.18);
}

body[data-theme="light"] .combo-header-context-item:hover,
body[data-theme="light"] .combo-header-context-item:focus {
    background: rgba(249, 115, 22, 0.18);
}

body[data-theme="light"] .combo-row-context-item[disabled] {
    color: #9ca3af;
}

body[data-theme="light"] .combo-header-context-item[disabled] {
    color: #9ca3af;
}

body[data-theme="light"] .combo-header-context-item.is-active {
    color: #b45309;
}

body[data-theme="light"] .combo-row-context-sep {
    background: #e5e7eb;
}

body[data-theme="light"] .combo-header-context-divider {
    background: #e5e7eb;
}

body[data-theme="light"] .combo-header-filter-search-label {
    color: #374151;
}

body[data-theme="light"] .combo-header-filter-search {
    border-color: #c7ced8;
    background: #ffffff;
    color: #111827;
}

body[data-theme="light"] .combo-header-filter-options {
    border-color: #d1d5db;
    background: #ffffff;
    scrollbar-color: rgba(120, 120, 120, 0.72) rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .combo-header-filter-options::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.72);
}

body[data-theme="light"] .combo-header-filter-options::-webkit-scrollbar-thumb:hover {
    background: rgba(105, 105, 105, 0.8);
}

body[data-theme="light"] .combo-header-filter-options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .combo-header-filter-option {
    color: #111827;
}

body[data-theme="light"] .combo-header-filter-option:hover {
    background: rgba(249, 115, 22, 0.12);
}

body[data-theme="light"] .combo-header-filter-option-all {
    border-bottom-color: #e5e7eb;
}

body[data-theme="light"] .combo-header-filter-numeric {
    border-color: #d1d5db;
    background: #f9fafb;
}

body[data-theme="light"] .combo-header-filter-numeric-title {
    color: #374151;
}

body[data-theme="light"] .combo-header-filter-numeric-op,
body[data-theme="light"] .combo-header-filter-numeric-input {
    border-color: #c7ced8;
    background: #ffffff;
    color: #111827;
}

body[data-theme="light"] .combo-header-filter-btn {
    border-color: #bcbcbc;
    background: #e7e7e7;
    color: #111;
}

body[data-theme="light"] .combo-header-filter-btn:hover,
body[data-theme="light"] .combo-header-filter-btn:focus {
    border-color: #f97306;
    background: #e7e7e7;
}

body[data-theme="light"] .combo-header-filter-flyout {
    border-color: #c6ccd6;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

/* Light mode: same body-line rule (command row only + group separator). */
body[data-theme="light"] #comboView #Table1 tr.combo-row-frame td:nth-child(n+3),
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td:nth-child(n+3),
body[data-theme="light"] #comboView #Table1 tr.combo-row-notes td:nth-child(n+3) {
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-command td:nth-child(n+3) {
    border-top-style: solid !important;
    border-top-width: 1px !important;
    border-top-color: #cbcbcb !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible-end td:nth-child(n+3) {
    border-bottom-style: solid !important;
    border-bottom-width: 1px !important;
    border-bottom-color: #c6c6c6 !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible-end td {
    border-bottom-style: solid !important;
    border-bottom-width: 1px !important;
    border-bottom-color: #c6c6c6 !important;
}

body[data-theme="light"] #comboView #Table1 .combo-sortable::after,
body[data-theme="light"] #comboView #Table1 .combo-sortable[data-sort="asc"]::after,
body[data-theme="light"] #comboView #Table1 .combo-sortable[data-sort="desc"]::after {
    color: #111;
    text-shadow: none;
}

body[data-theme="light"] #comboView #comboTableHeader .combo-sortable::after,
body[data-theme="light"] #comboView #comboTableHeader .combo-sortable[data-sort="asc"]::after,
body[data-theme="light"] #comboView #comboTableHeader .combo-sortable[data-sort="desc"]::after {
    color: #111;
    text-shadow: none;
}

body[data-theme="light"] #comboView #Table1 .combo-sortable.combo-header-selected,
body[data-theme="light"] #comboView #comboTableHeader .combo-sortable.combo-header-selected {
    background: rgba(249, 115, 22, 0.16) !important;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.45);
}

body[data-theme="light"] #comboView #Table1 tr:not(.selected) td.combo-column-selected,
body[data-theme="light"] #comboView #Table1 tr:not(.selected) th.combo-column-selected,
body[data-theme="light"] #comboView #comboTableHeader td.combo-column-selected,
body[data-theme="light"] #comboView #comboTableHeader th.combo-column-selected {
    background: rgba(37, 99, 235, 0.14) !important;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.4);
}

body[data-theme="light"] #comboView #comboTableScroll {
    border-bottom: 2px solid #bfbfbf;
}

body[data-theme="light"] #comboView #Table2 td,
body[data-theme="light"] #comboView #Table4 td,
body[data-theme="light"] #comboView #Table5 td {
    background: #f7f7f7;
    color: #111;
    border-color: #d6d6d6;
}

body[data-theme="light"] #comboView .combo-search-shell {
    color: #111;
}

body[data-theme="light"] #comboView .combo-search-shell #SiteSearch1 {
    background: #ffffff;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView .combo-search-shell .combo-search-btn,
body[data-theme="light"] #comboView .combo-search-shell .combo-search-adv-btn,
body[data-theme="light"] #comboView .combo-search-shell .combo-search-secondary,
body[data-theme="light"] #comboView .combo-search-shell .filter-actions button {
    background: #e7e7e7;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView .combo-save-status {
    color: #2b313a;
    opacity: 0.85;
}

body[data-theme="light"] #comboView .combo-loading-status {
    color: #92400e;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(146, 64, 14, 0.35);
}

body[data-theme="light"] #comboView .combo-game-version-info {
    color: #4b5563;
    opacity: 0.9;
}

body[data-theme="light"] #comboView #Button1,
body[data-theme="light"] #comboView #Button2,
body[data-theme="light"] #comboView #Button3,
body[data-theme="light"] #comboView #Button4 {
    background: #e7e7e7;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView .combo-search-shell .combo-search-btn:hover,
body[data-theme="light"] #comboView .combo-search-shell .combo-search-adv-btn:hover,
body[data-theme="light"] #comboView .combo-search-shell .combo-search-secondary:hover,
body[data-theme="light"] #comboView .combo-search-shell .filter-actions button:hover {
    border-color: #f97306;
}

body[data-theme="light"] #comboView .combo-filter-panel {
    background: #f7f7f7;
    border-color: #c4c4c4;
    color: #111;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

body[data-theme="light"] #comboView .combo-action-btn {
    background: #e4e4e4;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] .tutorial-flow-trigger {
    background: #e6e6e6;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] .tutorial-flow-trigger:hover {
    background: #fff2e2;
    color: #111;
    border-color: #f97306;
}

body[data-theme="light"] #comboView .combo-col-preset.is-active {
    background: #ffe8cc;
    border-color: #f97306;
    color: #111;
}

body[data-theme="light"] #comboView .combo-action-create {
    background: #e4f3ea;
    border-color: #99d1ae;
    color: #14532d;
}

body[data-theme="light"] #comboView .combo-action-duplicate {
    background: #e6eefc;
    border-color: #9ab6ea;
    color: #1e3a8a;
}

body[data-theme="light"] #comboView .combo-action-delete {
    background: #fde8e8;
    border-color: #f2a2a2;
    color: #7f1d1d;
}

body[data-theme="light"] #comboView .combo-action-dedupe {
    background: #fff4d6;
    border-color: #e3c070;
    color: #7a4b00;
}

body[data-theme="light"] #comboView .combo-action-restore {
    background: #ececec;
    border-color: #bdbdbd;
    color: #2b2b2b;
}

body[data-theme="light"] #comboView .combo-bottom-toggle {
    background: #ececec;
    color: #111;
    border-color: #b1b1b1;
}

body[data-theme="light"] #comboView img.ui-btn-hotkey-icon[src*="/PS/"],
body[data-theme="light"] #comboView img.ui-btn-hotkey-icon[src*="\\PS\\"],
body[data-theme="light"] #comboView img.ui-btn-hotkey-icon[src*="/Xbox/"],
body[data-theme="light"] #comboView img.ui-btn-hotkey-icon[src*="\\Xbox\\"] {
    filter: invert(1);
}

body[data-theme="light"] #comboView .combo-bottom-toggle[data-state="collapsed"] {
    background: #ececec;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView .combo-quick-label {
    color: #111;
}

/* Force command field font size to follow the variable */
#comboView .cmd-input[data-field="command"] {
    font-size: var(--command-font-size, 12px) !important;
    line-height: 1.1 !important;
}

#comboView .cmd-input[data-field="command"] * {
    font-size: inherit !important;
    line-height: inherit !important;
}

body[data-theme="light"] #comboView .combo-bottom-toggle[data-state="expanded"] {
    border-top-color: transparent;
}

body[data-theme="light"] #comboView #wb_Image1 .combo-portrait-caret {
    color: #111;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] #comboView .cell-input,
body[data-theme="light"] #comboView select,
body[data-theme="light"] #comboView .cmd-input,
body[data-theme="light"] #comboView #Table1 select {
    background: #ffffff;
    color: #111;
    border-color: #cfcfcf;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

/* Keep button-icon rows visually identical to dark mode (no white input box fill). */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView .cmd-output {
    background: #ffffff;
    border-color: #cfcfcf;
    color: #111;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

/* Buttons are rendered as cmd-output too; force transparent look in light mode. */
body[data-theme="light"] #comboView .cmd-input[data-field="buttons"].cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-input,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons .cmd-output {
    background: transparent !important;
    border-color: transparent !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td .cmd-output,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td .cmd-input[data-field="buttons"] {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-frame td {
    min-height: 34px;
}

body[data-theme="light"] #comboView #Table1 th,
body[data-theme="light"] #comboView #Table1 td {
    color: #111;
}

body[data-theme="light"] #comboView .combo-ui-backdrop {
    background: #efefef;
}

body[data-theme="light"] #comboView #comboTableScroll {
    background: #efefef;
    scrollbar-color: #8a8a8a rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] #comboView #comboTableScroll::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.72);
}

body[data-theme="light"] #comboView #comboTableScroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] #comboView .combo-row-toggles {
    background: #ececec;
    color: #111;
    border-color: #c2c2c2;
}

body[data-theme="light"] #comboView .combo-row-label {
    color: #111;
}

body[data-theme="light"] #comboView .combo-col-label {
    color: #111;
}

body[data-theme="light"] #comboView .combo-row-toggles label {
    background: #e6e6e6;
    border-color: #bcbcbc;
    color: #111;
}

body[data-theme="light"] #comboView .combo-control-tabs .combo-poison-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

/* Keep inactive Classic/Modern dimmed in light mode too. */
body[data-theme="light"] #comboView .combo-control-tabs .char-control-tabs-list li {
    filter: grayscale(100%) opacity(.7);
}

body[data-theme="light"] #comboView .combo-control-tabs .char-control-tabs-list li.active {
    filter: none;
}

body[data-theme="light"] #comboView #Table1 td.combo-cell-auto-source-auto::before {
    color: #2a8db3;
}

body[data-theme="light"] #comboView #Table1 td.combo-cell-auto-source-user::before {
    color: #b07b2b;
}

body[data-theme="light"] #comboView #toggleAllRowsBtn {
    background: #e6e6e6;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView #Table3 select,
body[data-theme="light"] #comboView #Table3 button {
    background: #ffffff;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView .combo-search-shell .combo-export-menu {
    background: #f7f7f7;
    border-color: #c4c4c4;
    color: #111;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

body[data-theme="light"] #comboView .combo-search-shell .combo-export-menu button:not(.tutorial-flow-trigger) {
    background: #e6e6e6;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] #comboView .combo-search-shell .combo-export-options {
    border-bottom-color: #c4c4c4;
}

body[data-theme="light"] #comboView .combo-search-shell .combo-export-options label {
    color: #333;
}

body[data-theme="light"] #comboView .combo-search-shell .combo-export-options select {
    background: #ffffff;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] .combo-export-toast {
    background: #ffffff;
    color: #111;
    border-color: #666666;
}

body[data-theme="light"] .combo-export-toast.error {
    background: #fdecec;
    border-color: #d58b8b;
}

body[data-theme="light"] #comboView .combo-search-shell .advanced-filters {
    background: #f7f7f7;
    border-color: #c4c4c4;
    color: #111;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

body[data-theme="light"] #comboView[data-layout="desktop"] .combo-search-shell {
    background: #f5f5f7;
    border-color: #bdbdbd;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

body[data-theme="light"] #comboView[data-layout="desktop"] .combo-row-toggles {
    background: #ebebee;
    border-color: #c4c4c4;
}

body[data-theme="light"] #comboView[data-layout="desktop"] #comboTableScroll {
    background: #fff;
    border-color: #c4c4c4;
}

body[data-theme="light"] #mainHeader .combo-layout-global {
    border-left-color: #c2c2c2;
}

body[data-theme="light"] #mainHeader .combo-layout-global-toggle {
    color: #111;
}

body[data-theme="light"] #mainHeader .combo-layout-global-toggle:hover {
    color: #000;
}

body[data-theme="light"] #comboView .combo-search-shell .controls select,
body[data-theme="light"] #comboView .combo-search-shell .controls input[type="text"],
body[data-theme="light"] #comboView .combo-search-shell .controls input[type="number"],
body[data-theme="light"] #comboView .combo-search-shell .field-search-controls input[type="text"],
body[data-theme="light"] #comboView .combo-search-shell .field-search-controls input[type="search"],
body[data-theme="light"] #comboView .combo-search-shell .range-row input {
    background: #ffffff;
    color: #111;
    border-color: #bcbcbc;
    border-radius: 6px;
}

body[data-theme="light"] #comboView .combo-search-shell .grouped-control {
    background: #f0f0f0;
    border-color: #c4c4c4;
}

body[data-theme="light"] #comboView .combo-search-shell .grouped-control-label,
body[data-theme="light"] #comboView .combo-search-shell .field-search-inline-label,
body[data-theme="light"] #comboView .combo-search-shell .control-label,
body[data-theme="light"] #comboView .combo-search-shell .search-advanced-additional-options summary {
    color: #555;
}

body[data-theme="light"] #comboView .combo-search-shell .control-group,
body[data-theme="light"] #comboView .combo-search-shell .search-advanced-additional-options {
    background: #ededed;
    border-color: #c4c4c4;
}

body[data-theme="light"] #comboView .combo-search-shell .checkbox-item,
body[data-theme="light"] #comboView .combo-search-shell .range-row,
body[data-theme="light"] #comboView .combo-search-shell .range-label,
body[data-theme="light"] #comboView .combo-search-shell .range-sep,
body[data-theme="light"] #comboView .combo-search-shell .grouped-control-field {
    color: #111;
}

body[data-theme="light"] #comboView .combo-search-shell .range-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body[data-theme="light"] #comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table {
    background: #f2f2f2;
    box-shadow: inset 0 0 0 1px #c4c4c4;
}

body[data-theme="light"] #comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table td,
body[data-theme="light"] #comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table th {
    border-color: #c8c8c8;
    background: #f2f2f2;
    color: #111;
}

body[data-theme="light"] #comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-section th {
    background: #e7e7e7;
}

body[data-theme="light"] #comboView .combo-search-shell .range-grid.range-grid-categorized .combo-range-layout-table .range-layout-empty {
    background: #f2f2f2;
    border: 0;
}

body[data-theme="light"] #comboView .ui-btn-desc {
    color: #111;
}

body[data-theme="light"] #comboView #wb_Text1 span {
    color: #111 !important;
}

#comboView .combo-customize-frame {
    position: absolute;
    border: 1px solid #444;
    border-radius: 6px;
    pointer-events: none;
    z-index: 13;
}

#comboView .combo-ui-backdrop {
    position: absolute;
    background: #0f0f0f;
    z-index: 10;
    pointer-events: none;
}

#comboView #Table3 td {
    padding: 2px;
    background: transparent;
    border: none;
}

#comboView #Table3 .combo-input-title {
    margin: 0 0 2px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.5px;
}

#comboView #Table3 select,
#comboView #Table3 button {
    width: 100%;
    height: 22px;
    background: #151515;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 10px;
    box-sizing: border-box;
}

#comboView #comboDeviceSelect {
    text-align: center;
    text-align-last: center;
}

#comboView #Table3 button {
    cursor: pointer;
}

#comboView #Table3 button:hover,
#comboView #Table3 select:focus {
    border-color: #f97306;
    outline: none;
}

#comboView #Table3 .cell1,
#comboView #Table3 .cell2 {
    padding: 0;
    background: transparent;
    border: none;
}

#comboView #Table3 .cell1 p,
#comboView #Table3 .cell2 p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 23px;
    background: #151515;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

#comboView #Table3 .cell0 p {
    margin: 0 0 2px;
    text-align: center;
    line-height: 1.1;
}

#comboView #Table3 .cell1 p {
    margin-top: 0;
    margin-bottom: 9px;
}

#comboView #Table3 .cell2 p {
    margin-top: 0;
    margin-bottom: 1px;
}

#comboView #Table3 {
    height: auto !important;
}

#comboView #Table3 td {
    padding: 0;
}

#comboView #Table3 .cell1 p:hover,
#comboView #Table3 .cell2 p:hover {
    border-color: #f97306;
}

#comboView #Table3 td[data-device]:focus-visible {
    outline: 2px solid rgba(249, 115, 6, 0.7);
    outline-offset: 2px;
}

#comboView .combo-game-version-info {
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 10px;
    line-height: 1;
    color: #9ca3af;
    white-space: nowrap;
    z-index: 30;
    pointer-events: none;
}

#comboView.hide-buttons tr.combo-row-buttons {
    display: none;
}

#comboView.hide-frame-meter tr.combo-row-frame {
    display: none;
}

#comboView.hide-notes tr.combo-row-notes {
    display: none;
}

#comboView .combo-row-toggles {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #e6e6e6;
    padding: 4px 6px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    background: rgba(16, 16, 16, 0.7);
}

#comboView .combo-row-label {
    font-size: 11px;
    color: #cfcfcf;
    margin-right: 4px;
}

#comboView .combo-row-toggles label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #2a2a2a;
    border-radius: 4px;
}

#comboView .combo-row-toggles input[type="checkbox"] {
    accent-color: #f97306;
}

#comboView .combo-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}

#comboView .combo-col-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}

#comboView .combo-col-label {
    font-size: 11px;
    color: #cfcfcf;
}

#comboView .combo-col-presets {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#comboView .combo-col-preset,
#comboView .combo-col-edit {
    padding: 2px 8px;
}

#comboView .combo-col-preset.is-active {
    border-color: #f97306;
    background: #2a1b0f;
    color: #fff;
}

#comboView .combo-crud-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    z-index: 25;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

#comboView .combo-action-btn {
    background: #151515;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 10px;
    height: 22px;
}

#comboView .combo-action-btn:hover {
    border-color: #f97306;
}

.tutorial-flow-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    border: 1px solid #4b4b4b;
    border-radius: 4px;
    background: #141414;
    color: #f3f4f6;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
}

.tutorial-flow-trigger:hover {
    border-color: #f97306;
    color: #ffffff;
}

.tutorial-flow-trigger:focus-visible {
    outline: 2px solid rgba(249, 115, 6, 0.55);
    outline-offset: 1px;
}

#comboView .tutorial-flow-trigger-inline {
    flex: 0 0 auto;
    margin-left: 2px;
}

#comboView .combo-search-shell .advanced-filters>.tutorial-flow-trigger-panel-corner,
#comboView .combo-search-shell .combo-filter-panel .tutorial-flow-trigger-panel-corner {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 80;
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    border-radius: 4px;
    margin-left: 0;
    pointer-events: auto;
}

@media (max-width: 1240px) {
    #comboView .combo-search-shell .advanced-filters {
        width: calc(100vw - 24px);
        min-width: 0;
        max-width: calc(100vw - 24px);
    }
}

#comboView[data-layout="desktop"] .combo-search-shell {
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    background: rgba(14, 14, 16, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

#comboView[data-layout="desktop"] .combo-row-toggles {
    border-radius: 4px;
    border-color: #363636;
    background: rgba(20, 20, 22, 0.88);
}

#comboView[data-layout="desktop"] .combo-crud-bar {
    gap: 4px;
}

#comboView[data-layout="desktop"] .combo-action-btn {
    border-radius: 2px;
    font-size: 12px;
    height: 24px;
}

#comboView[data-layout="desktop"] #comboTableScroll {
    border: 1px solid #353535;
    border-radius: 4px;
    background: #0f0f10;
}

#mainHeader .combo-layout-global {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--border-light);
}

#mainHeader .combo-layout-global-toggle {
    min-width: 64px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    padding: 0 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#mainHeader .combo-layout-global-toggle:hover {
    color: #fff;
}

#mainHeader .combo-layout-global-toggle.is-active {
    color: #fff;
    background: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

#comboView .combo-action-create {
    background: #14321f;
    border-color: #1d5a33;
    color: #d6ffe4;
}

#comboView .combo-action-create:hover {
    border-color: #35c06a;
}

#comboView .combo-action-duplicate {
    background: #1c2c4a;
    border-color: #2e4c86;
    color: #dbe7ff;
}

#comboView .combo-action-duplicate:hover {
    border-color: #6da2ff;
}

#comboView .combo-action-delete {
    background: #3a1a1a;
    border-color: #6a2a2a;
    color: #ffd7d7;
}

#comboView .combo-action-delete:hover {
    border-color: #ff6b6b;
}

#comboView .combo-action-dedupe {
    background: #2f2a17;
    border-color: #5b4a1f;
    color: #ffe8b0;
}

#comboView .combo-action-dedupe:hover {
    border-color: #f5c451;
}

#comboView .combo-action-restore {
    background: #2b2b2b;
    border-color: #5b5b5b;
    color: #f0f0f0;
}

#comboView .combo-action-restore:hover {
    border-color: #f97306;
}

#comboView .sticky-col {
    background: #151515;
}

#comboView .combo-quick-label {
    position: absolute;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #bfbfbf;
    text-transform: none;
    z-index: 14;
    pointer-events: none;
}

#comboView .combo-bottom-toggle {
    position: absolute;
    min-width: 64px;
    height: 24px;
    padding: 0 10px;
    border: 2px solid #2a2a2a;
    background: #101010;
    color: #e6e6e6;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    z-index: 26;
}

#comboView .combo-bottom-toggle:hover {
    border-color: #f97306;
    color: #fff;
}

#comboView .combo-bottom-toggle[data-state="collapsed"] {
    border-color: #2a2a2a;
    background: #101010;
    color: #e6e6e6;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.25);
}

#comboView .combo-bottom-toggle[data-state="expanded"] {
    border-top-color: transparent;
    border-radius: 0 0 6px 6px;
}

#comboView[data-control="classic"] td.token-modern {
    opacity: 0.4;
}

#comboView[data-control="modern"] td.token-modern {
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 6, 0.4);
}

.combo-keymap-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    --ui-cell-size: 49px;
    --keymap-icon-row-height: 49px;
    --keymap-desc-row-height: 18px;
    font-size: 11px;
}

.combo-keymap-modal.hidden {
    display: none;
}

.combo-keymap-card,
.combo-keymap-content {
    width: 640px;
    max-width: 96vw;
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.combo-keymap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.combo-keymap-content header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.combo-keymap-content header h3 {
    margin: 0;
    font-size: 13px;
}

.combo-keymap-content header .close {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.combo-keymap-content header .tutorial-flow-trigger-modal {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    border-radius: 4px;
}

.combo-keymap-content header .combo-keymap-help-trigger {
    left: auto;
    right: 0;
}

.combo-notation-content header .tutorial-flow-trigger-modal {
    right: 0;
    left: auto;
}

.combo-notation-content header .combo-notation-help-trigger {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
}

.combo-xlsx-map-content header .combo-xlsx-help-trigger {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
}

.combo-keymap-header button {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.combo-keymap-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.combo-keymap-row {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 11px;
}

.combo-keymap-row select {
    border: 1px solid #333;
    border-radius: 6px;
    padding: 4px 6px;
    background: #0c0c0c;
    color: #fff;
}

.combo-keymap-grid {
    display: block;
}

.combo-keymap-notice {
    min-height: 18px;
    margin: 0 0 8px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 18px;
    color: #f8b4b4;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid transparent;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.combo-keymap-notice.show {
    opacity: 1;
    border-color: rgba(248, 113, 113, 0.6);
}

.combo-keymap-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.combo-keymap-item input {
    border: 1px solid #333;
    border-radius: 6px;
    background: #0c0c0c;
    color: #fff;
    padding: 4px 6px;
}

.combo-keymap-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.combo-keymap-table {
    border-collapse: collapse;
    table-layout: fixed;
}

.combo-keymap-table td {
    border: 1px solid #2a2a2a;
    background: #121212;
    color: #f1f1f1;
    text-align: center;
    vertical-align: middle;
    padding: 1px 2px;
    width: var(--ui-cell-size);
    height: var(--ui-cell-size);
    box-sizing: border-box;
    overflow: visible;
}

.combo-keymap-table tr.keymap-icon-row td {
    height: var(--keymap-icon-row-height);
}

.combo-keymap-table tr.keymap-desc-row td {
    height: var(--keymap-desc-row-height);
}

.combo-keymap-cell {
    position: relative;
}

.combo-keymap-input {
    position: absolute;
    bottom: 1px;
    width: 26px;
    height: 14px;
    font-size: 7px;
    line-height: 12px;
    color: #fff;
    background: #0f0f0f;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 0 2px;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.combo-keymap-table img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.combo-keymap-table .ui-btn-desc {
    font-size: 6px;
    line-height: 1.1;
    height: 10px;
}

.combo-keymap-input:focus {
    outline: none;
    background: #0f0f0f;
    border-color: #f97306;
}

.combo-keymap-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.combo-keymap-actions button {
    border-radius: 6px;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    cursor: pointer;
}

/* Make Customize Input modal larger/readable without affecting other keymap-based modals. */
.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) {
    --ui-cell-size: 65px;
    --keymap-icon-row-height: 58px;
    --keymap-desc-row-height: 30px;
    font-size: 11px;
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-keymap-content {
    width: min(860px, 96vw);
    max-height: 90vh;
    overflow: auto;
    padding: 16px 18px;
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-keymap-content header h3 {
    font-size: 16px;
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-keymap-table img {
    width: 24px;
    height: 24px;
    transform: translateY(-5px);
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-keymap-input {
    width: 50px;
    height: 18px;
    font-size: 10px;
    line-height: 16px;
    bottom: 2px;
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-keymap-table .ui-btn-desc {
    font-size: 9px;
    line-height: 1.2;
    min-height: 14px;
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-keymap-actions button {
    font-size: 13px;
    padding: 7px 12px;
}

.combo-restore-content {
    width: 560px;
    max-width: 94vw;
}

.combo-replace-content {
    width: 420px;
    max-width: 94vw;
}

.combo-keymap-modal:not(.combo-restore-modal):not(.combo-import-target-modal):not(.combo-notation-modal):not(.combo-xlsx-map-modal) .combo-row-action-confirm-content {
    width: 380px;
    max-width: 92vw;
}

body[data-theme="light"] .combo-keymap-modal {
    background: rgba(255, 255, 255, 0.62);
}

body[data-theme="light"] .combo-keymap-card,
body[data-theme="light"] .combo-keymap-content {
    background: #ffffff;
    border-color: #c8cdd6;
    color: #1f2937;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

body[data-theme="light"] .combo-keymap-content header h3,
body[data-theme="light"] .combo-keymap-header,
body[data-theme="light"] .combo-keymap-notice {
    color: #111827;
}

body[data-theme="light"] .combo-keymap-content header .close,
body[data-theme="light"] .combo-keymap-header button {
    color: #111827;
}

body[data-theme="light"] .combo-keymap-row,
body[data-theme="light"] .combo-keymap-desc-row {
    color: #374151;
}

body[data-theme="light"] .combo-keymap-row select {
    border-color: #c8cdd6;
    background: #ffffff;
    color: #111827;
}

body[data-theme="light"] .combo-keymap-table td {
    border-color: #d6d9e0;
    background: #f7f8fb;
    color: #111827;
}

body[data-theme="light"] .combo-keymap-input {
    color: #111827;
    background: #ffffff;
    border-color: #bfc5cf;
}

body[data-theme="light"] .combo-keymap-input:focus {
    background: #ffffff;
    border-color: #f97306;
}

body[data-theme="light"] .combo-keymap-actions button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

.combo-restore-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 8px;
    max-height: 42vh;
    overflow-y: auto;
}

.combo-restore-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #3a3a3a;
    background: #161616;
    color: #f3f3f3;
    border-radius: 6px;
    min-height: 34px;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
}

.combo-restore-option .source {
    font-size: 12px;
    font-weight: 600;
}

.combo-restore-option .time {
    font-size: 11px;
    opacity: 0.9;
}

.combo-restore-option.active {
    border-color: #f97306;
    background: #241a12;
}

.combo-restore-notice {
    margin: 0;
    font-size: 11px;
    opacity: 0.85;
}

.combo-import-target-content {
    width: min(520px, 92vw);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.combo-import-target-desc {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.combo-import-target-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.combo-import-target-label select {
    width: 100%;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
}

.combo-import-target-actions {
    justify-content: flex-end;
}

.combo-notation-content {
    width: min(980px, 96vw);
    max-width: 96vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combo-notation-desc {
    margin: 0;
    font-size: 12px;
    opacity: 0.85;
}

.combo-notation-hints {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    opacity: 0.9;
}

.combo-notation-hints li {
    margin: 2px 0;
}

.combo-notation-section-title {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
}

.combo-notation-add,
.combo-notation-display-add,
.combo-notation-tools {
    display: flex;
    gap: 6px;
    align-items: center;
}

.combo-notation-add {
    padding-bottom: 6px;
    border-bottom: 1px solid #2b2b2b;
}

.combo-notation-tools {
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px solid #2b2b2b;
}

.combo-notation-add input {
    min-width: 150px;
    flex: 1 1 0;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
}

.combo-notation-tools button,
.combo-notation-add button,
.combo-notation-display-add button,
.combo-notation-map-head button {
    border: 1px solid #4a4a4a;
    background: #1b1b1b;
    color: #f5f5f5;
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 12px;
    cursor: pointer;
}


.combo-notation-test-desc {
    margin: 2px 0 4px;
    font-size: 12px;
    opacity: 0.85;
}

.combo-notation-test {
    padding-bottom: 6px;
    border-bottom: 1px solid #2b2b2b;
}

.combo-notation-test-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.combo-notation-test textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    resize: none;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 12px;
}

.combo-notation-preview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 6px;
}

.combo-notation-preview .line {
    display: grid;
    grid-template-columns: 98px 1fr;
    gap: 8px;
    align-items: start;
}

.combo-notation-preview pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
    color: #e5e7eb;
}

.combo-notation-preview .chip {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 2px 6px;
    border-radius: 999px;
    background: #2b2b2b;
    font-size: 11px;
}

.combo-notation-preview .chip.unknown {
    background: #5a3b09;
    color: #fcd34d;
}

.combo-notation-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
    border: 1px solid #323232;
    border-radius: 6px;
}

.combo-notation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.combo-notation-table th,
.combo-notation-table td {
    border-bottom: 1px solid #262626;
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
}

.combo-notation-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #141414;
}

.combo-notation-table .notation-category-row td {
    background: #1b1b1b;
    font-weight: 700;
    border-bottom-color: #343434;
    border-top: 1px solid #3a3a3a;
}

.combo-notation-table .notation-category-row:first-child td {
    border-top: 0;
}

.combo-notation-table td:nth-child(5) {
    text-align: center;
}

.combo-notation-table td button {
    margin-right: 4px;
}

.combo-notation-buttons {
    text-align: center;
    vertical-align: middle;
}

.combo-notation-table th:nth-child(3) {
    text-align: center;
}

.combo-notation-buttons-wrap {
    min-width: 120px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 2px;
    min-height: 18px;
    margin: 0 auto;
}

.combo-notation-buttons-wrap .btn-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.combo-notation-buttons-wrap .btn-token img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.combo-notation-buttons-wrap .btn-token[data-token="Hold2"] img,
.combo-notation-buttons-wrap .btn-token[data-token="Hold3"] img {
    width: auto;
    height: 16px;
}

.combo-notation-buttons-wrap .btn-token-text {
    display: none;
}

.combo-notation-buttons-wrap .btn-token.btn-token-fallback {
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 16px;
}

body[data-theme="light"] .combo-notation-add input,
body[data-theme="light"] .combo-notation-display-add input,
body[data-theme="light"] .combo-notation-map-input,
body[data-theme="light"] .combo-notation-test textarea {
    background: #fff;
    color: #222;
    border-color: #c3c7cf;
}

body[data-theme="light"] .combo-notation-tools button,
body[data-theme="light"] .combo-notation-add button,
body[data-theme="light"] .combo-notation-display-add button,
body[data-theme="light"] .combo-notation-map-head button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

body[data-theme="light"] .combo-notation-add {
    border-bottom-color: #d7dce4;
}

body[data-theme="light"] .combo-notation-tools {
    border-top-color: #d7dce4;
}

body[data-theme="light"] .combo-notation-test {
    border-bottom-color: #d7dce4;
}


body[data-theme="light"] .combo-notation-table-wrap {
    border-color: #c8cdd6;
}

body[data-theme="light"] .combo-notation-table th,
body[data-theme="light"] .combo-notation-table td {
    border-bottom-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-table thead th {
    background: #f7f9fc;
}

body[data-theme="light"] .combo-notation-table .notation-category-row td {
    background: #eef2f7;
    border-bottom-color: #d4dbe5;
    border-top-color: #d4dbe5;
}

body[data-theme="light"] .combo-notation-preview .chip {
    background: #dfe4ea;
    color: #2b3542;
}

body[data-theme="light"] .combo-notation-preview .chip.unknown {
    background: #f2d68f;
    color: #5f3500;
}

body[data-theme="light"] .combo-notation-buttons-wrap .btn-token.btn-token-fallback {
    border-color: #bcc2cc;
}

.combo-notation-display-edit {
    padding-bottom: 6px;
    border-bottom: 1px solid #2b2b2b;
}

.combo-notation-display-add {
    flex-wrap: wrap;
}

.combo-notation-display-add input {
    min-width: 130px;
    flex: 1 1 0;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
}

.combo-notation-display-list {
    margin-top: 6px;
    border: 1px solid #323232;
    border-radius: 4px;
    overflow: auto;
    max-height: 132px;
}

.combo-notation-display-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.combo-notation-display-table th,
.combo-notation-display-table td {
    border-bottom: 1px solid #262626;
    padding: 5px 7px;
    text-align: left;
    vertical-align: middle;
}

.combo-notation-display-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #141414;
}

.combo-notation-display-table td button {
    margin-right: 4px;
}

.combo-notation-import-preview {
    padding-bottom: 6px;
    border-bottom: 1px solid #2b2b2b;
}

.combo-notation-import-preview-wrap {
    border: 1px solid #323232;
    border-radius: 6px;
    overflow: auto;
    max-height: 210px;
}

.combo-notation-import-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.combo-notation-import-preview-table th,
.combo-notation-import-preview-table td {
    border-bottom: 1px solid #262626;
    padding: 6px 7px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.combo-notation-import-preview-table td:nth-child(2),
.combo-notation-import-preview-table td:nth-child(3),
.combo-notation-import-preview-table td:nth-child(5) {
    white-space: normal;
}

.combo-notation-import-preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #141414;
}

.combo-notation-import-preview-table td.combo-notation-buttons,
.combo-xlsx-map-preview-table td.combo-notation-buttons {
    text-align: left;
}

.combo-notation-import-preview-table td.combo-notation-buttons .combo-notation-buttons-wrap,
.combo-xlsx-map-preview-table td.combo-notation-buttons .combo-notation-buttons-wrap {
    justify-content: flex-start;
    margin: 0;
}

.combo-notation-import-preview-table th,
.combo-xlsx-map-preview-table th {
    text-align: center;
}

.combo-notation-import-preview-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 6px;
}

.combo-notation-import-preview-actions button {
    border: 1px solid #4a4a4a;
    background: #1b1b1b;
    color: #f5f5f5;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.combo-notation-import-preview .chip,
.combo-notation-unknown-manage .chip {
    display: inline-block;
    margin: 0 4px 2px 0;
    padding: 2px 6px;
    border-radius: 999px;
    background: #2b2b2b;
    font-size: 11px;
}

.combo-notation-import-preview .chip.unknown,
.combo-notation-unknown-manage .chip.unknown {
    background: #5a3b09;
    color: #fcd34d;
}

.combo-notation-map {
    padding-bottom: 6px;
    border-bottom: 1px solid #2b2b2b;
}

.combo-notation-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.combo-notation-map-wrap {
    border: 1px solid #323232;
    border-radius: 6px;
    overflow: auto;
    max-height: 240px;
    padding: 8px;
}

.combo-notation-map-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.combo-notation-map-card {
    border: 1px solid #2b2b2b;
    border-radius: 6px;
    background: #151515;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.combo-notation-map-card-buttons {
    min-height: 18px;
}

.combo-notation-map-card-lm {
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e5e7eb;
}

@media (max-width: 1480px) {
    .combo-notation-map-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .combo-notation-map-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .combo-notation-map-grid {
        grid-template-columns: 1fr;
    }
}

.combo-notation-map-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
}

.combo-notation-unknown-manage {
    padding-top: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid #2b2b2b;
}

.combo-notation-unknown-wrap {
    border: 1px solid #323232;
    border-radius: 6px;
    overflow: auto;
    max-height: 220px;
}

.combo-notation-unknown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 0;
    align-items: start;
    min-width: 740px;
}

.combo-notation-unknown-empty {
    padding: 10px 6px;
    text-align: center;
    opacity: 0.8;
}

.combo-notation-unknown-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
    border: 1px solid #262626;
}

.combo-notation-unknown-table th,
.combo-notation-unknown-table td {
    border: 1px solid #262626;
    padding: 6px 7px;
    text-align: center;
    vertical-align: middle;
}

.combo-notation-unknown-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #141414;
}

.combo-notation-unknown-table th:nth-child(1),
.combo-notation-unknown-table td:nth-child(1) {
    width: 20%;
}

.combo-notation-unknown-table th:nth-child(2),
.combo-notation-unknown-table td:nth-child(2),
.combo-notation-unknown-table th:nth-child(3),
.combo-notation-unknown-table td:nth-child(3),
.combo-notation-unknown-table th:nth-child(4),
.combo-notation-unknown-table td:nth-child(4) {
    width: 11%;
}

.combo-notation-unknown-table th:nth-child(5),
.combo-notation-unknown-table td:nth-child(5) {
    width: 16%;
}

.combo-notation-unknown-table th:nth-child(6),
.combo-notation-unknown-table td:nth-child(6) {
    width: 31%;
}

.combo-notation-unknown-table td input.combo-notation-unknown-input {
    width: 100%;
    max-width: 130px;
    box-sizing: border-box;
    min-height: 28px;
    padding: 4px 6px;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 auto;
    display: block;
}

.combo-notation-unknown-table .combo-notation-unknown-check-cell {
    width: 36px;
    min-width: 36px;
}

.combo-notation-unknown-table .combo-notation-unknown-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.combo-notation-unknown-table tbody {
    border-bottom: 1px solid #262626;
}

.combo-notation-unknown-settings {
    text-align: center;
}

.combo-notation-unknown-flags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.combo-notation-unknown-flags label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.combo-notation-unknown-replace-wrap {
    margin-top: 6px;
    display: flex;
    justify-content: center;
}

.combo-notation-unknown-replace-wrap .combo-notation-unknown-input {
    max-width: 220px;
}

.combo-notation-unknown-test {
    margin: 0;
    min-height: 20px;
    text-align: center;
    vertical-align: middle;
    display: table-cell;
    font-family: Consolas, 'Courier New', monospace;
    color: #e5e7eb;
    white-space: normal;
}

.combo-notation-unknown-test .combo-notation-buttons-wrap {
    min-width: 0;
    justify-content: center;
    margin: 0 auto;
}

.combo-notation-unknown-grid>.combo-notation-unknown-table:first-child {
    border-right: 1px solid #262626;
}

.combo-notation-unknown-grid>.combo-notation-unknown-table:last-child {
    border-left: 1px solid #262626;
}

.combo-notation-unknown-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.combo-notation-unknown-actions button {
    border: 1px solid #4a4a4a;
    background: #1b1b1b;
    color: #f5f5f5;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

body[data-theme="light"] .combo-notation-display-edit {
    border-bottom-color: #d7dce4;
}

body[data-theme="light"] .combo-notation-display-list {
    border-color: #c8cdd6;
}

body[data-theme="light"] .combo-notation-display-table th,
body[data-theme="light"] .combo-notation-display-table td {
    border-bottom-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-display-table thead th {
    background: #f7f9fc;
}

body[data-theme="light"] .combo-notation-import-preview {
    border-bottom-color: #d7dce4;
}

body[data-theme="light"] .combo-notation-import-preview-wrap {
    border-color: #c8cdd6;
}

body[data-theme="light"] .combo-notation-import-preview-table th,
body[data-theme="light"] .combo-notation-import-preview-table td {
    border-bottom-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-import-preview-table thead th {
    background: #f7f9fc;
}

body[data-theme="light"] .combo-notation-import-preview-actions button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

body[data-theme="light"] .combo-notation-import-preview .chip,
body[data-theme="light"] .combo-notation-unknown-manage .chip {
    background: #dfe4ea;
    color: #2b3542;
}

body[data-theme="light"] .combo-notation-import-preview .chip.unknown,
body[data-theme="light"] .combo-notation-unknown-manage .chip.unknown {
    background: #f2d68f;
    color: #5f3500;
}

body[data-theme="light"] .combo-notation-map {
    border-bottom-color: #d7dce4;
}

body[data-theme="light"] .combo-notation-map-wrap {
    border-color: #c8cdd6;
}

body[data-theme="light"] .combo-notation-map-card {
    border-color: #d4dbe5;
    background: #f7f9fc;
}

body[data-theme="light"] .combo-notation-map-card-lm {
    color: #1f2937;
}

body[data-theme="light"] .combo-notation-unknown-manage {
    border-bottom-color: #d7dce4;
}

body[data-theme="light"] .combo-notation-unknown-wrap {
    border-color: #c8cdd6;
}

body[data-theme="light"] .combo-notation-unknown-empty {
    color: #4b5563;
}

body[data-theme="light"] .combo-notation-unknown-table,
body[data-theme="light"] .combo-notation-unknown-table th,
body[data-theme="light"] .combo-notation-unknown-table td {
    border-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-unknown-table thead th {
    background: #f7f9fc;
}

body[data-theme="light"] .combo-notation-unknown-table td input.combo-notation-unknown-input {
    background: #fff;
    color: #222;
    border-color: #c3c7cf;
}

body[data-theme="light"] .combo-notation-unknown-table tbody {
    border-bottom-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-unknown-test {
    color: #1f2937;
}

body[data-theme="light"] .combo-notation-unknown-grid>.combo-notation-unknown-table:first-child {
    border-right-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-unknown-grid>.combo-notation-unknown-table:last-child {
    border-left-color: #e0e4ea;
}

body[data-theme="light"] .combo-notation-unknown-actions button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

body[data-theme="light"] .combo-notation-modal .combo-notation-content {
    background: #ffffff;
    color: #1f2937;
    border-color: #c8cdd6;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

body[data-theme="light"] .combo-notation-modal .combo-notation-content header h3,
body[data-theme="light"] .combo-notation-modal .combo-notation-section-title {
    color: #111827;
}

body[data-theme="light"] .combo-notation-modal .combo-notation-test-desc {
    color: #374151;
}

body[data-theme="light"] .combo-notation-modal .combo-keymap-actions button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

.combo-xlsx-map-content {
    width: min(1800px, 96vw);
    max-width: 96vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.combo-xlsx-map-desc {
    margin: 2px 0 4px;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
    text-align: left;
    min-width: 0;
}

.combo-xlsx-map-groups {
    display: block;
}

.combo-xlsx-map-groups h4 {
    margin: 2px 0 0;
    font-size: 13px;
}

.combo-xlsx-map-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
    border: 1px solid #313131;
    border-radius: 6px;
    overflow: hidden;
}

.combo-xlsx-map-table th,
.combo-xlsx-map-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #262626;
    text-align: left;
    vertical-align: middle;
}

.combo-xlsx-map-table td .req {
    color: #f97316;
    font-weight: 700;
}

.combo-xlsx-map-table select {
    width: 100%;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
}

.combo-xlsx-map-preview-wrap {
    border: 1px solid #313131;
    border-radius: 6px;
    overflow: auto;
    max-height: 32vh;
}

.combo-xlsx-map-preview-wrap h4 {
    margin: 0;
    padding: 6px 8px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 12px;
}

.combo-xlsx-map-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.combo-xlsx-map-preview-table th,
.combo-xlsx-map-preview-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #242424;
    text-align: left;
    vertical-align: top;
}

.combo-xlsx-map-actions {
    justify-content: flex-end;
}

body[data-theme="light"] .combo-xlsx-map-table select,
body[data-theme="light"] .combo-xlsx-map-header-label select {
    background: #fff;
    color: #1f2937;
    border-color: #c3c7cf;
}

body[data-theme="light"] .combo-xlsx-map-table,
body[data-theme="light"] .combo-xlsx-map-preview-wrap {
    border-color: #c8cdd6;
}

body[data-theme="light"] .combo-xlsx-map-table th,
body[data-theme="light"] .combo-xlsx-map-table td,
body[data-theme="light"] .combo-xlsx-map-preview-table th,
body[data-theme="light"] .combo-xlsx-map-preview-table td {
    border-bottom-color: #e0e4ea;
}

body[data-theme="light"] .combo-xlsx-map-preview-wrap h4 {
    border-bottom-color: #d4dbe5;
}

.combo-xlsx-map-sheet {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
    opacity: 1;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    text-align: left;
}

.combo-xlsx-map-meta-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.combo-xlsx-map-header-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}

.combo-xlsx-map-header-label select {
    min-width: 64px;
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 4px 6px;
    text-align: center;
    text-align-last: center;
}

.combo-xlsx-map-layout-cell select option,
.combo-xlsx-map-header-label select option {
    text-align: center;
}

.combo-xlsx-map-divider {
    border-top: 1px solid #2b2b2b;
    margin: 2px 0;
}

.combo-xlsx-map-target-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.combo-xlsx-map-meta-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.combo-xlsx-map-target-heading {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    opacity: 1;
}

.combo-xlsx-map-target {
    min-width: 0;
}

.combo-xlsx-map-target.hidden {
    display: none;
}

.combo-xlsx-map-target-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 4px 10px;
}

.combo-xlsx-map-target-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
}

.combo-xlsx-map-target-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 0;
}

.combo-xlsx-map-target-actions.hidden {
    display: none;
}

.combo-xlsx-map-target-actions button {
    border-radius: 4px;
    border: 1px solid #4a4a4a;
    background: #1b1b1b;
    color: #f5f5f5;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.combo-xlsx-map-target-panel {
    border: 1px solid #323232;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0;
}

.combo-xlsx-map-target-panel.hidden {
    display: none;
}

.combo-xlsx-map-preset-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 2px;
}

.combo-xlsx-map-save-preset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.combo-xlsx-map-save-preset input {
    margin: 0;
}

.combo-xlsx-map-table th {
    text-align: center;
}

.combo-xlsx-map-table td:first-child {
    width: 36%;
    white-space: normal;
    line-height: 1.25;
}

.combo-xlsx-map-table td:last-child {
    width: 64%;
}

.combo-xlsx-map-table.stack td {
    display: block;
    width: auto !important;
    border-bottom: 0;
}

.combo-xlsx-map-table.stack td:first-child {
    padding-bottom: 2px;
    font-weight: 700;
}

.combo-xlsx-map-table.stack td:last-child {
    padding-top: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #262626;
}

.combo-xlsx-map-table.stack tbody tr:last-child td:last-child {
    border-bottom: 0;
}

.combo-xlsx-map-layout-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    box-shadow: inset 0 0 0 1px #2f2f2f;
}

.combo-xlsx-map-layout-table td,
.combo-xlsx-map-layout-table th {
    border: 1px solid #2f2f2f;
    padding: 6px 8px;
    vertical-align: middle;
    background: #111;
    color: #f5f5f5;
}

.combo-xlsx-map-layout-table .combo-xlsx-map-layout-empty {
    background: #111;
    border: 0;
}

.combo-xlsx-map-layout-table .combo-xlsx-map-layout-section th {
    text-align: center;
    font-weight: 700;
    background: #0d0d0d;
    color: #ffffff;
}

.combo-xlsx-map-layout-table .combo-xlsx-map-layout-section th.empty {
    background: #111;
    border: 0;
    color: transparent;
}

.combo-xlsx-map-layout-table tr:last-child .combo-xlsx-map-layout-empty,
.combo-xlsx-map-layout-table tr:last-child .combo-xlsx-map-layout-section th.empty {
    border-bottom: 1px solid #2f2f2f;
}

.combo-xlsx-map-layout-table tr:first-child .combo-xlsx-map-layout-empty,
.combo-xlsx-map-layout-table tr:first-child .combo-xlsx-map-layout-section th.empty {
    border-top: 1px solid #2f2f2f;
}

.combo-xlsx-map-layout-cell-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.combo-xlsx-map-layout-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    flex: 0 1 auto;
}

.combo-xlsx-map-layout-cell .req {
    color: #f97316;
    font-weight: 700;
}

.combo-xlsx-map-layout-cell select {
    min-width: 78px;
    width: clamp(78px, 52%, 220px);
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #454545;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    text-align: center;
    text-align-last: center;
}

.combo-xlsx-map-layout-table.stack .combo-xlsx-map-layout-cell-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.combo-xlsx-map-layout-table.stack .combo-xlsx-map-layout-cell select {
    width: 100%;
}

@media (max-width: 900px) {
    .combo-xlsx-map-meta-row {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .combo-xlsx-map-desc {
        width: 100%;
        text-align: left;
    }
}

body[data-theme="light"] .combo-import-target-label select {
    background: #fff;
    color: #1f2937;
    border-color: #c3c7cf;
}

body[data-theme="light"] .combo-xlsx-map-divider {
    border-top-color: #d7dce4;
}

body[data-theme="light"] .combo-xlsx-map-table.stack td:last-child {
    border-bottom-color: #e0e4ea;
}

body[data-theme="light"] .combo-xlsx-map-layout-table {
    box-shadow: inset 0 0 0 1px #c8cdd6;
}

body[data-theme="light"] .combo-xlsx-map-layout-table td,
body[data-theme="light"] .combo-xlsx-map-layout-table th {
    border-color: #e0e4ea;
    color: #111827;
    background: #f9fafb;
}

body[data-theme="light"] .combo-xlsx-map-layout-table .combo-xlsx-map-layout-section th {
    background: #e8edf4;
    color: #111827;
}

body[data-theme="light"] .combo-xlsx-map-layout-table .combo-xlsx-map-layout-empty,
body[data-theme="light"] .combo-xlsx-map-layout-table .combo-xlsx-map-layout-section th.empty {
    background: #f9fafb;
    border: 0;
    color: transparent;
}

body[data-theme="light"] .combo-xlsx-map-layout-table tr:last-child .combo-xlsx-map-layout-empty,
body[data-theme="light"] .combo-xlsx-map-layout-table tr:last-child .combo-xlsx-map-layout-section th.empty {
    border-bottom: 1px solid #c8cdd6;
}

body[data-theme="light"] .combo-xlsx-map-layout-table tr:first-child .combo-xlsx-map-layout-empty,
body[data-theme="light"] .combo-xlsx-map-layout-table tr:first-child .combo-xlsx-map-layout-section th.empty {
    border-top: 1px solid #c8cdd6;
}

body[data-theme="light"] .combo-xlsx-map-layout-cell select {
    background: #fff;
    color: #1f2937;
    border-color: #c3c7cf;
}

body[data-theme="light"] .combo-xlsx-map-target-actions button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-content {
    background: #ffffff;
    color: #1f2937;
    border-color: #c8cdd6;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-content header .close,
body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-content h3,
body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-sheet strong {
    color: #111827;
}

body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-sheet,
body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-desc,
body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-target-item,
body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-target-heading,
body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-save-preset {
    color: #374151;
}

body[data-theme="light"] .combo-xlsx-map-modal .combo-keymap-actions button {
    background: #eceff4;
    color: #1f2937;
    border-color: #bcc2cc;
}

body[data-theme="light"] .combo-xlsx-map-modal .combo-xlsx-map-target-panel {
    border-color: #c8cdd6;
    background: transparent;
}

.combo-multi-panel {
    position: absolute;
    min-width: 220px;
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 8px;
    color: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 500;
}

.combo-multi-panel.active {
    display: block;
}

.combo-multi-header {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.combo-multi-body {
    display: grid;
    gap: 4px;
    max-height: 220px;
    overflow: auto;
    font-size: 12px;
}

.combo-multi-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.combo-multi-actions button {
    border-radius: 4px;
    border: 1px solid #333;
    background: #1b1b1b;
    color: #fff;
    padding: 4px 8px;
    cursor: pointer;
}


/* PsychoDrive-aligned frame meter cues (non-disruptive overlays) */
#comboView .frame-meter-block.frame-meter-recover-forward {
    box-shadow: inset 0 -1px 0 rgba(72, 174, 255, 0.55);
}

#comboView .frame-meter-block.frame-meter-recover-reverse {
    box-shadow: inset 0 -1px 0 rgba(255, 166, 72, 0.6);
}

#comboView .frame-meter-block.frame-meter-wall-stop {
    border-right: 1px dashed rgba(255, 235, 120, 0.8);
}

#comboView .frame-meter-block.frame-meter-hitstop {
    outline: 1px solid rgba(255, 255, 255, 0.16);
    outline-offset: -1px;
}

#comboView .frame-meter-block.frame-meter-multihit::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.06) 0 1px,
            transparent 1px 3px);
    pointer-events: none;
}

/* ── COMBO TREE VIEW (dedicated page) ────────────────────────────────────── */

#treeView {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    font-family: 'Noto Sans JP', sans-serif;
    --tree-col-starter: 0px;
    --tree-col-scale: 60px;
    --tree-box-halo: #0f0f0f;
    --tree-box-fill: #111;
}

#treeView.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0;
    min-height: 0;
    width: 100%;
    max-width: none;
    align-self: stretch;
    box-sizing: border-box;
    overflow: hidden;
    /* Match #comboView.active: no horizontal inset so tree aligns to combo table edges */
    padding: 0;
}

#treeView .tree-view-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding-top: 108px;
    background: transparent;
}

#treeView .tree-chart-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 8px;
    background: transparent;
    border-bottom: 1px solid #262626;
    flex-shrink: 0;
    flex-wrap: wrap;
}

#treeView .tree-chart-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 16px 10px;
    background: transparent;
    border-top: 1px solid #262626;
    border-bottom: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.htree-box-store-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin-left: 4px;
    color: #31c6ff;
    font-size: 9px;
    line-height: 1;
    text-shadow: 0 0 4px rgba(49, 198, 255, 0.45);
    flex-shrink: 0;
}

.htree-box-store-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin-left: 4px;
    color: #31c6ff;
    font-size: 9px;
    line-height: 1;
    text-shadow: 0 0 4px rgba(49, 198, 255, 0.45);
    flex-shrink: 0;
}

.htree-box-store-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin-left: 4px;
    color: #31c6ff;
    font-size: 9px;
    line-height: 1;
    text-shadow: 0 0 4px rgba(49, 198, 255, 0.45);
    flex-shrink: 0;
}

.htree-box-store-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin-left: 4px;
    color: #31c6ff;
    font-size: 9px;
    line-height: 1;
    text-shadow: 0 0 4px rgba(49, 198, 255, 0.45);
    flex-shrink: 0;
}

#treeView .tree-chart-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

#treeView .tree-chart-row-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7a7a7a;
    min-width: 5.5em;
}

#treeView .tree-chart-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#treeView .tree-chart-pill {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: 11px;
    color: #c4c4c4;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #353535;
    background: linear-gradient(180deg, #1a1a1a, #141414);
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}

#treeView .tree-chart-pill:hover {
    border-color: #4a4a4a;
    color: #e5e5e5;
    background: linear-gradient(180deg, #202020, #171717);
}

#treeView .tree-chart-pill.is-active {
    color: #eaf6ff;
    border-color: #2e7eb2;
    background: linear-gradient(180deg, #123148, #102536);
}

#treeView .tree-inline-filter-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 4px 0 2px;
}

#treeView .tree-inline-filter-group {
    border: 1px solid #2f2f2f;
    border-radius: 8px;
    background: #111;
    padding: 6px 8px;
    min-width: 170px;
}

#treeView .tree-inline-filter-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8f8f8f;
    margin-bottom: 5px;
    text-transform: uppercase;
}

#treeView .tree-inline-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

#treeView .tree-inline-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #d0d0d0;
    white-space: nowrap;
}

#treeView .tree-inline-filter-item input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: checkbox;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #2e7eb2;
}

.tree-pill-filter-panel {
    position: fixed;
    z-index: 1200;
    min-width: 220px;
    max-width: 320px;
    max-height: 56vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #111;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* Inline condition filters — flat band under controls (matches pre-card layout). */
#treeView .tree-inline-filters-host {
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 100%;
    margin: 6px 0 0;
    /* Align filter band with combo list table inset (left: 5px) */
    padding: 4px 5px 8px;
    border: none;
    border-top: none;
    border-radius: 0;
    background: transparent;
}

/* Full-viewport-width separator above condition checkboxes (not clipped by column padding). */
#treeView .tree-inline-filters-host::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    top: 0;
    height: 1px;
    background: #2a2a2a;
    pointer-events: none;
    z-index: 0;
}

#treeView .tree-inline-filters-host .tree-inline-filter-groups {
    padding: 2px 0 0;
    position: relative;
    z-index: 1;
}

body[data-theme="light"] #treeView .tree-inline-filters-host {
    background: transparent;
}

body[data-theme="light"] #treeView .tree-inline-filters-host::before {
    background: #cfcfcf;
}

.tree-pill-filter-panel.hidden {
    display: none;
}

.tree-pill-filter-head {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #d6d6d6;
    border-bottom: 1px solid #2c2c2c;
}

.tree-pill-filter-body {
    overflow: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tree-pill-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #d1d1d1;
}

.tree-pill-filter-item input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: checkbox;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #2e7eb2;
    background: #0f0f0f;
    border: 1px solid #5a5a5a;
    border-radius: 2px;
    flex: 0 0 auto;
}

.tree-pill-filter-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    padding: 8px 10px;
    border-top: 1px solid #2c2c2c;
}

.tree-pill-filter-btn {
    background: #191919;
    border: 1px solid #343434;
    color: #cfcfcf;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.tree-pill-filter-btn:hover {
    background: #222;
    color: #fff;
}

#treeView .tree-order-toggle {
    display: inline-flex;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
}

#treeView .tree-order-btn {
    background: #151515;
    border: 0;
    border-right: 1px solid #333;
    color: #9a9a9a;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

#treeView .tree-order-btn:last-child {
    border-right: 0;
}

#treeView .tree-order-btn:hover {
    background: #1e1e1e;
    color: #e6e6e6;
}

#treeView .tree-order-btn.is-active {
    background: #2a2a2a;
    color: #fafafa;
    box-shadow: inset 0 -2px 0 0 var(--accent);
}

#treeView .tree-view-head {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 0;
    width: 100%;
    position: absolute;
    left: 5px;
    top: 2px;
    z-index: 4;
}

/* Match combo list: #wb_Image1 + #comboControlTabs at left:5px / 105px (same as #comboView). */
#treeView .combo-tree-topstrip {
    position: relative;
    flex-shrink: 0;
    align-self: stretch;
    box-sizing: border-box;
    min-height: 103px;
    overflow: visible;
    margin-top: 0;
    margin-bottom: 0;
    padding: 2px 0 0;
    z-index: 6;
}

#treeView .tree-char-btn,
#treeView .combo-tree-char-btn {
    position: absolute;
    left: 5px;
    top: 2px;
    width: 92px;
    height: 101px;
    cursor: pointer;
}

#treeView .tree-char-btn img,
#treeView .combo-tree-char-btn img {
    display: block;
    width: 92px;
    height: 100px;
}

#treeView .tree-char-btn .combo-portrait-caret,
#treeView .combo-tree-char-btn .combo-portrait-caret {
    position: absolute;
    right: 21px;
    bottom: 4px;
    font-size: 0;
    line-height: 1;
    color: #f5f5f5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

#treeView .tree-char-btn .combo-portrait-caret::before,
#treeView .combo-tree-char-btn .combo-portrait-caret::before {
    content: "\25BC";
    font-size: 12px;
    line-height: 1;
}

#treeView .tree-control-tabs {
    width: auto;
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
    margin: 0;
    position: absolute;
    left: 105px;
    top: 103px;
    transform: translateY(-100%);
    z-index: 4;
}

#treeView .tree-control-tabs img {
    opacity: 1;
    filter: none;
}

#treeView .tree-control-tabs .combo-auto-input-toggles {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#treeView #treeAutoInputToggleWrap {
    display: none !important;
}

#treeView .tree-control-tabs .combo-poison-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 6px;
    border-radius: 18px;
    background: #161616;
    border: 1px solid #2a2a2a;
}

#treeView .tree-control-tabs .combo-poison-toggle-label {
    color: #d0d0d0;
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

#treeView .tree-control-tabs .combo-poison-toggle-group.lang-toggle {
    margin-right: 0;
    height: 22px;
    padding: 2px;
    gap: 2px;
    background: #1f1f1f;
    border-color: #2c2c2c;
}

#treeView .tree-control-tabs .combo-poison-toggle-btn {
    min-width: 40px;
    height: 18px;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: none;
}

#treeView .tree-control-tabs .combo-poison-toggle-btn.is-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

#treeView .tree-control-tabs .char-control-tabs-list {
    justify-content: flex-start;
    padding: 4px;
    gap: 4px;
    border-radius: 18px;
}

#treeView .tree-control-tabs .char-control-tabs-list li {
    padding: 4px 8px;
    border-radius: 14px;
}

#treeView .tree-control-tabs .char-control-tabs-list img {
    height: 16px;
    width: auto;
}

#treeView .btn-token {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    vertical-align: middle;
}

#treeView .htree-leaf-buttons .btn-token {
    margin-right: 4px;
    margin-bottom: 2px;
}

#treeView .htree-leaf-buttons .btn-token:last-child {
    margin-right: 0;
}

#treeView .btn-token img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

#treeView .btn-token[data-token="Hold2"] img,
#treeView .btn-token[data-token="Hold3"] img {
    width: auto;
    height: 18px;
}

#treeView .tree-view-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #d6d6d6;
    text-transform: uppercase;
    margin-right: 4px;
}

#treeView .tree-chart-controls-row .tree-view-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

#treeView .tree-chart-controls-row .tree-order-toggle-inline {
    margin-left: 4px;
}

#treeView .tree-toolbar-btn {
    background: #1a1a1a;
    border: 1px solid #2f2f2f;
    color: #bdbdbd;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

#treeView .tree-toolbar-btn:hover {
    background: #242424;
    color: #f0f0f0;
}

#treeView .tree-chart-controls-row .tree-view-count {
    margin-left: auto;
    font-size: 11px;
    color: #8b8b8b;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: 3px 10px;
}

#treeView .tree-mockup-h-canvas {
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
    padding: 4px 8px 4px 8px;
}

#treeView .tree-strip-inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 22px;
    position: relative;
    padding-right: 120px;
}

#treeView .tree-mockup-colhead .tree-view-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    position: static;
    z-index: 8;
    margin-top: 0;
    padding: 0;
    background: inherit;
}

#treeView .tree-mockup-colhead .tree-order-toggle-colhead {
    display: inline-flex;
    flex-direction: row;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

#treeView .tree-mockup-colhead .tree-order-toggle-colhead .tree-order-btn {
    width: auto;
    min-width: 74px;
    height: 22px;
    padding: 0 8px;
    border-right: 1px solid #333;
    border-bottom: 0;
    box-sizing: border-box;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

#treeView .tree-mockup-colhead .tree-order-toggle-colhead .tree-order-btn:last-child {
    border-right: 0;
}

#treeView .tree-mockup-colhead .tree-view-count {
    margin-left: 0;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #8b8b8b;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

/* Scroll container — scrolls both ways */
#treeView .tree-view-scroll {
    flex: 1;
    overflow: auto;
    padding: 0 0 40px 5px;
    width: 100%;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: #6a6a6a rgba(255, 255, 255, 0.06);
}

#treeView .tree-view-scroll.grabbing {
    cursor: grabbing;
}

#treeView .tree-view-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #6a6a6a;
    border-radius: 10px;
}

#treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

#treeView .tree-main-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    min-width: 100%;
    width: 100%;
    box-sizing: border-box;
    gap: 0;
}

/* Narrower than the old 440px experiment, wider than 330px so dual toggles aren’t clipped (JP/EN). */
#treeView .tree-detail-pane {
    flex: 0 0 380px;
    width: 380px;
    min-width: 380px;
    max-width: 380px;
    border-left: 1px solid #2a2a2a;
    background: #101010;
    padding: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    align-self: stretch;
    box-sizing: border-box;
}

#treeView .tree-detail-pane.is-hidden {
    display: none;
}

#treeView .tree-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cfcfcf;
    margin-bottom: 8px;
}

#treeView .tree-detail-head .header-help-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

#treeView .tree-detail-head .header-help-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

#treeView .tree-detail-empty,
#treeView #treeDetailEmpty {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: #8f8f8f;
}

#treeView .tree-detail-modal-host {
    display: none;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* Docked modal supersedes legacy inline editors; keep them out of layout. */
#treeView .tree-detail-pane #treeAutoInputToggleWrap,
#treeView .tree-detail-pane #treeDetailButtons,
#treeView .tree-detail-pane #treeDetailGrid,
#treeView .tree-detail-pane #treeDetailMedia {
    display: none !important;
}

#treeView .tree-detail-head,
#treeView .tree-detail-empty,
#treeView #treeDetailEmpty {
    flex-shrink: 0;
}

#treeView #frameMeterOverlay.tree-docked {
    position: static;
    inset: auto;
    background: transparent;
    z-index: 1;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
}

#treeView #frameMeterOverlay.tree-docked .modal-backdrop {
    display: none;
}

#treeView #frameMeterOverlay.tree-docked .frame-meter-panel {
    width: 100%;
    max-width: none;
    max-height: none;
    height: auto;
    min-height: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-scroll {
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: #6a6a6a rgba(255, 255, 255, 0.06);
}

/* Right pane: one row, intrinsic-width pills (do not stretch to fill pane). */
#treeView #frameMeterOverlay.tree-docked #comboDetailsAutoToggleWrap.combo-details-auto-toggles {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
}

#treeView #frameMeterOverlay.tree-docked #comboDetailsAutoToggleWrap .combo-poison-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 3px 5px 3px 4px;
}

#treeView #frameMeterOverlay.tree-docked #comboDetailsAutoToggleWrap .combo-poison-toggle-label {
    flex: 0 1 auto;
    white-space: nowrap;
    font-size: 10px;
}

#treeView #frameMeterOverlay.tree-docked #comboDetailsAutoToggleWrap .combo-poison-toggle-group.lang-toggle {
    flex-shrink: 0;
    height: 20px;
    padding: 1px;
    gap: 1px;
}

#treeView #frameMeterOverlay.tree-docked #comboDetailsAutoToggleWrap .combo-poison-toggle-btn {
    min-width: 28px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #6a6a6a;
    border-radius: 10px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#treeView #frameMeterOverlay.tree-docked #comboDetailsHelpBtn,
#treeView #frameMeterOverlay.tree-docked #frameMeterTitle,
#treeView #frameMeterOverlay.tree-docked #frameMeterMeta,
#treeView #frameMeterOverlay.tree-docked .combo-details-bar-meter {
    display: none !important;
}

/* Tree right pane: hide URL block entirely. */
#treeView #frameMeterOverlay.tree-docked label[for="comboDetailsUrl"],
#treeView #frameMeterOverlay.tree-docked #comboDetailsUrl,
#treeView #frameMeterOverlay.tree-docked #comboDetailsVideoWrap {
    display: none !important;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-bar {
    min-height: 28px;
    padding: 4px 6px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-bar-command {
    flex-direction: row;
    align-items: center;
    gap: 0;
    min-height: 28px;
    padding-top: 3px;
    padding-bottom: 3px;
}

/* Tree right pane: match combo list table sizing (not modal enlarged sizing). */
#treeView #frameMeterOverlay.tree-docked .combo-details-command {
    font-size: var(--command-font-size, 12px);
}

#treeView #frameMeterOverlay.tree-docked .combo-details-command-edit {
    font-size: var(--command-font-size, 12px);
    line-height: 1.2;
    min-height: 1.2em;
    height: auto;
    white-space: normal;
    overflow-x: visible;
    overflow-y: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-overflow: clip;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-buttons-icons {
    gap: 4px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-buttons-icons .btn-token img {
    width: 18px;
    height: 18px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-buttons-icons .btn-token[data-token="Hold2"] img,
#treeView #frameMeterOverlay.tree-docked .combo-details-buttons-icons .btn-token[data-token="Hold3"] img {
    width: auto;
    height: 18px;
}

/* Tree right pane: disable per-token command colors. */
#treeView #frameMeterOverlay.tree-docked .combo-details-command-edit .frame-meter-command-step,
#treeView #frameMeterOverlay.tree-docked .combo-details-command-edit [class*="frame-meter-stepmod-"] {
    color: inherit !important;
}

/* Tree right pane: tighten all-field table for narrower pane width. */
#treeView #frameMeterOverlay.tree-docked .combo-details-layout-section th {
    padding: 3px 6px;
    font-size: 9px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-cell-inner {
    gap: 2px;
    padding: 3px 4px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-label {
    font-size: 9px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    font-size: 10px;
    padding: 3px 5px;
    min-height: 24px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-cell[data-field="special_condition"] {
    min-width: 110px;
}

/* Tree right pane all-fields: use two-column section layout and remove dead grid space. */
#treeView #frameMeterOverlay.tree-docked #comboDetailsAllFields {
    display: block;
    border: 0;
    border-radius: 0;
    min-width: 0;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-compact-section-title {
    text-transform: none;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-compact-cell {
    grid-template-columns: minmax(78px, 96px) minmax(0, 1fr);
    gap: 4px;
    padding: 3px 5px;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-layout-compact-cell[data-field="special_condition"],
#treeView #frameMeterOverlay.tree-docked .combo-details-layout-compact-cell[data-field="vs_character"],
#treeView #frameMeterOverlay.tree-docked .combo-details-layout-compact-cell[data-field="game_version"] {
    grid-template-columns: minmax(78px, 96px) minmax(0, 1fr);
}

/* Tree right pane only: hide statistics block. */
#treeView #frameMeterOverlay.tree-docked .combo-details-stats,
#treeView #frameMeterOverlay.tree-docked .combo-details-allfields + .combo-details-sep {
    display: none;
}

/* Tree right pane: actions row stays below scroll area (flex, not outer pane scroll). */
#treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    flex-shrink: 0;
    margin-top: 0;
    padding: 8px 0 4px;
    border-top: 1px solid #2a2a2a;
    background: #101010;
    position: relative;
    z-index: 3;
}

#treeView .tree-detail-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#treeView .tree-detail-edit-grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2a2a;
}

#treeView .tree-detail-edit-label {
    color: #8c8c8c;
    font-size: 12px;
    align-self: center;
}

#treeView .tree-detail-edit-input {
    width: 100%;
    box-sizing: border-box;
    background: #0f0f0f;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 6px;
    min-height: 24px;
}

#treeView .tree-detail-edit-input:focus {
    outline: 1px solid #f97306;
    border-color: #f97306;
}

#treeView .tree-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #d4d4d4;
}

#treeView .tree-detail-section {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid #2a2a2a;
}

#treeView .tree-detail-section:first-child {
    margin-top: 0;
}

#treeView .tree-detail-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cfcfcf;
    margin-bottom: 4px;
}

#treeView .tree-detail-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

#treeView .tree-detail-label {
    color: #8c8c8c;
    white-space: nowrap;
}

#treeView .tree-detail-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#treeView .tree-detail-value-input {
    width: 100%;
    box-sizing: border-box;
    background: #0f0f0f;
    color: #fff;
    border: 1px solid #3f3f3f;
    border-radius: 4px;
    padding: 4px 6px;
    min-height: 24px;
}

#treeView .tree-detail-value-input:focus {
    outline: 1px solid #f97306;
    border-color: #f97306;
}

#treeView .tree-detail-media {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    background: #121212;
}

#treeView .tree-detail-url-link {
    color: #7cc4ff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

#treeView .tree-detail-url-link:hover {
    text-decoration: underline;
}

#treeView .tree-detail-video-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #2a2a2a;
    object-fit: cover;
}

#treeView .tree-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
}

#treeView .tree-toolbar-btn-danger {
    border-color: #5a2a2a;
    color: #ffb4b4;
}

#treeView .tree-toolbar-btn-danger:hover {
    background: #2a1818;
    color: #ffd4d4;
}

#treeView #treeDetailButtons {
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    background: #131313;
    padding: 6px 8px;
    min-height: 30px;
}

#treeView #treeDetailButtons .btn-token.btn-token-fallback {
    display: none;
}

#treeView #treeDetailButtons .btn-token-text {
    display: none !important;
}

#treeView .tree-mockup-wrap {
    width: max-content;
    min-width: 100%;
}

#treeView .tree-mockup-colhead {
    display: grid;
    grid-template-columns: minmax(320px, 1fr);
    align-items: end;
    gap: 0;
    padding: 6px 0;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 9;
    background: linear-gradient(180deg, #101010 0%, #0f0f0f 100%);
    border-bottom: 1px solid #262626;
}

#treeView .tree-mockup-h {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
    padding: 0 4px;
    text-align: center;
}

#treeView .tree-mockup-h-starter {
    display: none;
}

#treeView .tree-mockup-h-scale {
    display: none;
}

#treeView .htree-root--mockup {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: max-content;
    min-width: 100%;
}

#treeView .tree-starter-band {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-top: 1px solid #242424;
    background: #0f0f0f;
    margin-bottom: 8px;
}

#treeView .tree-starter-band:first-of-type {
    border-top: 0;
}

#treeView .tree-band-starter-name {
    display: none;
}

#treeView .tree-flow-canvas-host {
    position: relative;
    flex: 1;
    min-width: 0;
    background: #0f0f0f;
}

#treeView .tree-band-main-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#treeView .tree-band-row-pair {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex: 0 0 auto;
    min-height: 64px;
}

#treeView .tree-band-tick-side {
    position: sticky;
    left: 0;
    z-index: 4;
    width: var(--tree-col-scale);
    min-width: var(--tree-col-scale);
    max-width: var(--tree-col-scale);
    flex-shrink: 0;
    padding: 12px 4px 8px;
    border-right: 1px solid #252525;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    background: linear-gradient(180deg, #121212 0%, #101010 100%);
}

#treeView .tree-band-tick {
    font-size: 10px;
    font-weight: 700;
    color: #6f6f6f;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

#treeView .tree-flow-row {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 64px;
    background: #0f0f0f;
}

#treeView .tree-flow-slot {
    position: absolute;
    top: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-width: 292px;
    padding-left: 0;
    margin-left: 0;
    border-left: 0;
    box-sizing: border-box;
}

#treeView .tree-flow-box {
    min-width: 160px;
    max-width: 220px;
    background: var(--tree-box-fill) !important;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.4);
}

#treeView .tree-flow-leaf-stack {
    position: relative;
    z-index: 2;
    display: none;
    flex-direction: column;
    gap: 4px;
    max-width: 360px;
    min-width: 0;
}

#treeView .tree-flow-leaf-stack .htree-leaf {
    padding-left: 0;
}

#treeView .tree-flow-leaf-stack .htree-leaf::before {
    display: none;
}

#treeView .tree-flow-svg {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

#treeView .tree-flow-svg .tree-flow-edge {
    stroke: rgba(186, 186, 186, 0.28);
    stroke-width: 1.1px;
}

#treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(186, 186, 186, 0.28);
    stroke-width: 1.1px;
    filter: none;
}

/* ── Horizontal tree layout (legacy flex tree, unused in mockup) ── */

/* Root: stacks top-level starters vertically */
.htree-root:not(.htree-root--mockup) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: max-content;
    min-width: 100%;
}

.htree-root > .htree-branch.htree-top {
    padding-top: 10px;
    border-top: 1px solid #1f1f1f;
}

.htree-root > .htree-branch.htree-top:first-child {
    padding-top: 0;
    border-top: 0;
}

/* Empty state */
.htree-empty {
    padding: 40px 24px;
    color: #555;
    font-size: 13px;
    font-style: italic;
}

/* One horizontal branch: [box] → [children column] */
.htree-branch {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    --tree-line-offset: 16px;
}

/* The box-wrap holds the node box plus a connector line to the right */
.htree-box-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    min-width: 0;
    margin-bottom: 10px;
    z-index: 1;
}

/* Horizontal connector line: box → children */
.htree-box-wrap::after {
    content: '';
    position: absolute;
    left: var(--tree-line-offset);
    bottom: -10px;
    width: 2px;
    height: 10px;
    background: rgba(59, 59, 59, 0.9);
    display: block;
    z-index: 0;
}

/* Hide connector when children hidden */
.htree-branch:has(> .htree-box-wrap > .htree-box.htree-collapsed) > .htree-box-wrap::after,
.htree-branch:not(:has(.htree-children)) > .htree-box-wrap::after {
    display: none;
}

/* Node box (the clickable label) */
.htree-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #121212;
    border: 1px solid #303030;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
    min-width: 96px;
    width: fit-content;
    max-width: 420px;
    position: relative;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
    justify-content: flex-start;
    overflow: hidden;
    z-index: 2;
}

.htree-box:hover:not(.tree-flow-box-selected) {
    background: #202020;
    border-color: #3b3b3b;
}

/* Selected path in tree: keep border as-is, change inner fill only */
#treeView .htree-box.tree-flow-box-path {
    background: rgba(36, 58, 83, 0.32) !important;
}

#treeView .htree-box.tree-flow-box-selected {
    background: rgba(62, 94, 130, 0.5) !important;
}

#treeView .htree-box.tree-flow-box-selected:hover {
    background: rgba(72, 108, 148, 0.58) !important;
}

#treeView .htree-box.htree-box--cr {
    border-color: #5eb7f0;
}

#treeView .htree-box.htree-box--dr {
    border-color: #2a5fbf;
}

#treeView .htree-box.htree-box--od {
    border-color: #e8c040;
}

#treeView .htree-box.htree-box--di {
    border-color: #b26bff;
}

#treeView .htree-box.htree-box--sa1 {
    /* Distinct from drive OD yellow and CR light blue */
    border-color: #db2777;
    border-width: 2px;
}

#treeView .htree-box.htree-box--sa2 {
    border-color: #ff9f43;
    border-width: 2px;
}

#treeView .htree-box.htree-box--sa3 {
    border-color: #0f766e;
    border-width: 2px;
}

#treeView .htree-box.htree-box--shungoku {
    border-color: #ff6b6b;
    border-width: 2px;
}

#treeView .htree-box.htree-box--sin-sa2-1 {
    border-color: #a29bfe;
    border-width: 2px;
}

#treeView .htree-box.htree-box--sin-sa2-2 {
    border-color: #fd79a8;
    border-width: 2px;
}

#treeView .htree-box.htree-box--cr:hover,
#treeView .htree-box.htree-box--dr:hover,
#treeView .htree-box.htree-box--od:hover,
#treeView .htree-box.htree-box--di:hover,
#treeView .htree-box.htree-box--sa1:hover,
#treeView .htree-box.htree-box--sa2:hover,
#treeView .htree-box.htree-box--sa3:hover,
#treeView .htree-box.htree-box--shungoku:hover,
#treeView .htree-box.htree-box--sin-sa2-1:hover,
#treeView .htree-box.htree-box--sin-sa2-2:hover {
    filter: brightness(1.06);
}

.htree-box:focus {
    outline: 1px solid #444;
    outline-offset: -1px;
}

.htree-box-label {
    font-size: 12px;
    color: #e2e2e2;
    font-weight: 600;
    display: none;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

.htree-box-count {
    font-size: 10px;
    color: #9a9a9a;
    background: #121212;
    border: 1px solid #2b2b2b;
    border-radius: 8px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.htree-box-store-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin-left: 4px;
    color: #31c6ff;
    font-size: 9px;
    line-height: 1;
    text-shadow: 0 0 4px rgba(49, 198, 255, 0.45);
    flex-shrink: 0;
}

/* Collapse indicator arrow on the box */
.htree-box::before {
    content: '◀';
    font-size: 7px;
    color: #444;
    flex-shrink: 0;
    order: 99;
    transition: transform 0.12s, opacity 0.12s;
}

.htree-box.htree-collapsed::before {
    transform: rotate(180deg);
    color: #666;
}

/* Children column: a vertical stack of sub-branches / leaves */
.htree-children {
    display: flex;
    flex-direction: column;
    border-left: 2px solid rgba(59, 59, 59, 0.9);
    padding-left: 14px;
    margin-left: var(--tree-line-offset);
    margin-top: 0;
    gap: 0;
    /* Left connector line for siblings */
}

.htree-children.htree-collapsed {
    display: none;
}

/* Each item in children gets a horizontal arm */
.htree-children > .htree-branch,
.htree-children > .htree-leaf {
    position: relative;
    margin-left: 0;
    padding-left: 14px;
    margin-top: 14px;
}

/* Horizontal arm from vertical sibling line → branch/leaf */
.htree-children > .htree-branch::before,
.htree-children > .htree-leaf::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 22px;
    width: 14px;
    height: 2px;
    background: rgba(59, 59, 59, 0.9);
    flex-shrink: 0;
    align-self: center;
}

/* First child: vertical line starts at center, not top */
.htree-children > :first-child {
    margin-top: 0;
}

/* ── Leaf combo cards ── */
.htree-leaf {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 0;
    cursor: pointer;
}

.htree-leaf-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #121212;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 140px;
    max-width: 360px;
    transition: background 0.1s, border-color 0.1s;
    position: relative;
    z-index: 1;
}

.htree-leaf:hover .htree-leaf-inner {
    background: #1a1a1a;
    border-color: #3a3a3a;
}

.htree-leaf:focus {
    outline: none;
}

.htree-leaf:focus .htree-leaf-inner {
    border-color: #4b5164;
}

.htree-leaf-cmd {
    font-size: 12px;
    color: #d6d6d6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 340px;
}

.htree-leaf-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.htree-leaf-buttons .btn-token-text {
    display: none;
}

.htree-leaf-meta {
    font-size: 10px;
    color: #8e8e8e;
    white-space: nowrap;
    background: #151515;
    border: 1px solid #252525;
    border-radius: 999px;
    padding: 1px 8px;
    align-self: flex-start;
}

.htree-leaf-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    color: #8b8b8b;
    font-size: 11px;
    background: #141414;
    border: 1px solid #242424;
    border-radius: 6px;
    margin: 6px 0 4px;
}

.htree-leaf-sep-label {
    color: #b2b2b2;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.htree-leaf-sep-count {
    color: #6f6f6f;
    background: #141414;
    border: 1px solid #242424;
    border-radius: 999px;
    padding: 1px 6px;
}

.htree-leaf.is-active .htree-leaf-inner {
    background: #1f2630;
    border-color: #2a2a2a;
    box-shadow: inset 0 0 0 1px rgba(140, 170, 210, 0.22);
}

/* Tree layout overrides: icon handling only */

.htree-box-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
}

.htree-box-icons .btn-token-text {
    display: none;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

/* Remove top-strip lines around control tabs in light mode (tree page). */
body[data-theme="light"] #treeView .char-control-tabs.combo-control-tabs {
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .tree-chart-header {
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

/* Keep inactive Classic/Modern dimmed in tree view light mode too. */
body[data-theme="light"] #treeView .tree-control-tabs .char-control-tabs-list li {
    filter: grayscale(100%) opacity(.7);
}

body[data-theme="light"] #treeView .tree-control-tabs .char-control-tabs-list li.active {
    filter: none;
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    display: none;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box-store-mark {
    color: #1c76b8;
    text-shadow: none;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

/* Remove top-strip lines around control tabs in light mode (tree page). */
body[data-theme="light"] #treeView .char-control-tabs.combo-control-tabs {
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .tree-chart-header {
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

/* Keep inactive Classic/Modern dimmed in tree view light mode too. */
body[data-theme="light"] #treeView .tree-control-tabs .char-control-tabs-list li {
    filter: grayscale(100%) opacity(.7);
}

body[data-theme="light"] #treeView .tree-control-tabs .char-control-tabs-list li.active {
    filter: none;
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    display: none;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box-store-mark {
    color: #1c76b8;
    text-shadow: none;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    display: none;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box-store-mark {
    color: #1c76b8;
    text-shadow: none;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    display: none;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box-store-mark {
    color: #1c76b8;
    text-shadow: none;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    color: #222;
    background: #efefef;
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #f7f7f7;
    border-color: #ababab;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Tree view light-mode palette */
body[data-theme="light"] #treeView {
    background: #efefef;
    color: #111;
    --tree-box-halo: #efefef;
    --tree-box-fill: #ffffff;
}

body[data-theme="light"] #treeView .tree-view-shell,
body[data-theme="light"] #treeView .tree-main-layout,
body[data-theme="light"] #treeView .tree-page-chrome,
body[data-theme="light"] #treeView .tree-body-split,
body[data-theme="light"] #treeView .tree-view-scroll,
body[data-theme="light"] #treeView .tree-mockup-wrap,
body[data-theme="light"] #treeView .tree-band-main-col {
    background: #efefef !important;
}

body[data-theme="light"] #treeView .tree-chart-controls-row,
body[data-theme="light"] #treeView .tree-chart-header,
body[data-theme="light"] #treeView .tree-mockup-colhead {
    border-color: #c9c9c9;
}

body[data-theme="light"] #treeView .tree-chart-header {
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .char-control-tabs.combo-control-tabs {
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .char-control-tabs.combo-control-tabs {
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .char-control-tabs.combo-control-tabs {
    background: transparent !important;
    border-top: none !important;
    border-bottom: none !important;
}

body[data-theme="light"] #treeView .tree-chart-row-label,
body[data-theme="light"] #treeView .tree-mockup-h,
body[data-theme="light"] #treeView .tree-band-tick {
    color: #4f4f4f;
}

body[data-theme="light"] #treeView .tree-chart-pill,
body[data-theme="light"] #treeView .tree-toolbar-btn,
body[data-theme="light"] #treeView .tree-order-btn,
body[data-theme="light"] #treeView .tree-view-count {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: linear-gradient(180deg, #f4f4f4, #e8e8e8);
}

body[data-theme="light"] #treeView .tree-chart-pill:hover,
body[data-theme="light"] #treeView .tree-toolbar-btn:hover,
body[data-theme="light"] #treeView .tree-order-btn:hover {
    color: #111;
    border-color: #ababab;
    background: linear-gradient(180deg, #fafafa, #ececec);
}

body[data-theme="light"] #treeView .tree-chart-pill.is-active,
body[data-theme="light"] #treeView .tree-order-btn.is-active {
    color: #111;
    border-color: #f97306;
    background: linear-gradient(135deg, rgba(249, 115, 6, 0.18), rgba(249, 115, 6, 0.08));
}

/* Keep inactive Classic/Modern dimmed in tree view light mode too. */
body[data-theme="light"] #treeView .tree-control-tabs .char-control-tabs-list li {
    filter: grayscale(100%) opacity(.7);
}

body[data-theme="light"] #treeView .tree-control-tabs .char-control-tabs-list li.active {
    filter: none;
}

body[data-theme="light"] #treeView .tree-inline-filter-group,
body[data-theme="light"] .tree-pill-filter-panel {
    border-color: #c7c7c7;
    background: #f8f8f8;
}

body[data-theme="light"] #treeView .tree-inline-filter-title,
body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-item {
    color: #333;
}

body[data-theme="light"] .tree-pill-filter-head,
body[data-theme="light"] .tree-pill-filter-actions {
    border-color: #d3d3d3;
}

body[data-theme="light"] .tree-pill-filter-btn {
    color: #2f2f2f;
    border-color: #c3c3c3;
    background: #efefef;
}

body[data-theme="light"] .tree-pill-filter-btn:hover {
    color: #111;
    border-color: #aaaaaa;
    background: #f7f7f7;
}

body[data-theme="light"] #treeView .tree-view-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-view-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane {
    background: #f1f1f1;
    border-left-color: #c8c8c8;
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #treeView .tree-detail-pane::-webkit-scrollbar-track {
    background: #dedede;
}

body[data-theme="light"] #treeView .tree-detail-head,
body[data-theme="light"] #treeView .tree-detail-empty,
body[data-theme="light"] #treeView #treeDetailEmpty {
    color: #333;
}

body[data-theme="light"] #treeView .tree-mockup-colhead {
    background: linear-gradient(180deg, #ededed 0%, #e6e6e6 100%);
}

body[data-theme="light"] #treeView .tree-mockup-h-scale,
body[data-theme="light"] #treeView .tree-band-tick-side {
    background: linear-gradient(180deg, #efefef 0%, #e6e6e6 100%);
    border-right-color: #cbcbcb;
}

body[data-theme="light"] #treeView .tree-starter-band,
body[data-theme="light"] #treeView .tree-flow-canvas-host,
body[data-theme="light"] #treeView .tree-flow-row {
    background: #f5f5f5;
}

body[data-theme="light"] #treeView .tree-starter-band {
    border-top-color: #cdcdcd;
}

body[data-theme="light"] #treeView .tree-band-starter-name {
    display: none;
}

body[data-theme="light"] #treeView .tree-band-row-pair {
    border-bottom-color: #d7d7d7;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] .htree-box {
    background: #ffffff !important;
    border-color: #c6c6c6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] #treeView .tree-flow-box {
    box-shadow: 0 0 0 4px #efefef, 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] .htree-box:hover:not(.tree-flow-box-selected) {
    background: #f9f9f9 !important;
    border-color: #acacac;
}

body[data-theme="light"] .htree-box-label {
    color: #202020;
}

body[data-theme="light"] .htree-box-count,
body[data-theme="light"] .htree-leaf-sep-count {
    color: #3a3a3a;
    background: #f2f2f2;
    border-color: #c7c7c7;
}

body[data-theme="light"] .htree-box-store-mark {
    color: #1c76b8;
    text-shadow: none;
}

body[data-theme="light"] .htree-box::before {
    color: #8a8a8a;
}

body[data-theme="light"] .htree-box.htree-collapsed::before {
    color: #676767;
}

body[data-theme="light"] #treeView .htree-box.tree-flow-box-selected {
    background: rgba(164, 199, 255, 0.6) !important;
}

body[data-theme="light"] #treeView .htree-box.tree-flow-box-path {
    background: rgba(194, 216, 252, 0.55) !important;
}

body[data-theme="light"] #treeView .htree-box.tree-flow-box-selected:hover {
    background: rgba(150, 189, 252, 0.68) !important;
}

body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge,
body[data-theme="light"] #treeView .tree-flow-svg .tree-flow-edge.is-active {
    stroke: rgba(64, 64, 64, 0.55);
}

body[data-theme="light"] .htree-box-wrap::after {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children {
    border-color: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-children > .htree-branch::before,
body[data-theme="light"] .htree-children > .htree-leaf::before {
    background: rgba(86, 86, 86, 0.6);
}

body[data-theme="light"] .htree-leaf-inner {
    background: #ffffff;
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner,
body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    border-color: #c6c6c6;
}

body[data-theme="light"] .htree-leaf:hover .htree-leaf-inner {
    background: #f7f7f7;
    box-shadow: none;
}

body[data-theme="light"] .htree-leaf.is-active .htree-leaf-inner {
    background: #eaf0fb;
    box-shadow: inset 0 0 0 1px rgba(74, 120, 190, 0.28);
}

body[data-theme="light"] .htree-leaf-cmd,
body[data-theme="light"] .htree-leaf-sep-label {
    color: #2a2a2a;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    border-top-color: #c8c8c8;
    background: #f1f1f1;
}

body[data-theme="light"] #treeView .tree-inline-filter-item {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-inline-filter-item span {
    color: #202020;
}

body[data-theme="light"] #treeView .tree-char-btn .combo-portrait-caret,
body[data-theme="light"] #treeView .combo-tree-char-btn .combo-portrait-caret {
    color: #111;
    text-shadow: none;
}

/* Combo details modal + tree docked detail (light mode) */
body[data-theme="light"] #frameMeterOverlay .frame-meter-panel {
    background: #ffffff;
    border-color: #d1d1d1;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .modal-title,
body[data-theme="light"] #frameMeterOverlay .modal-meta,
body[data-theme="light"] #frameMeterOverlay .combo-details-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-label,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-label {
    color: #222;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar,
body[data-theme="light"] #frameMeterOverlay .combo-details-sep,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid {
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-bar {
    background: #ffffff;
    border-color: #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay #comboDetailsAllFields:has(.combo-details-layout-table) {
    border: 1px solid #c9c9c9;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-command-edit,
body[data-theme="light"] #frameMeterOverlay .combo-details-buttons-icons,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags {
    background: transparent;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table td,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-table th {
    border-bottom-color: #d8d8d8;
    border-right-color: #dfdfdf;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-section th,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-section-title,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-grid > div.combo-details-allfields-section {
    background: #eeeeee;
    color: #222;
    border-color: #d0d0d0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-cell {
    border-bottom-color: #dddddd;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input,
body[data-theme="light"] #frameMeterOverlay .combo-details-layout-compact-control .combo-details-allfields-input {
    background: #ffffff;
    color: #111;
    border-color: #c7c7c7;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-input:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-textarea:focus,
body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input:focus {
    border-color: #f97306;
    outline-color: #f97306;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Right pane specific input surface parity */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-command-edit,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-input,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-textarea,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-allfields-input {
    background: #fff;
    color: #111;
    border-color: #c7c7c7;
}

/* Ensure tree right pane toggles match combo list visual style in light mode. */
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle {
    background: #e6e6e6;
    border-color: #bcbcbc;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label {
    color: #333;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group {
    background: #e7e7e7;
    border-color: #cbcbcb;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn {
    color: #111;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.active {
    background: #d8d8d8;
    color: #111;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-allfields-input option {
    background: #fff;
    color: #111;
}

/* Final light-mode enforcement for tree + right-pane toggles */
body[data-theme="light"] #treeView .tree-flow-slot,
body[data-theme="light"] #treeView .tree-flow-leaf-stack,
body[data-theme="light"] #treeView .htree-box-wrap {
    background: transparent !important;
}

body[data-theme="light"] #treeView .tree-flow-box,
body[data-theme="light"] #treeView .htree-box {
    background: #ffffff !important;
    border-color: #bdbdbd !important;
    box-shadow: 0 0 0 2px var(--tree-box-halo), 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="light"] #treeView .htree-box:hover {
    background: #fafafa !important;
    border-color: #ababab !important;
}

body[data-theme="light"] #treeView .htree-box-count {
    background: #f2f2f2 !important;
    color: #2a2a2a !important;
    border-color: #c7c7c7 !important;
}

/* Match combo-list style for Auto Input / Overwrite toggles in modal + tree right pane */
body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group {
    background: #e7e7e7 !important;
    border: 1px solid #cbcbcb !important;
    border-radius: 999px !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Force parity with combo-list toggle classes used in right pane/modal markup. */
body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle {
    background: #e6e6e6 !important;
    border: 1px solid #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn {
    color: #333 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode: combo list tag section visibility */
body[data-theme="light"] #comboView .combo-tags-add-btn {
    background: #efefef !important;
    color: #222 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #comboView .combo-tags-add-btn:hover {
    border-color: var(--accent) !important;
    color: #111 !important;
}

body[data-theme="light"] #comboView .combo-tags-chips,
body[data-theme="light"] #frameMeterOverlay #comboDetailsTags,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* Final fix: button icon row surface should match dark-mode style in light mode too. */
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td .cmd-input[data-field="buttons"],
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td .cmd-output,
body[data-theme="light"] #comboView #Table1 tr.combo-row-buttons td .cmd-input.cmd-output {
    background: transparent !important;
    border-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Final light-mode table-line contrast tuning (combo list). */
body[data-theme="light"] #comboView #comboTableHeader th,
body[data-theme="light"] #comboView #comboTableHeader td,
body[data-theme="light"] #comboView #Table1 thead th,
body[data-theme="light"] #comboView #Table1 thead td {
    border-color: #b2b2b2 !important;
}

body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(1) th,
body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(1) td {
    border-bottom-color: #aaaaaa !important;
}

body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(2) th,
body[data-theme="light"] #comboView #comboTableHeader tr:nth-child(2) td {
    border-bottom-color: #a8a8a8 !important;
}

body[data-theme="light"] #comboView #Table1 tbody td,
body[data-theme="light"] #comboView #Table1 tr.combo-group-row td,
body[data-theme="light"] #comboView #Table1 tr.combo-row-visible td {
    border-bottom-color: #bbbbbb !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible-start td {
    border-top-color: #b0b0b0 !important;
}

body[data-theme="light"] #comboView #Table1 tr.combo-row-visible-end td {
    border-bottom-color: #b0b0b0 !important;
}

body[data-theme="light"] #comboView #Table1 .combo-sep-right,
body[data-theme="light"] #comboView #comboTableHeader .combo-sep-right {
    border-right-color: #a6a6a6 !important;
}

body[data-theme="light"] #comboView #Table1 .combo-sticky-col.combo-sep-right,
body[data-theme="light"] #comboView #comboTableHeader .combo-sticky-col.combo-sep-right {
    box-shadow: inset -1px 0 0 #a6a6a6 !important;
}

/* Tag readability tuning (both modes) */
#comboView .combo-tag-chip,
#frameMeterOverlay .combo-tag-chip,
.combo-multi-body.combo-tag-picker .combo-tag-opt {
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    color: #f8fafc !important;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Dark mode: slightly stronger saturation/opacity for chips */
body[data-theme="dark"] #comboView .combo-tag-chip,
body[data-theme="dark"] #frameMeterOverlay .combo-tag-chip,
body[data-theme="dark"] #comboCompareOverlay .combo-tag-chip,
body[data-theme="dark"] .combo-multi-body.combo-tag-picker .combo-tag-opt {
    filter: saturate(1.12) brightness(1.04);
}

/* Light mode: dark text + stronger border for contrast */
body[data-theme="light"] #comboView .combo-tag-chip,
body[data-theme="light"] #frameMeterOverlay .combo-tag-chip,
body[data-theme="light"] #comboCompareOverlay .combo-tag-chip,
body[data-theme="light"] .combo-multi-body.combo-tag-picker .combo-tag-opt {
    color: #111827 !important;
    border: 1px solid rgba(17, 24, 39, 0.28) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 0 1px rgba(17, 24, 39, 0.06) !important;
    text-shadow: none !important;
    filter: saturate(1.2) brightness(0.98);
}

body[data-theme="light"] #comboView .combo-tag-chip-del,
body[data-theme="light"] #frameMeterOverlay .combo-tag-chip-del,
body[data-theme="light"] #comboCompareOverlay .combo-tag-chip-del {
    color: rgba(17, 24, 39, 0.72) !important;
}

/* Final: tag readability + contrast rebalance (both themes) */
#comboView .combo-tag-chip,
#frameMeterOverlay .combo-tag-chip,
#comboCompareOverlay .combo-tag-chip,
.combo-multi-body.combo-tag-picker .combo-tag-opt {
    border-width: 1px !important;
    border-style: solid !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    box-shadow: none !important;
}

body[data-theme="dark"] #comboView .combo-tag-chip,
body[data-theme="dark"] #frameMeterOverlay .combo-tag-chip,
body[data-theme="dark"] #comboCompareOverlay .combo-tag-chip,
body[data-theme="dark"] .combo-multi-body.combo-tag-picker .combo-tag-opt {
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.30) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45) !important;
    filter: saturate(1.15) brightness(1.04);
}

body[data-theme="light"] #comboView .combo-tag-chip,
body[data-theme="light"] #frameMeterOverlay .combo-tag-chip,
body[data-theme="light"] #comboCompareOverlay .combo-tag-chip,
body[data-theme="light"] .combo-multi-body.combo-tag-picker .combo-tag-opt {
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.38) !important;
    text-shadow: none !important;
    filter: saturate(1.28) brightness(0.94);
}

body[data-theme="light"] #comboView .combo-tag-chip-del,
body[data-theme="light"] #frameMeterOverlay .combo-tag-chip-del,
body[data-theme="light"] #comboCompareOverlay .combo-tag-chip-del,
body[data-theme="light"] .combo-multi-body.combo-tag-picker .combo-tag-opt .combo-tag-chip-del {
    color: rgba(15, 23, 42, 0.78) !important;
}

/* Keep tag chip background colors consistent across dark/light modes. */
#comboView .combo-tag-chip,
#frameMeterOverlay .combo-tag-chip,
#comboCompareOverlay .combo-tag-chip,
.combo-multi-body.combo-tag-picker .combo-tag-opt {
    filter: none !important;
}

body[data-theme="dark"] #comboView .combo-tag-chip,
body[data-theme="dark"] #frameMeterOverlay .combo-tag-chip,
body[data-theme="dark"] #comboCompareOverlay .combo-tag-chip,
body[data-theme="dark"] .combo-multi-body.combo-tag-picker .combo-tag-opt,
body[data-theme="light"] #comboView .combo-tag-chip,
body[data-theme="light"] #frameMeterOverlay .combo-tag-chip,
body[data-theme="light"] #comboCompareOverlay .combo-tag-chip,
body[data-theme="light"] .combo-multi-body.combo-tag-picker .combo-tag-opt {
    filter: none !important;
}

/* Light mode: tag selection modal surface (panel/body/buttons) */
body[data-theme="light"] .combo-multi-panel {
    background: #f6f6f6 !important;
    border-color: #c8c8c8 !important;
    color: #161616 !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16) !important;
}

body[data-theme="light"] .combo-multi-header {
    color: #1f1f1f !important;
}

body[data-theme="light"] .combo-multi-body {
    color: #1f1f1f !important;
}

body[data-theme="light"] .combo-multi-actions button {
    border-color: #bcbcbc !important;
    background: #ffffff !important;
    color: #202020 !important;
}

body[data-theme="light"] .combo-multi-actions button:hover {
    border-color: #f97306 !important;
    color: #111 !important;
}

/* ======================================================================== */
/* Final unified plain tag colors (same in all modes + all surfaces)        */
/* ======================================================================== */

#comboView .combo-tag-chip[class*="tagmod-"],
#frameMeterOverlay .combo-tag-chip[class*="tagmod-"],
.combo-multi-body.combo-tag-picker .combo-tag-opt[class*="tagmod-"] {
    background-image: none !important;
    filter: none !important;
}

/* Keep tag picker panel visibly themed in light mode */
body[data-theme="light"] .combo-multi-panel.combo-tag-picker,
body[data-theme="light"] .combo-multi-panel {
    background: #f5f5f5 !important;
    border-color: #c7c7c7 !important;
    color: #191919 !important;
}

body[data-theme="light"] .combo-multi-body.combo-tag-picker .combo-tag-opt {
    border-color: rgba(15, 23, 42, 0.30) !important;
    color: #0f172a !important;
}

/* Simple flat palette, shared across table/modal/picker */
#comboView .combo-tag-chip.tagmod-0,
#frameMeterOverlay .combo-tag-chip.tagmod-0,
#comboCompareOverlay .combo-tag-chip.tagmod-0,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-0 { background-color: #3d6fb1 !important; }
#comboView .combo-tag-chip.tagmod-1,
#frameMeterOverlay .combo-tag-chip.tagmod-1,
#comboCompareOverlay .combo-tag-chip.tagmod-1,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-1 { background-color: #2f8f66 !important; }
#comboView .combo-tag-chip.tagmod-2,
#frameMeterOverlay .combo-tag-chip.tagmod-2,
#comboCompareOverlay .combo-tag-chip.tagmod-2,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-2 { background-color: #ad4f4f !important; }
#comboView .combo-tag-chip.tagmod-3,
#frameMeterOverlay .combo-tag-chip.tagmod-3,
#comboCompareOverlay .combo-tag-chip.tagmod-3,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-3 { background-color: #b08b3f !important; }
#comboView .combo-tag-chip.tagmod-4,
#frameMeterOverlay .combo-tag-chip.tagmod-4,
#comboCompareOverlay .combo-tag-chip.tagmod-4,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-4 { background-color: #7161b1 !important; }
#comboView .combo-tag-chip.tagmod-5,
#frameMeterOverlay .combo-tag-chip.tagmod-5,
#comboCompareOverlay .combo-tag-chip.tagmod-5,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-5 { background-color: #2f7e84 !important; }
#comboView .combo-tag-chip.tagmod-6,
#frameMeterOverlay .combo-tag-chip.tagmod-6,
#comboCompareOverlay .combo-tag-chip.tagmod-6,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-6 { background-color: #b36a3f !important; }
#comboView .combo-tag-chip.tagmod-7,
#frameMeterOverlay .combo-tag-chip.tagmod-7,
#comboCompareOverlay .combo-tag-chip.tagmod-7,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-7 { background-color: #4d86c1 !important; }
#comboView .combo-tag-chip.tagmod-8,
#frameMeterOverlay .combo-tag-chip.tagmod-8,
#comboCompareOverlay .combo-tag-chip.tagmod-8,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-8 { background-color: #389d91 !important; }
#comboView .combo-tag-chip.tagmod-9,
#frameMeterOverlay .combo-tag-chip.tagmod-9,
#comboCompareOverlay .combo-tag-chip.tagmod-9,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-9 { background-color: #9a5faa !important; }
#comboView .combo-tag-chip.tagmod-10,
#frameMeterOverlay .combo-tag-chip.tagmod-10,
#comboCompareOverlay .combo-tag-chip.tagmod-10,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-10 { background-color: #b3507a !important; }
#comboView .combo-tag-chip.tagmod-11,
#frameMeterOverlay .combo-tag-chip.tagmod-11,
#comboCompareOverlay .combo-tag-chip.tagmod-11,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-11 { background-color: #8ca63c !important; }
#comboView .combo-tag-chip.tagmod-12,
#frameMeterOverlay .combo-tag-chip.tagmod-12,
#comboCompareOverlay .combo-tag-chip.tagmod-12,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-12 { background-color: #5870b5 !important; }
#comboView .combo-tag-chip.tagmod-13,
#frameMeterOverlay .combo-tag-chip.tagmod-13,
#comboCompareOverlay .combo-tag-chip.tagmod-13,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-13 { background-color: #4c9363 !important; }
#comboView .combo-tag-chip.tagmod-14,
#frameMeterOverlay .combo-tag-chip.tagmod-14,
#comboCompareOverlay .combo-tag-chip.tagmod-14,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-14 { background-color: #a17644 !important; }
#comboView .combo-tag-chip.tagmod-15,
#frameMeterOverlay .combo-tag-chip.tagmod-15,
#comboCompareOverlay .combo-tag-chip.tagmod-15,
.combo-multi-body.combo-tag-picker .combo-tag-opt.tagmod-15 { background-color: #4f96a6 !important; }

/* ======================================================================== */
/* Combo Details Modal/Tree Pane final light-mode + delete contrast fixes    */
/* ======================================================================== */

/* 1) Frame meter field background in light mode */
body[data-theme="light"] #frameMeterOverlay {
    --fat-frame-meter-invalid: #e6e6e6 !important;
}

body[data-theme="light"] #frameMeterOverlay .frame-meter-modal-visual-wrap {
    background: transparent !important;
    border: none !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-meter-wrap .frame-meter-visual,
body[data-theme="light"] #frameMeterOverlay .frame-meter-modal-visual-wrap .frame-meter-visual {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body[data-theme="light"] #frameMeterOverlay .frame-meter-block {
    border-color: #454545 !important;
}

body[data-theme="light"] #frameMeterOverlay .frame-meter-gap {
    background: var(--fat-frame-meter-invalid) !important;
    border-color: #bdbdbd !important;
}

/* 2) Bottom section background in light mode (modal + tree right pane) */
body[data-theme="light"] #frameMeterOverlay .combo-details-stats {
    background: #ffffff !important;
    border-color: #cfcfcf !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-stats-head {
    background: #eeeeee !important;
    color: #1f1f1f !important;
    border-bottom-color: #cfcfcf !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-stats-row {
    background: #ffffff !important;
    color: #1f1f1f !important;
    border-bottom-color: #d8d8d8 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-stats-row:nth-of-type(even) {
    background: #f7f7f7 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-stats-row > div,
body[data-theme="light"] #frameMeterOverlay .combo-details-stats-head > div {
    color: #1f1f1f !important;
    border-left-color: #d5d5d5 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-actions,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-actions {
    background: #f3f3f3 !important;
    border-top-color: #c9c9c9 !important;
}

/* 3) Delete button readability (modal + tree right pane) */
#frameMeterOverlay .combo-details-btn-danger {
    background: #3f1115 !important;
    border-color: #cf5a62 !important;
    color: #ffd9dc !important;
    text-shadow: none !important;
}

#frameMeterOverlay .combo-details-btn-danger:hover,
#frameMeterOverlay .combo-details-btn-danger:focus-visible {
    background: #5a171d !important;
    border-color: #ff7d87 !important;
    color: #ffffff !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-btn-danger {
    background: #ffe9eb !important;
    border-color: #de8a92 !important;
    color: #8b1d26 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-btn-danger:hover,
body[data-theme="light"] #frameMeterOverlay .combo-details-btn-danger:focus-visible {
    background: #ffd9dd !important;
    border-color: #c94f5a !important;
    color: #6b0f16 !important;
}

/* ======================================================================== */
/* Final: modal/right-pane Auto Input+Overwrite toggle parity with list      */
/* ======================================================================== */
#frameMeterOverlay .combo-details-auto-toggle.combo-poison-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 8px 4px 6px !important;
    border-radius: 18px !important;
    background: #161616 !important;
    border: 1px solid #2a2a2a !important;
}

#frameMeterOverlay .combo-details-auto-toggle-label.combo-poison-toggle-label {
    color: #d0d0d0 !important;
    font-size: 11px !important;
    letter-spacing: 0.03em !important;
    white-space: nowrap !important;
}

#frameMeterOverlay .combo-details-auto-toggle-group.combo-poison-toggle-group.lang-toggle {
    margin-right: 0 !important;
    height: 22px !important;
    padding: 2px !important;
    gap: 2px !important;
    background: #1f1f1f !important;
    border-color: #2c2c2c !important;
}

#frameMeterOverlay .combo-details-auto-toggle-btn.combo-poison-toggle-btn {
    min-width: 40px !important;
    height: 18px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
    letter-spacing: 0.06em !important;
    text-transform: none !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--text-dim) !important;
}

#frameMeterOverlay .combo-details-auto-toggle-btn.combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

#frameMeterOverlay .combo-details-auto-toggle-btn.combo-poison-toggle-btn.is-disabled {
    opacity: 0.55 !important;
    cursor: default !important;
    pointer-events: none !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle.combo-poison-toggle {
    background: #e6e6e6 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-label.combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-group.combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.combo-poison-toggle-btn {
    color: #2a2a2a !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggle-btn.combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* Keep right-pane tree dock exactly same visual as combo list toggles */
#treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle.combo-poison-toggle,
#treeView #frameMeterOverlay.tree-docked .combo-poison-toggle {
    background: #161616 !important;
    border: 1px solid #2a2a2a !important;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label.combo-poison-toggle-label,
#treeView #frameMeterOverlay.tree-docked .combo-poison-toggle-label {
    color: #d0d0d0 !important;
}

#treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group.combo-poison-toggle-group.lang-toggle,
#treeView #frameMeterOverlay.tree-docked .combo-poison-toggle-group.lang-toggle {
    background: #1f1f1f !important;
    border-color: #2c2c2c !important;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle.combo-poison-toggle,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-poison-toggle {
    background: #f2f2f2 !important;
    border: 1px solid #c9c9c9 !important;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-label.combo-poison-toggle-label,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-poison-toggle-label {
    color: #2a2a2a !important;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-group.combo-poison-toggle-group.lang-toggle,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-poison-toggle-group.lang-toggle {
    background: #ededed !important;
    border: 1px solid #cdcdcd !important;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.combo-poison-toggle-btn,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-poison-toggle-btn {
    color: #2a2a2a !important;
    background: transparent !important;
}

body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-details-auto-toggle-btn.combo-poison-toggle-btn.active,
body[data-theme="light"] #treeView #frameMeterOverlay.tree-docked .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

/* --- Final parity fixes (modal + tree right pane) ----------------------- */
#frameMeterOverlay #comboDetailsTags,
#treeView #frameMeterOverlay.tree-docked #comboDetailsTags {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

#frameMeterOverlay .combo-details-bar-meter {
    display: flex;
    align-items: center;
    gap: 8px;
}

#frameMeterOverlay .combo-details-meter-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

#frameMeterOverlay .combo-details-open-tree-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

#frameMeterOverlay .combo-details-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

#frameMeterOverlay .combo-details-actions-tree {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
}

#frameMeterOverlay .combo-details-actions-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    grid-column: 3;
}

/* In tree-docked right pane, hide redundant "Combo Tree" navigation button. */
#treeView #frameMeterOverlay.tree-docked #comboDetailsOpenTreeBtn,
#treeView #frameMeterOverlay.tree-docked .combo-details-open-tree-btn {
    display: none !important;
}

#frameMeterOverlay .combo-details-actions #comboDetailsOpenTreeBtn {
    margin-right: auto;
}

#frameMeterOverlay .combo-details-treelink-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

#frameMeterOverlay .combo-details-treelink-row:empty {
    display: none;
    margin: 0;
}

#frameMeterOverlay .combo-details-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

#frameMeterOverlay .combo-details-actions-tree {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
}

#frameMeterOverlay .combo-details-actions-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    grid-column: 3;
}

/* In tree-docked right pane, hide redundant "Combo Tree" navigation button. */
#treeView #frameMeterOverlay.tree-docked #comboDetailsOpenTreeBtn,
#treeView #frameMeterOverlay.tree-docked .combo-details-open-tree-btn {
    display: none !important;
}

#frameMeterOverlay .combo-details-actions #comboDetailsOpenTreeBtn {
    margin-right: auto;
}

#frameMeterOverlay .combo-details-treelink-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

#frameMeterOverlay .combo-details-treelink-row:empty {
    display: none;
    margin: 0;
}

#frameMeterOverlay .combo-details-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

#frameMeterOverlay .combo-details-actions-tree {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
}

#frameMeterOverlay .combo-details-actions-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    grid-column: 3;
}

/* In tree-docked right pane, hide redundant "Combo Tree" navigation button. */
#treeView #frameMeterOverlay.tree-docked #comboDetailsOpenTreeBtn,
#treeView #frameMeterOverlay.tree-docked .combo-details-open-tree-btn {
    display: none !important;
}

#frameMeterOverlay .combo-details-treelink-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

#frameMeterOverlay .combo-details-treelink-row:empty {
    display: none;
    margin: 0;
}

#frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 6px;
    border-radius: 18px;
    background: #161616 !important;
    border: 1px solid #2a2a2a !important;
}

#frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-label {
    color: #d0d0d0 !important;
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

#frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-group.lang-toggle {
    margin-right: 0;
    height: 22px;
    padding: 2px;
    gap: 2px;
    background: #1f1f1f !important;
    border-color: #2c2c2c !important;
}

#frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-btn {
    min-width: 40px;
    height: 18px;
    padding: 0 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: none;
    background: transparent !important;
    color: var(--text-dim) !important;
}

#frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25) !important;
}

#frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-btn.is-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle {
    background: #e6e6e6 !important;
    border-color: #bcbcbc !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-label {
    color: #333 !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-group.lang-toggle {
    background: #e7e7e7 !important;
    border-color: #cbcbcb !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-btn {
    color: #111 !important;
    background: transparent !important;
}

body[data-theme="light"] #frameMeterOverlay .combo-details-auto-toggles .combo-poison-toggle-btn.active {
    color: #fff !important;
    background: var(--accent) !important;
}

/* Combo compare dock (floating; not part of row-visibility toggles) */
.combo-compare-dock {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--site-footer-height, 24px) + 10px);
    z-index: 11000;
    max-width: min(420px, calc(100vw - 24px));
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--bg-table);
    border: 1px solid var(--border-mid);
    color: var(--text-main);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.combo-compare-dock[hidden] {
    display: none !important;
}

/* Combo compare is for combo list / tree; hide on frame data tab */
body[data-view="frame"] #comboCompareDock {
    display: none !important;
}

/*
 * Combo list: tray uses .combo-compare-dock (viewport bottom-right).
 * Tree view: same bottom-right *within the chart column* — inset from the viewport edge by the
 * detail pane width so the tray does not sit on top of #treeView .tree-detail-pane (380px).
 * This is not “far left”; it is still the trailing edge of the tree canvas area.
 */
body[data-view="tree"] .combo-compare-dock {
    right: calc(380px + max(12px, env(safe-area-inset-right, 0px)));
}

body[data-theme="light"] .combo-compare-dock {
    background: #ffffff;
    border-color: #d5d5d5;
    color: #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.combo-compare-dock .combo-action-btn {
    background: #151515;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 10px;
    height: 22px;
}

.combo-compare-dock .combo-action-btn:hover {
    border-color: var(--accent);
}

body[data-theme="light"] .combo-compare-dock .combo-action-btn {
    background: #e4e4e4;
    color: #111;
    border-color: #bcbcbc;
}

body[data-theme="light"] .combo-compare-dock .combo-action-btn:hover {
    border-color: var(--accent);
}

.combo-compare-dock .combo-compare-tray {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
}

.combo-compare-tray-label {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

body[data-theme="light"] .combo-compare-tray-label {
    color: #4b5563;
}

.combo-compare-open-btn:disabled,
.combo-compare-clear-btn:disabled {
    opacity: 0.45;
}

/* Compare modal: same shell as .modal-overlay + .modal-panel (onboarding, etc.) */
#comboCompareOverlay.combo-compare-modal-overlay {
    z-index: 12000;
    /* Default matches #comboView; JS copies computed --command-font-size when rendering */
    --command-font-size: 13px;
}

.combo-compare-panel.modal-panel {
    width: min(96vw, 1200px);
    max-width: min(96vw, 1200px);
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
}

.combo-compare-panel.modal-panel .modal-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    padding-right: 28px;
    padding-left: 28px;
    box-sizing: border-box;
}

.combo-compare-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overflow-x: auto;
    padding: 4px 2px 8px 0;
    margin-right: -4px;
    scrollbar-width: thin;
    scrollbar-color: #6a6a6a rgba(255, 255, 255, 0.06);
}

#comboCompareOverlay .combo-compare-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#comboCompareOverlay .combo-compare-scroll::-webkit-scrollbar-thumb {
    background: #6a6a6a;
    border-radius: 10px;
}

#comboCompareOverlay .combo-compare-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-scroll {
    scrollbar-color: #b0b0b0 #dedede;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-scroll::-webkit-scrollbar-thumb {
    background: #b0b0b0;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-scroll::-webkit-scrollbar-track {
    background: #dedede;
}

/* Compare modal: borders/zebra align with #comboView #Table1 (#343434 dark; #d6d6d6 light) */
#comboCompareOverlay #comboCompareTableHost:has(.combo-compare-layout-table) {
    border: 1px solid #343434;
    border-radius: 6px;
    overflow: visible;
}

#comboCompareOverlay .combo-compare-layout-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 0;
    border: none;
    font-family: 'Noto Sans JP', sans-serif;
    /* Match command / route text: #comboView --command-font-size (see .cmd-input[data-field="command"]) */
    font-size: var(--command-font-size, 13px);
    line-height: 1.1;
}

/* Zebra: match #comboView #Table1 (.combo-group-even / .combo-group-odd) */
#comboCompareOverlay tr.combo-compare-field-row--even td,
#comboCompareOverlay tr.combo-compare-field-row--even th {
    background: #151515;
}

#comboCompareOverlay tr.combo-compare-field-row--odd td,
#comboCompareOverlay tr.combo-compare-field-row--odd th {
    background: #0b0b0b;
}

#comboCompareOverlay tr.combo-compare-field-row--even .combo-compare-field-label {
    background: #151515;
}

#comboCompareOverlay tr.combo-compare-field-row--odd .combo-compare-field-label {
    background: #0b0b0b;
}

body[data-theme="light"] #comboCompareOverlay tr.combo-compare-field-row--even td,
body[data-theme="light"] #comboCompareOverlay tr.combo-compare-field-row--even th {
    background: #f1f1f1;
}

body[data-theme="light"] #comboCompareOverlay tr.combo-compare-field-row--odd td,
body[data-theme="light"] #comboCompareOverlay tr.combo-compare-field-row--odd th {
    background: #dddddd;
}

body[data-theme="light"] #comboCompareOverlay tr.combo-compare-field-row--even .combo-compare-field-label {
    background: #f1f1f1;
}

body[data-theme="light"] #comboCompareOverlay tr.combo-compare-field-row--odd .combo-compare-field-label {
    background: #dddddd;
}

#comboCompareOverlay col.combo-compare-col-rowhead {
    width: 220px;
    max-width: 220px;
}

#comboCompareOverlay col.combo-compare-col-combo {
    width: auto;
}

#comboCompareOverlay .combo-compare-layout-table td,
#comboCompareOverlay .combo-compare-layout-table th {
    border-bottom: 1px solid #343434;
    border-right: 1px solid #343434;
    padding: 0;
    vertical-align: top;
    font-size: var(--command-font-size, 13px);
    line-height: 1.1;
}

#comboCompareOverlay .combo-compare-layout-table td:last-child,
#comboCompareOverlay .combo-compare-layout-table th:last-child {
    border-right: 1px solid #343434;
}

/* Row header / “category” column: center next to tall value cells */
#comboCompareOverlay .combo-compare-layout-table th.combo-compare-field-label {
    vertical-align: middle;
}

#comboCompareOverlay .combo-compare-layout-table .combo-details-layout-section th {
    padding: 5px 8px 5px 10px;
    text-align: left;
    font-size: inherit;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    color: #f3f4f6;
    background: #2a2a2a;
    border-top: 1px solid #343434;
    border-left: 3px solid var(--accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#comboCompareOverlay .combo-details-layout-cell-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 4px 6px;
    text-align: center;
}

#comboCompareOverlay .combo-compare-field-label .combo-details-layout-cell-inner {
    text-align: left;
    max-width: 100%;
}

#comboCompareOverlay .combo-compare-field-label .combo-details-layout-label {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: var(--text-dim);
}

#comboCompareOverlay .combo-details-layout-label {
    font-size: inherit;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

#comboCompareOverlay .combo-compare-rank-line {
    color: var(--accent);
    font-weight: 600;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: 0.02em;
}

/* Light: .combo-details-layout-label alone would paint ranks gray; keep accent for #/total */
body[data-theme="light"] #comboCompareOverlay .combo-details-layout-label.combo-compare-rank-line:not(.combo-compare-rank-line--empty) {
    color: var(--accent);
}

#comboCompareOverlay .combo-compare-rank-line--empty {
    visibility: hidden;
    min-height: 1em;
}

#comboCompareOverlay .combo-compare-readonly-val {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--text-main);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

#comboCompareOverlay .combo-compare-readonly-val--numeric {
    font-variant-numeric: tabular-nums;
}

#comboCompareOverlay .combo-compare-readonly-val--rich {
    font-family: inherit;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Button tokens: overlay is outside #comboView — replicate icon row + screen-reader text hide */
#comboCompareOverlay .combo-compare-readonly-val--rich .btn-token {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    margin-bottom: 2px;
    vertical-align: middle;
}

#comboCompareOverlay .combo-compare-readonly-val--rich .btn-token:last-child {
    margin-right: 0;
}

#comboCompareOverlay .combo-compare-readonly-val--rich .btn-token img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

#comboCompareOverlay .combo-compare-readonly-val--rich .btn-token[data-token="Hold2"] img,
#comboCompareOverlay .combo-compare-readonly-val--rich .btn-token[data-token="Hold3"] img {
    width: auto;
    height: 18px;
}

#comboCompareOverlay .combo-compare-readonly-val--rich .btn-token-text {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#comboCompareOverlay .combo-compare-readonly-val--rich .combo-tag-chip-del {
    display: none !important;
}

/* Tag chips: layout only (selector kept ≤1 class after #id so .tagmod-* gradients win) */
#comboCompareOverlay .combo-tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.4;
    border: none;
    user-select: none;
    white-space: nowrap;
    position: relative;
    pointer-events: none;
}

#comboCompareOverlay .combo-compare-field-label {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 220px;
    max-width: 220px;
    min-width: 220px;
    box-sizing: border-box;
    background: #121212;
    border-right: 1px solid #343434 !important;
}

#comboCompareOverlay .combo-compare-value-inner--has-remove {
    position: relative;
    padding-top: 22px;
}

#comboCompareOverlay .combo-compare-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    border: 1px solid #3a3a3a;
    background: #1b1b1b;
    color: #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 2px 7px;
    z-index: 1;
}

#comboCompareOverlay .combo-compare-remove:hover {
    border-color: var(--accent);
    color: #fff;
}

body[data-theme="light"] #comboCompareOverlay #comboCompareTableHost:has(.combo-compare-layout-table) {
    border-color: #dcdcdc;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-layout-table td,
body[data-theme="light"] #comboCompareOverlay .combo-compare-layout-table th {
    border-bottom-color: #d6d6d6;
    border-right-color: #d6d6d6;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-layout-table .combo-details-layout-section th {
    color: #111827;
    background: #ececec;
    border-top-color: #d6d6d6;
    border-left: 3px solid var(--accent);
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-field-label {
    border-right-color: #d6d6d6 !important;
}

body[data-theme="light"] #comboCompareOverlay .combo-details-layout-label {
    color: #6b7280;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-field-label .combo-details-layout-label {
    color: #111827;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-readonly-val {
    color: #111;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-remove {
    border-color: #c4c4c4;
    background: #e5e7eb;
    color: #374151;
}

body[data-theme="light"] #comboCompareOverlay .combo-compare-remove:hover {
    border-color: var(--accent);
    color: #111;
}
