/* Site-wide Graphite button system: monochrome variants, consistent states. */
:root {
  --button-solid-bg: #1c1c1e;
  --button-solid-hover: #000;
  --button-solid-active: #2c2c2e;
  --button-solid-text: #fff;
  --button-outline-bg: #fff;
  --button-outline-hover: #f1f1f2;
  --button-outline-active: #e7e7e9;
  --button-soft-bg: #f0f0f1;
  --button-soft-hover: #e7e7e9;
  --button-ghost-hover: rgba(28, 28, 30, .055);
  --button-text: #343438;
  --button-muted: #636368;
  --button-border: rgba(28, 28, 30, .16);
  --button-disabled-opacity: .44;
  --button-focus: rgba(99, 99, 102, .34);
  --button-danger-text: #b4232d;
  --button-danger-border: rgba(180, 35, 45, .3);
  --button-danger-hover: rgba(180, 35, 45, .08);
  --button-radius: 8px;
  --button-transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease, opacity .18s ease;
}

html[data-ui-theme="dark"] {
  --button-solid-bg: #e4e5e7;
  --button-solid-hover: #fff;
  --button-solid-active: #c9cbce;
  --button-solid-text: #18191b;
  --button-outline-bg: transparent;
  --button-outline-hover: rgba(255, 255, 255, .075);
  --button-outline-active: rgba(255, 255, 255, .12);
  --button-soft-bg: #252629;
  --button-soft-hover: #303135;
  --button-ghost-hover: rgba(255, 255, 255, .07);
  --button-text: #d4d5d8;
  --button-muted: #b0b2b6;
  --button-border: rgba(255, 255, 255, .16);
  --button-disabled-opacity: .42;
  --button-focus: rgba(210, 212, 216, .42);
  --button-danger-text: #f19a9f;
  --button-danger-border: rgba(241, 154, 159, .32);
  --button-danger-hover: rgba(241, 154, 159, .08);
}

html[data-ui-theme="dark"] body,
html[data-ui-theme="light"] body {
  --button-radius: 8px;
}

/* Primary actions */
html[data-ui-theme] body .app-shell :is(
  .action-button,
  .icon-button.primary,
  .prompt-detail-purchase-button,
  .prompt-detail-generate,
  .voice-library-create-button,
  .voice-design-prompt-actions #breeze-blue-design-button,
  .studio-create-submit,
  .image-prompt-brief-actions .action-button
),
html[data-ui-theme] body .app-shell .creation-form > .action-button[type="submit"],
html[data-ui-theme] body .app-shell .generation-action-bar > .action-button[type="submit"],
html[data-ui-theme] body .app-shell #music-panel .generation-action-bar > .action-button,
html[data-ui-theme] body .app-shell #music-panel #breeze-tts-page .generation-action-bar > .action-button,
html[data-ui-theme] body .app-shell #music-panel .breeze-tool-form .action-button,
html[data-ui-theme] body .app-shell #refresh-button,
html[data-ui-theme] body .app-shell #generate-card-button,
html[data-ui-theme] body .app-shell #add-model-button,
html[data-ui-theme] body .app-shell .dialog-actions button[type="submit"],
html[data-ui-theme] body .app-shell .credit-adjust-form button,
html[data-ui-theme] body .app-shell .verify-box button:not(.plain-button) {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-solid-bg) !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}
html[data-ui-theme] body .app-shell #music-panel #breeze-voices-page .voice-library-create-button,
html[data-ui-theme] body .app-shell #music-panel #breeze-design-page .voice-design-prompt-actions #breeze-blue-design-button,
html[data-ui-theme] body .app-shell #music-panel .studio-create-footer .studio-create-submit,
html[data-ui-theme] body .app-shell #music-panel #breeze-tts-page .generation-action-bar > .action-button {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-solid-bg) !important;
  box-shadow: none !important;
}

