.rs-dialog-surface {
    color: var(--rs-text);
    background: var(--rs-surface-panel);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius-lg);
    box-shadow: var(--rs-shadow-dialog);
}

.rs-overlay-backdrop, .rs-dialog::backdrop {
    background: var(--rs-backdrop);
}

.rs-dialog-header {
    min-height: var(--rs-page-header-height);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--rs-surface-header);
    border-bottom: 1px solid var(--rs-border);
}

.rs-dialog-header :is(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    color: var(--rs-text);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 600;
}

.rs-dialog[data-rs-tone] .rs-dialog-icon {
    color: var(--rs-tone);
}

.rs-dialog[data-rs-tone] .rs-dialog-action {
    color: var(--rs-on-accent);
    border-color: var(--rs-tone);
    background: var(--rs-tone);
}

.rs-dialog[data-rs-tone] .rs-dialog-action:hover,
.rs-dialog[data-rs-tone] .rs-dialog-action:focus-visible {
    color: var(--rs-on-accent);
    filter: brightness(.92);
}

.rs-palette {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow: hidden;
    color: var(--rs-text);
    background: var(--rs-surface-panel);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius-lg);
    box-shadow: var(--rs-shadow-dialog);
    font-family: inherit;
    font-size: 13px;
}

.rs-palette-search {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--rs-border-subtle);
}

.rs-palette-search > span {
    color: var(--rs-text-muted);
    font-size: 18px;
}

.rs-palette-search input {
    flex: 1;
    min-width: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    outline: 0;
    caret-color: var(--rs-accent);
    font: inherit;
}

.rs-palette-search input::placeholder {
    color: var(--rs-text-placeholder);
    opacity: 1;
}

.rs-palette-search kbd {
    padding: 2px 5px;
    color: var(--rs-text-muted);
    background: var(--rs-surface-subtle);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius-sm);
    font: 11px/1.2 var(--rs-font-ui);
}

.rs-palette-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 6px;
}

.rs-palette-row {
    display: flex;
    width: 100%;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: var(--rs-radius-md);
}

.rs-palette .rs-palette-row:hover {
    background: var(--rs-accent-hover-surface);
}

.rs-palette .rs-palette-row[aria-selected="true"], .rs-palette .rs-palette-row.active, .rs-palette .rs-palette-row.is-active, .rs-palette .rs-palette-row.is-focused, .rs-palette .rs-palette-row.is-selected {
    background: var(--rs-accent-chip);
    outline: 1px solid var(--rs-accent);
    outline-offset: -1px;
}

.rs-palette-empty {
    margin: 0;
    padding: 22px 12px;
    color: var(--rs-text-muted);
    text-align: center;
}

.rs-palette-footer {
    display: flex;
    flex: 0 0 auto;
    padding: 10px 12px;
    background: var(--rs-surface-subtle);
    border-top: 1px solid var(--rs-border);
}

.rs-keyboard-hints {
    box-sizing: border-box;
    min-height: 32px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px 12px;
    flex-wrap: wrap;
    color: var(--rs-text-muted);
    background: var(--rs-surface-subtle);
    border-top: 1px solid var(--rs-border);
    font: var(--rs-type-hint);
    text-align: left;
}

.rs-keyboard-hints > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rs-keyboard-hints kbd {
    box-sizing: border-box;
    min-width: 16px;
    padding: 0 4px;
    color: var(--rs-text);
    background: var(--rs-surface-panel);
    border: 1px solid var(--rs-neutral-action-disabled-border);
    border-radius: 3px;
    font: 10px/17px var(--rs-font-mono);
    text-align: center;
}

.rs-option-editor {
    box-sizing: border-box;
    position: fixed;
    z-index: 1070;
    top: calc(50% - 20px);
    left: 50%;
    width: 1120px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translate(-50%, -50%);
    outline: none;
    color: var(--rs-text-control);
    background: var(--rs-surface-panel);
    border-color: var(--rs-control-frame);
    font: 13px/1.45 var(--rs-font-ui);
}

.rs-option-editor__header {
    box-sizing: border-box;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 8px 16px;
    gap: 8px;
    border-color: var(--rs-divider);
}

.rs-option-editor__title {
    color: var(--rs-text-strong);
    font: var(--rs-type-row-title);
}

.rs-option-editor__meta {
    margin-left: auto;
    color: var(--rs-text-meta);
    font: var(--rs-type-meta);
}

.rs-option-editor__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable;
    margin: 0;
    list-style: none;
}

.rs-option-editor__row {
    display: grid;
    align-items: center;
    color: var(--rs-text-control);
    background: var(--rs-surface-panel);
    border: 1px solid transparent;
    border-radius: var(--rs-radius-sm);
    font: 13px/1.4 var(--rs-font-ui);
}

.rs-option-editor__row:focus {
    outline: none;
}

.rs-option-editor .rs-option-editor__row.is-active, .rs-option-editor .rs-option-editor__row:focus-within {
    border-color: var(--rs-control-frame);
    background: var(--rs-accent-fill);
}

.rs-option-editor__check {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--rs-accent);
}

.rs-option-editor__name {
    min-width: 0;
    color: var(--rs-text-control);
    font: var(--rs-type-row-title);
}

.rs-search-hit {
    padding: 1px 3px;
    color: var(--rs-search-hit-ink);
    background: var(--rs-search-hit);
    border-radius: 2px;
    font-family: var(--rs-font-ui);
}

.rs-option-editor__requirements {
    min-width: 0;
    color: var(--rs-text-meta);
    font: 12px/16px var(--rs-font-ui);
}

.rs-option-editor__requirements strong {
    display: block;
    color: var(--rs-text-strong);
    font-weight: 600;
}

.rs-option-editor__field {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding: 6px 9px;
    overflow: hidden;
    color: var(--rs-text-control);
    background: var(--rs-surface-panel);
    border: 1px solid var(--rs-control-frame);
    border-radius: 5px;
    box-shadow: none;
    font: var(--rs-type-control);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rs-option-editor__field::placeholder {
    color: var(--rs-text-placeholder);
    opacity: 1;
}

.rs-option-editor__field:focus-visible {
    border-color: var(--rs-accent);
    outline: var(--rs-focus-outline);
    outline-offset: 1px;
}

.rs-option-editor__empty-value {
    height: auto;
    min-height: 0;
    padding: 0;
    color: var(--rs-text-meta);
    background: transparent;
    border-color: transparent;
    font: var(--rs-type-hint);
}

.rs-option-editor__footer {
    flex: 0 0 auto;
}
