/* Keep desktop tools in place; mobile exposes the same actions in a disclosure. */
.ai-toolbar-actions { display: contents; }
.mobile-assistant-more,
.mobile-assistant-label,
.mobile-assistant-inspire { display: none; }

@media (max-width: 768px) {
    .ai-header { padding: 6px 12px; gap: 12px; }
    .ai-title-row { min-width: 0; }
    .ai-title-row .llm-status-text { display: none; }
    .ai-toolbar { background: transparent; padding: 0; flex-shrink: 0; }
    .mobile-assistant-more {
        display: flex; align-items: center; justify-content: center; gap: 5px;
        min-width: 76px; min-height: 44px; padding: 6px 10px;
        border: 1px solid var(--color-border); border-radius: 10px;
        background: var(--color-card); color: var(--color-ink);
        font: inherit; font-size: 16px; cursor: pointer;
    }
    .ai-toolbar-actions { display: none; }
    .ai-toolbar.mobile-tools-open .ai-toolbar-actions {
        position: absolute; top: 58px; right: 12px; z-index: 30;
        display: flex; flex-direction: column; align-items: stretch; gap: 4px;
        width: min(240px, calc(100% - 24px)); max-height: min(400px, calc(100% - 70px));
        overflow-y: auto; padding: 8px;
        border: 1px solid var(--color-border); border-radius: 12px;
        background: var(--color-card); box-shadow: 0 8px 28px var(--theme-shadow, #0002);
    }
    .ai-toolbar-actions :is(.easy-size-button, .ai-tool-btn, .mobile-assistant-inspire) {
        display: flex; align-items: center; justify-content: flex-start; gap: 10px;
        width: 100%; height: auto; min-height: 48px; padding: 10px 12px;
        border: 0; border-radius: 8px; background: transparent;
        color: var(--color-ink); font: inherit; font-size: 18px;
        text-align: left; cursor: pointer; transform: none;
    }
    .ai-toolbar-actions button:hover { background: var(--color-primary-bg); }
    .ai-toolbar-actions svg { width: 20px; height: 20px; flex-shrink: 0; }
    .mobile-assistant-label { display: inline; }
    .ai-toolbar-actions #ai-btn-close { display: none; }
    .mobile-assistant-more:focus-visible,
    .ai-toolbar-actions button:focus-visible {
        outline: 3px solid var(--color-primary); outline-offset: 2px;
    }
    .ai-pane > .easy-main-actions,
    .ai-scope-bar.empty,
    .input-capsule > .inspire-btn { display: none; }
    .ai-scope-bar { padding: 2px 12px; min-height: 44px; flex-shrink: 0; }
    #ai-scope-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ai-scope-bar .scope-mode-toggle { min-height: 44px; }
    .input-capsule { gap: 2px; padding: 4px; }
    .input-capsule > .capsule-btn { width: 44px; height: 44px; }
    .input-capsule > .easy-voice-button { min-width: 48px; padding: 6px; }
    .capsule-textarea { min-width: 0; width: 0; padding: 8px 4px; }
    .capsule-voice-zone { min-width: 0; }
    .ai-pane .welcome-start { gap: 12px; padding: 12px 0; }
    .welcome-start-card { min-height: 64px; padding: 12px; }
    .welcome-start-title { margin-top: 4px; }
    .mobile-tab span { font-size: 12px; }
}