html[data-ui-theme] body .app-shell :is(
  .action-button,
  .icon-button.primary,
  .prompt-detail-purchase-button,
  .prompt-detail-generate,
  .voice-library-create-button,
  .voice-design-prompt-actions #breeze-blue-design-button,
  .studio-create-submit,
  .image-prompt-brief-actions .action-button
):hover:not(:disabled),
html[data-ui-theme] body .app-shell :is(.creation-form > .action-button[type="submit"], .generation-action-bar > .action-button[type="submit"]):hover:not(:disabled),
html[data-ui-theme] body .app-shell #music-panel .generation-action-bar > .action-button:hover:not(:disabled),
html[data-ui-theme] body .app-shell #music-panel #breeze-tts-page .generation-action-bar > .action-button:hover:not(:disabled),
html[data-ui-theme] body .app-shell #music-panel .breeze-tool-form .action-button:hover:not(:disabled),
html[data-ui-theme] body .app-shell :is(#refresh-button, #generate-card-button, #add-model-button):hover:not(:disabled),
html[data-ui-theme] body .app-shell .dialog-actions button[type="submit"]:hover:not(:disabled),
html[data-ui-theme] body .app-shell .credit-adjust-form button:hover:not(:disabled),
html[data-ui-theme] body .app-shell .verify-box button:not(.plain-button):hover:not(:disabled) {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-hover) !important;
  background: var(--button-solid-hover) !important;
  filter: none !important;
}

html[data-ui-theme] body .app-shell :is(.action-button, .icon-button.primary, .prompt-detail-purchase-button, .prompt-detail-generate):active:not(:disabled),
html[data-ui-theme] body .app-shell :is(.creation-form > .action-button[type="submit"], .generation-action-bar > .action-button[type="submit"]):active:not(:disabled) {
  background: var(--button-solid-active) !important;
  border-color: var(--button-solid-active) !important;
  transform: translateY(.5px);
}

/* Secondary and outline actions */
html[data-ui-theme] body .app-shell :is(
  .secondary-button,
  .reference-assets-button,
  .creation-model-trigger,
  .image-parameter-trigger,
  .video-mode-trigger,
  .video-reference-upload,
  .prompt-library-favorites-filter,
  .prompt-detail-icon-button,
  .voice-library-filter-button,
  .voice-library-button,
  .ds-button,
  .ds-upload-button,
  .image-prompt-optimize-button,
  .topbar-utility-button,
  .wechat-contact-button,
  .referral-entry-button,
  .topbar-credit-button
),
html[data-ui-theme] body .app-shell .breeze-blue-controls #breeze-blue-preview {
  color: var(--button-text) !important;
  border: 1px solid var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-soft-bg) !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}

html[data-ui-theme] body .app-shell :is(
  .secondary-button,
  .reference-assets-button,
  .creation-model-trigger,
  .image-parameter-trigger,
  .video-mode-trigger,
  .video-reference-upload,
  .prompt-library-favorites-filter,
  .prompt-detail-icon-button,
  .voice-library-filter-button,
  .voice-library-button,
  .ds-button,
  .ds-upload-button,
  .image-prompt-optimize-button,
  .topbar-utility-button,
  .wechat-contact-button,
  .referral-entry-button,
  .topbar-credit-button
):hover:not(:disabled),
html[data-ui-theme] body .app-shell .breeze-blue-controls #breeze-blue-preview:hover:not(:disabled),
html[data-ui-theme] body .app-shell .reference-assets-button[aria-expanded="true"],
html[data-ui-theme] body .app-shell .topbar-utility-button[aria-expanded="true"] {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  filter: none !important;
}

/* Quiet icon actions and text links */
html[data-ui-theme] body .app-shell :is(
  .icon-button:not(.primary),
  .task-log-action,
  .result-history-actions button,
  .task-log-menu-item,
  .link-button,
  .breeze-text-button,
  .clone-text-button,
  .voice-player-actions button,
  .studio-project-actions button:not(.studio-delete),
  .studio-audio-controls button:not(.studio-delete),
  .ds-icon-button
) {
  color: var(--button-muted) !important;
  border-color: transparent !important;
  border-radius: var(--button-radius) !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}

