/* AI Sheet's desktop adapter loads after the shared theme. Keep its own
 * surfaces and focus states dark without changing slides, mobile or light UI. */
@media screen and (min-width: 921px) {
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app {
        --office-ink: #edf3f7;
        --office-muted: #b5c5cf;
        --sheet-ink: #edf3f7;
        --sheet-blue: #97baff;
        --fv-sheet-ink: #edf3f7;
        --sheet-dark-surface: #192124;
        --sheet-dark-raised: #202d33;
        --sheet-dark-input: #141e25;
        --sheet-dark-line: #40545f;
        --sheet-dark-text: #edf3f7;
        --sheet-dark-muted: #b5c5cf;
        --sheet-dark-accent: #93e4d3;
        color-scheme: dark;
        color: var(--sheet-dark-text);
    }

    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.office-tool-hero, .spreadsheet-sidebar, .office-tool-form-card, .office-result-card) {
        background: var(--sheet-dark-surface) !important;
        border-color: var(--sheet-dark-line) !important;
        color: var(--sheet-dark-text);
        box-shadow: none;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.office-tool-hero h1, .office-card-heading h2, .office-result-head h2,
        .spreadsheet-sidebar-brand, .spreadsheet-sidebar-tip strong, .office-field > span,
        .office-upload-box strong, .office-upload-item strong, .fv-sheet-attachment-copy strong, .office-result-empty h3) {
        color: var(--sheet-dark-text) !important;
        -webkit-text-fill-color: var(--sheet-dark-text);
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.office-tool-hero p, .office-card-heading p, .office-result-head p, .office-result-empty p,
        .spreadsheet-sidebar-section, .spreadsheet-sidebar-tip, .spreadsheet-quick-prompts > span,
        .office-upload-box small, .office-upload-item small, .fv-sheet-attachment-copy > span, .fv-sheet-local-file small,
        .fv-sheet-upload-message, .slides-file-help, .office-tool-features > div) {
        color: var(--sheet-dark-muted) !important;
        -webkit-text-fill-color: var(--sheet-dark-muted);
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.spreadsheet-sidebar-tip, .office-upload-box, .spreadsheet-toolbar, .spreadsheet-grid-meta,
        .office-upload-item, .fv-sheet-local-file, .office-result-empty-icon) {
        background: var(--sheet-dark-raised) !important;
        border-color: var(--sheet-dark-line) !important;
        color: var(--sheet-dark-muted);
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.spreadsheet-new-sheet, #office-tool-upload-trigger, .fv-sheet-attachment-tile,
        .spreadsheet-toolbar-actions button, .spreadsheet-toolbar-tabs button,
        .spreadsheet-sidebar-nav button, .spreadsheet-sheet-list button, .spreadsheet-quick-prompts button,
        .office-upload-item button) {
        background: var(--sheet-dark-input) !important;
        border-color: var(--sheet-dark-line) !important;
        color: var(--sheet-dark-text) !important;
        -webkit-text-fill-color: var(--sheet-dark-text);
        box-shadow: none;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.spreadsheet-toolbar-tabs, .spreadsheet-sidebar-nav, .spreadsheet-sheet-list, .spreadsheet-quick-prompts)
    > button:is(.is-active, [aria-pressed="true"], :hover) {
        background: #25413f !important;
        color: var(--sheet-dark-accent) !important;
        -webkit-text-fill-color: var(--sheet-dark-accent);
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.spreadsheet-brand-mark, .office-result-empty-icon, .fv-sheet-attachment-tile, .office-upload-kind,
        .spreadsheet-sidebar-nav button span, .spreadsheet-sidebar-section button, .spreadsheet-sheet-list button b,
        .office-card-heading > span, .office-result-head > div > span) {
        background-color: var(--sheet-dark-raised);
        color: var(--sheet-dark-accent) !important;
        -webkit-text-fill-color: var(--sheet-dark-accent);
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(input, textarea, select) {
        color: var(--sheet-dark-text) !important;
        -webkit-text-fill-color: var(--sheet-dark-text);
        background: var(--sheet-dark-input) !important;
        border-color: var(--sheet-dark-line) !important;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(input, textarea)::placeholder {
        color: var(--sheet-dark-muted) !important;
        -webkit-text-fill-color: var(--sheet-dark-muted);
        opacity: 1;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(#office-subject, #office-tool-material, #office-purpose, #office-style, #office-detail):focus {
        border-color: transparent !important;
        background: linear-gradient(var(--sheet-dark-input), var(--sheet-dark-input)) padding-box,
            conic-gradient(from var(--fv-sheet-angle), #1678fa, #12a973, #f5c300, #f34764, #a14cb2, #1678fa) border-box !important;
        box-shadow: 0 0 0 2px #93e4d329;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.spreadsheet-grid-shell, .spreadsheet-grid-scroll, .spreadsheet-grid td) {
        background: var(--sheet-dark-input) !important;
        color: var(--sheet-dark-text) !important;
        border-color: var(--sheet-dark-line) !important;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.spreadsheet-grid-meta, .spreadsheet-grid-meta small, .spreadsheet-grid th) {
        background: var(--sheet-dark-raised) !important;
        color: var(--sheet-dark-muted) !important;
        border-color: var(--sheet-dark-line) !important;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    .spreadsheet-grid td:focus {
        outline-color: var(--sheet-dark-accent);
        background: #203a3b !important;
        box-shadow: inset 0 0 0 2px var(--sheet-dark-accent);
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    :is(.fv-sheet-splitter-grip, .fv-sheet-splitter-tip) {
        background: var(--sheet-dark-raised);
        border-color: var(--sheet-dark-line);
        color: var(--sheet-dark-muted);
        box-shadow: none;
    }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    .fv-sheet-splitter::before { background: var(--sheet-dark-line); }
    :is(html, body):is([data-ui-theme="dark"], [data-theme="dark"]) #office-app.office-spreadsheet-app
    .fv-sheet-upload-message[data-error="true"] { color: #ffb5bf !important; -webkit-text-fill-color: #ffb5bf; }
}