html[data-ui-theme] body .app-shell :is(
  .icon-button:not(.primary),
  .task-log-action,
  .result-history-actions button,
  .task-log-menu-item,
  .link-button,
  .breeze-text-button,
  .clone-text-button,
  .voice-player-actions button,
  .studio-project-actions button:not(.studio-delete),
  .studio-audio-controls button:not(.studio-delete),
  .ds-icon-button
):hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-ghost-hover) !important;
}

html[data-ui-theme] body .app-shell :is(.task-log-status-button, .result-tool-button) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-soft-bg) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body .app-shell :is(.task-log-status-button, .result-tool-button):hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}

/* Selected navigation/tabs use neutral fills instead of a colored button state. */
html[data-ui-theme] body .app-shell :is(
  .nav-item.active,
  .generation-tabs button.active,
  .creation-model-options button.active,
  .creation-model-menu .creation-model-option.active,
  .task-log-category.active,
  .breeze-nav-item.active,
  .breeze-view-toggle button.active,
  .studio-view-toggle button.active,
  .profile-tabs button.active,
  .model-dialog-tabs button.active,
  .prompt-library-category.is-active,
  .prompt-library-subcategory.is-active,
  .prompt-library-favorites-filter.is-active,
  .video-mode-menu button.active,
  .video-mode-menu button[aria-checked="true"],
  .image-parameter-option.active,
  .image-parameter-option[aria-checked="true"],
  .image-segmented-control button.active,
  .image-segmented-control button[aria-checked="true"]
) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body .app-shell .generation-tabs button.active::after,
html[data-ui-theme] body .app-shell .breeze-settings-tabs button.active::after,
html[data-ui-theme] body .app-shell .voice-library-tabs button.active::after,
html[data-ui-theme] body .app-shell .generation-tabs > button[aria-pressed="true"]::after {
  background: var(--button-text) !important;
}
html[data-ui-theme] body .app-shell .creation-model-menu .creation-model-option.active .creation-model-option-check {
  color: var(--button-text) !important;
  background: var(--button-soft-hover) !important;
}

html[data-ui-theme] body:has(#panel-grid) .app-shell > .sidebar .module-nav .nav-item.active,
html[data-ui-theme] body:has(#panel-grid) .app-shell > .sidebar .nav-item.active {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body #panel-grid .generation-tabs button.active,
html[data-ui-theme] body #panel-grid .generation-tabs button[aria-pressed="true"] {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body #panel-grid .generation-tabs button.active::after,
html[data-ui-theme] body #panel-grid .generation-tabs button[aria-pressed="true"]::after {
  background: var(--button-text) !important;
}
html[data-ui-theme] body:has(#panel-grid) .app-shell > .sidebar .module-nav .nav-item.active,
html[data-ui-theme] body:has(#panel-grid) .app-shell > .sidebar .nav-item.active {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body #music-panel :is(.breeze-nav-item.active, .breeze-settings-tabs button.active),
html[data-ui-theme] body #music-panel #breeze-tts-page .breeze-settings-tabs button.active,
html[data-ui-theme] body #music-panel .breeze-view-toggle button.active,
html[data-ui-theme] body #music-panel .studio-view-toggle button.active,
html[data-ui-theme] body #music-panel #breeze-voices-page .voice-library-tabs button.active {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body #music-panel .breeze-settings-tabs button.active::after,
html[data-ui-theme] body #music-panel #breeze-voices-page .voice-library-tabs button.active::after {
  background: var(--button-text) !important;
}
html[data-ui-theme] body #music-panel :is(.studio-script-block footer button, .breeze-sample-buttons button),
html[data-ui-theme] body #music-panel #breeze-design-page .voice-design-prompt-actions button,
html[data-ui-theme] body #music-panel .breeze-blue-controls #breeze-blue-preview {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-bg) !important;
}
html[data-ui-theme] body #music-panel :is(.studio-script-block footer button, .breeze-sample-buttons button):hover:not(:disabled),
html[data-ui-theme] body #music-panel #breeze-design-page .voice-design-prompt-actions button:hover:not(:disabled),
html[data-ui-theme] body #music-panel .breeze-blue-controls #breeze-blue-preview:hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body #music-panel #breeze-design-page .voice-design-prompt-actions #breeze-blue-design-button,
html[data-ui-theme] body #music-panel #breeze-voices-page .voice-library-create-button,
html[data-ui-theme] body #music-panel .studio-create-footer .studio-create-submit {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-solid-bg) !important;
  box-shadow: none !important;
}

html[data-ui-theme] body #prompts-panel .prompt-library-category.is-active,
html[data-ui-theme] body #prompts-panel .prompt-library-subcategory.is-active,
html[data-ui-theme] body #prompts-panel .prompt-library-favorites-filter.is-active,
html[data-ui-theme] body #prompts-panel .prompt-detail-icon-button.is-saved {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}

html[data-ui-theme] body #prompts-panel :is(.prompt-library-category.is-active, .prompt-library-subcategory.is-active, .prompt-library-favorites-filter.is-active),
html[data-ui-theme] body #prompts-panel .prompt-detail-icon-button.is-saved {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body #prompts-panel .prompt-detail-purchase-button,
html[data-ui-theme] body #prompts-panel .prompt-detail-generate {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  background: var(--button-solid-bg) !important;
}

html[data-ui-theme] body #image-parameter-popover .image-parameter-option:is(.active, [aria-checked="true"]),
html[data-ui-theme] body #video-parameter-popover .video-mode-menu button:is(.active, [aria-checked="true"]),
html[data-ui-theme] body #tasklog-panel .task-log-category.active,
html[data-ui-theme] body #profile-modal .profile-tabs button.active {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body #tasklog-panel .task-log-category.active::after { background: var(--button-text) !important; }

html[data-ui-theme] body .app-shell button:focus-visible,
html[data-ui-theme] body .app-shell a:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--button-focus) !important;
}

/* Keyboard, pressed, disabled, and danger states. */
html[data-ui-theme] body .app-shell :is(
  .action-button, .secondary-button, .icon-button, .link-button,
  .topbar-utility-button, .wechat-contact-button, .referral-entry-button,
  .topbar-credit-button, .task-log-action, .result-history-actions button,
  .result-tool-button, .task-log-status-button, .image-prompt-optimize-button,
  .ds-button, .ds-icon-button, .voice-library-button, .voice-library-filter-button
):focus-visible,
body .admin-shell button:focus-visible,
body .admin-shell a:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--button-focus) !important;
}
html[data-ui-theme] body .app-shell :is(.action-button, .secondary-button, .icon-button, .task-log-action, .result-history-actions button):disabled,
html[data-ui-theme] body .app-shell :is(.action-button, .secondary-button, .icon-button, .task-log-action, .result-history-actions button)[aria-disabled="true"] {
  opacity: var(--button-disabled-opacity) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
html[data-ui-theme] body .app-shell :is(.danger-button, .studio-delete, .delete-result, .delete-task-log-result):hover:not(:disabled),
body .admin-shell .danger-button:hover:not(:disabled) {
  color: #b4232d !important;
  border-color: rgba(180, 35, 45, .36) !important;
  background: rgba(180, 35, 45, .08) !important;
}

html[data-ui-theme] body .app-shell :is(
  .action-button, .secondary-button, .icon-button, .result-tool-button,
  .home-primary-action, .ds-button, .voice-library-create-button
) > :is(svg, span, strong):not(.action-cost),
html[data-ui-theme] body .app-shell .action-button > :is(svg, span, strong) {
  color: inherit !important;
  border-color: transparent !important;
  background: transparent !important;
}
html[data-ui-theme] body .app-shell .action-button .action-cost {
  color: inherit !important;
  border-color: rgba(0, 0, 0, .12) !important;
  background: rgba(0, 0, 0, .08) !important;
}

html[data-ui-theme] body #music-panel #breeze-clone-page .clone-source-tabs button.active,
html[data-ui-theme] body #music-panel .breeze-model-card.active,
html[data-ui-theme] body #music-panel .breeze-model-card.active button,
html[data-ui-theme] body #music-panel .breeze-blue-design-option.active {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background-color: var(--button-soft-hover) !important;
  box-shadow: none !important;
}

/* Admin shares the same monochrome controls; keep its navigation and danger red semantic. */
body .admin-shell button:where(:not(.admin-nav button):not(.danger-button):not(.ap-primary):not(.aps-approve)),
body .admin-shell .site-link {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-soft-bg) !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}
body .admin-shell button:where(:not(.admin-nav button):not(.danger-button):not(.ap-primary):not(.aps-approve)):hover:not(:disabled),
body .admin-shell .site-link:hover {
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
body .admin-shell .danger-button {
  color: #b4232d !important;
  border-color: rgba(180, 35, 45, .3) !important;
  background: transparent !important;
}
body .admin-shell .danger-button:hover:not(:disabled) {
  color: #b4232d !important;
  border-color: rgba(180, 35, 45, .36) !important;
  background: rgba(180, 35, 45, .08) !important;
}
body .admin-shell #refresh-button,
body .admin-shell #generate-card-button,
body .admin-shell #add-model-button,
body .admin-shell .dialog-actions button[type="submit"],
body .admin-shell .credit-adjust-form button,
body .admin-shell .verify-box button:not(.plain-button),
body .admin-shell .settings-panel .section-title button:not(.plain-button),
body .admin-shell .admin-table .primary-button {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  background: var(--button-solid-bg) !important;
}
body .admin-shell #refresh-button:hover:not(:disabled),
body .admin-shell #generate-card-button:hover:not(:disabled),
body .admin-shell #add-model-button:hover:not(:disabled),
body .admin-shell .dialog-actions button[type="submit"]:hover:not(:disabled),
body .admin-shell .credit-adjust-form button:hover:not(:disabled),
body .admin-shell .verify-box button:not(.plain-button):hover:not(:disabled),
body .admin-shell .settings-panel .section-title button:not(.plain-button):hover:not(:disabled),
body .admin-shell .admin-table .primary-button:hover:not(:disabled) {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-hover) !important;
  background: var(--button-solid-hover) !important;
}
body .admin-shell :is(.admin-nav button, .admin-nav button.active, .plain-button, .model-dialog-tabs button.active, .table-pagination button.active) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-bg) !important;
}
body .admin-shell .admin-nav button:hover,
body .admin-shell .admin-nav button.active,
body .admin-shell .model-dialog-tabs button.active,
body .admin-shell .table-pagination button.active {
  background: var(--button-soft-hover) !important;
}
body .admin-sidebar {
  --button-text: #58616b;
  --button-border: rgba(32, 37, 43, .12);
  --button-soft-bg: transparent;
  --button-soft-hover: #eef0f2;
}
body .admin-shell .admin-nav button {
  color: #58616b !important;
  border-color: transparent !important;
  background: transparent !important;
}
body .admin-shell .admin-nav button.active {
  color: #20252b !important;
  background: #e9ebed !important;
}
body .admin-shell .admin-nav button:hover:not(.active) {
  color: #20252b !important;
  background: #f1f2f3 !important;
}
body .admin-shell .overview-priority-item {
  color: inherit !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body .admin-shell .overview-priority-item:hover:not(:disabled) {
  background: #f2efe8 !important;
}
html:not([data-ui-theme]) body .admin-shell .danger-button {
  color: #b4232d !important;
  border-color: rgba(180, 35, 45, .3) !important;
  background: transparent !important;
}

/* Root dialogs are siblings of the app shell. */
html[data-ui-theme] body :is(.modal-card, .image-lightbox, .ds-dialog, .ap-editor, .ap-confirm, .aps-review-dialog) :is(.secondary-button, .icon-button, .ds-button) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-soft-bg) !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}
html[data-ui-theme] body :is(.modal-card, .image-lightbox, .ds-dialog, .ap-editor, .ap-confirm, .aps-review-dialog) :is(.secondary-button, .icon-button, .ds-button):hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body :is(.modal-card, .ds-dialog, .ap-editor, .aps-review-dialog) :is(.action-button, .ds-primary, .ap-primary, .aps-approve),
html[data-ui-theme] body #design-services-panel .ds-button.ds-primary,
html[data-ui-theme] body #music-panel #breeze-clone-page .clone-primary {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-solid-bg) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body :is(.modal-card, .ds-dialog, .ap-editor, .aps-review-dialog) :is(.action-button, .ds-primary, .ap-primary, .aps-approve):hover:not(:disabled),
html[data-ui-theme] body #design-services-panel .ds-button.ds-primary:hover:not(:disabled),
html[data-ui-theme] body #music-panel #breeze-clone-page .clone-primary:hover:not(:disabled) {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-hover) !important;
  background: var(--button-solid-hover) !important;
  filter: none !important;
}
html[data-ui-theme] body :is(.modal-card, .image-lightbox, .ds-dialog, .ap-editor, .ap-confirm, .aps-review-dialog) :is(button, a):focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--button-focus) !important;
}
html[data-ui-theme] body :is(.modal-card, .image-lightbox, .ds-dialog) .action-button > :is(span, strong, svg) {
  color: inherit !important;
  background: transparent !important;
  border-color: transparent !important;
}
html[data-ui-theme] body :is(.modal-card, .image-lightbox, .ds-dialog) :is(.action-button, .secondary-button, .icon-button, .ds-button):disabled {
  opacity: var(--button-disabled-opacity) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Admin native dialogs and dynamically appended moderation editors. */
body :is(.verify-box, .admin-dialog, .ap-editor, .ap-confirm, .aps-review-dialog) button {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-soft-bg) !important;
  box-shadow: none !important;
}
body :is(.verify-box, .admin-dialog, .ap-editor, .ap-confirm, .aps-review-dialog) button:hover:not(:disabled) {
  color: var(--button-text) !important;
  background: var(--button-soft-hover) !important;
}
body :is(.admin-prompts, .ap-editor, .aps-review-dialog) :is(.ap-primary, .aps-approve),
body .verify-box button:not(.plain-button),
body .admin-dialog .dialog-actions button[type="submit"] {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  background: var(--button-solid-bg) !important;
}
body :is(.admin-prompts, .ap-editor, .aps-review-dialog) :is(.ap-primary, .aps-approve):hover:not(:disabled),
body .verify-box button:not(.plain-button):hover:not(:disabled),
body .admin-dialog .dialog-actions button[type="submit"]:hover:not(:disabled) {
  color: var(--button-solid-text) !important;
  background: var(--button-solid-hover) !important;
}
body :is(.ap-danger, .aps-reject, .ap-text-action.is-danger),
body .app-shell :is([data-task-log-action="delete"], [data-history-action="delete"]):hover:not(:disabled) {
  color: #b4232d !important;
  border-color: rgba(180, 35, 45, .3) !important;
  background: rgba(180, 35, 45, .08) !important;
}
html[data-ui-theme="dark"] body :is(.danger-button, .studio-delete, .delete-result, .delete-task-log-result, .ap-danger, .aps-reject, .ap-text-action.is-danger):hover:not(:disabled),
html[data-ui-theme="dark"] body .app-shell :is([data-task-log-action="delete"], [data-history-action="delete"]):hover:not(:disabled) {
  color: #f19a9f !important;
  border-color: rgba(241, 154, 159, .32) !important;
  background: rgba(241, 154, 159, .08) !important;
}

/* Shared variants also cover dynamically created dialogs and media tools. */
html[data-ui-theme] body :is(.studio-primary, .clone-primary, .ds-button.ds-primary, .studio-create-submit, .prompt-detail-generate, .prompt-detail-purchase-button),
html[data-ui-theme] body .studio-create-footer .studio-create-submit {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-solid-bg) !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}
html[data-ui-theme] body :is(.studio-primary, .clone-primary, .ds-button.ds-primary, .studio-create-submit, .prompt-detail-generate, .prompt-detail-purchase-button):hover:not(:disabled),
html[data-ui-theme] body .studio-create-footer .studio-create-submit:hover:not(:disabled),
html[data-ui-theme] body #music-panel #breeze-voices-page .voice-library-create-button:hover:not(:disabled),
html[data-ui-theme] body #music-panel #breeze-design-page .voice-design-prompt-actions #breeze-blue-design-button:hover:not(:disabled) {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-hover) !important;
  background: var(--button-solid-hover) !important;
  filter: none !important;
}
html[data-ui-theme] body :is(.studio-secondary, .studio-create-cancel, .voice-design-save-button, .voice-library-button, .voice-library-filter-button),
html[data-ui-theme] body #music-panel #breeze-voices-page :is(.voice-library-button, .voice-library-filter-button) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-soft-bg) !important;
  box-shadow: none !important;
  transition: var(--button-transition) !important;
}
html[data-ui-theme] body :is(.studio-secondary, .studio-create-cancel, .voice-design-save-button, .voice-library-button, .voice-library-filter-button):hover:not(:disabled),
html[data-ui-theme] body #music-panel #breeze-voices-page :is(.voice-library-button, .voice-library-filter-button):hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body :is(.studio-create-close, .clone-text-button, .prompt-detail-icon-button) {
  color: var(--button-muted) !important;
  border-color: transparent !important;
  background: transparent !important;
}
html[data-ui-theme] body :is(.studio-create-close, .clone-text-button, .prompt-detail-icon-button):hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-ghost-hover) !important;
}
html[data-ui-theme] body .studio-create-tabs button:is(.active, [aria-selected="true"]),
html[data-ui-theme] body .studio-writing-options button[aria-pressed="true"] {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body .modal-card .link-button,
body :is(.admin-prompts, .ap-editor, .aps-review-dialog) .ap-text-action:not(.is-danger) {
  color: var(--button-muted) !important;
  border-color: transparent !important;
  background: transparent !important;
}
html[data-ui-theme] body .modal-card .link-button:hover:not(:disabled),
body :is(.admin-prompts, .ap-editor, .aps-review-dialog) .ap-text-action:not(.is-danger):hover:not(:disabled) {
  color: var(--button-text) !important;
  background: var(--button-ghost-hover) !important;
}
html[data-ui-theme] body #profile-modal .profile-modal-card .profile-tabs button {
  color: var(--button-muted) !important;
  background: transparent !important;
}
html[data-ui-theme] body #profile-modal .profile-modal-card .profile-tabs button:is(.active, :hover) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
  box-shadow: none !important;
}
html[data-ui-theme] body :is(.modal-card, .ds-dialog) .action-button.secondary-button {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-outline-bg) !important;
}
html[data-ui-theme] body :is(.modal-card, .ds-dialog) .action-button.secondary-button:hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-outline-hover) !important;
}
html[data-ui-theme] body :is(.outline-button, .button-outline) {
  color: var(--button-text) !important;
  border: 1px solid var(--button-border) !important;
  border-radius: var(--button-radius) !important;
  background: var(--button-outline-bg) !important;
  transition: var(--button-transition) !important;
}
html[data-ui-theme] body :is(.outline-button, .button-outline):hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-outline-hover) !important;
}
html[data-ui-theme] body :is(.action-button, .secondary-button, .icon-button, .studio-primary, .studio-secondary, .clone-primary, .ds-button)[aria-busy="true"] {
  cursor: progress !important;
}
html[data-ui-theme] body .topbar-actions .ui-language-menu button:is(.active, :hover),
html[data-ui-theme] body .topbar-actions .ui-language-menu button[aria-checked="true"] svg {
  color: var(--button-text) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body .sidebar #auth-card #login-button {
  color: var(--button-solid-text) !important;
  border-color: var(--button-solid-bg) !important;
  background: var(--button-solid-bg) !important;
}
html[data-ui-theme] body .sidebar #auth-card #register-button,
html[data-ui-theme] body .topbar #mobile-login-entry,
html[data-ui-theme] body #video-panel .video-parameter-trigger,
html[data-ui-theme] body #video-panel .range-step-button,
html[data-ui-theme] body .prompt-detail .prompt-detail-copy {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-bg) !important;
  border-radius: var(--button-radius) !important;
}
html[data-ui-theme] body .sidebar #auth-card #register-button:hover:not(:disabled),
html[data-ui-theme] body .topbar #mobile-login-entry:hover:not(:disabled),
html[data-ui-theme] body #video-panel .video-parameter-trigger:hover:not(:disabled),
html[data-ui-theme] body #video-panel .range-step-button:hover:not(:disabled),
html[data-ui-theme] body .prompt-detail .prompt-detail-copy:hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body #video-panel #video-mode-menu button:is(.active, [aria-checked="true"]) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-soft-hover) !important;
}
html[data-ui-theme] body #tasklog-panel .task-log-action {
  color: var(--button-muted) !important;
  border-color: transparent !important;
  background: transparent !important;
}
html[data-ui-theme] body #tasklog-panel .task-log-action:hover:not(:disabled) {
  color: var(--button-text) !important;
  border-color: var(--button-border) !important;
  background: var(--button-ghost-hover) !important;
}
html[data-ui-theme] body #tasklog-panel [data-task-log-action="delete"]:hover:not(:disabled) {
  color: var(--button-danger-text) !important;
  border-color: var(--button-danger-border) !important;
  background: var(--button-danger-hover) !important;
}
html[data-ui-theme] body :is(.studio-create-dialog, .ap-editor, .ap-confirm, .aps-review-dialog, .admin-dialog, .verify-panel) :is(button, a):focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px var(--button-focus) !important;
}
html[data-ui-theme] body :is(.studio-primary, .clone-primary, .studio-create-submit, .voice-library-create-button, .prompt-detail-purchase-button, .ds-button):disabled,
body :is(.admin-dialog, .ap-editor, .aps-review-dialog, .verify-panel) button:disabled {
  opacity: var(--button-disabled-opacity) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
body :is(.admin-shell, .admin-dialog, .verify-panel, .ap-editor, .ap-confirm, .aps-review-dialog) :is(.danger-button, .ap-danger, .aps-reject, .ap-text-action.is-danger) {
  color: var(--button-danger-text) !important;
  border-color: var(--button-danger-border) !important;
  background: transparent !important;
}
body :is(.admin-shell, .admin-dialog, .verify-panel, .ap-editor, .ap-confirm, .aps-review-dialog) :is(.danger-button, .ap-danger, .aps-reject, .ap-text-action.is-danger):hover:not(:disabled) {
  color: var(--button-danger-text) !important;
  border-color: var(--button-danger-border) !important;
  background: var(--button-danger-hover) !important;
}
@media (prefers-reduced-motion: reduce) {
  :is(.action-button, .secondary-button, .icon-button, .task-log-action, .studio-primary, .studio-secondary, .clone-primary, .ds-button) {
    transition-duration: 0s !important;
  }
}
