/* ============================================================
   pm-animations.css — 全部 @keyframes、mode-* 入场动画、prefers-reduced-motion 全局关闭
   ============================================================ */

/* ---------- 共享关键帧 ---------- */
@keyframes pm-fade-in       { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-fade-up       { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pm-fade-down     { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes pm-pop-in        { 0% { opacity: 0; transform: scale(0.85); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }
@keyframes pm-rise          { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pm-modal-in      { from { opacity: 0; transform: translateY(12px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes pm-backdrop-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-pulse-soft    { 0%, 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0.45); } 50% { box-shadow: 0 0 0 6px rgba(63,185,80,0); } }
@keyframes pm-tab-glow      { 0% { background-color: rgba(31,111,235,0.10); } 100% { background-color: transparent; } }
@keyframes pm-shimmer       { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pm-shake-x       { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes pm-ring-soft     { 0% { box-shadow: 0 0 0 0 rgba(31,111,235,0.45); } 100% { box-shadow: 0 0 0 6px rgba(31,111,235,0); } }

/* ---------- 页面加载入场：警告横幅、顶部栏、标签栏 ---------- */
.warning-banner {
    animation: pm-fade-down 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: 0.05s;
}
.maker-bar {
    animation: pm-fade-up 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: 0.10s;
}
.h1-tabs {
    animation: pm-fade-in 0.35s ease both;
    animation-delay: 0.18s;
}
.h1-tab {
    animation: pm-fade-up 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    opacity: 0;
}
.h1-tab:nth-child(1) { animation-delay: 0.20s; }
.h1-tab:nth-child(2) { animation-delay: 0.25s; }
.h1-tab:nth-child(3) { animation-delay: 0.30s; }
.h1-tab:nth-child(4) { animation-delay: 0.35s; }
.h1-tab:nth-child(5) { animation-delay: 0.40s; }

/* ---------- 欢迎页 choreography（设置 .is-open 类时触发） ---------- */
.welcome-container > .welcome-title,
.welcome-container > .welcome-subtitle,
.welcome-container > .welcome-actions,
.welcome-container > .welcome-dropzone,
.welcome-container > .welcome-features {
    opacity: 0;
    animation: pm-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.welcome-container > .welcome-title      { animation-delay: 0.15s; }
.welcome-container > .welcome-subtitle   { animation-delay: 0.25s; }
.welcome-container > .welcome-actions    { animation-delay: 0.35s; }
.welcome-container > .welcome-dropzone   { animation-delay: 0.45s; }
.welcome-container > .welcome-features   { animation-delay: 0.55s; }

/* 🎨 图标结合一次性 pop-in 入场和原有的弹跳循环，
   通过简写 "name name" 让两者并排运行。 */
.welcome-icon {
    opacity: 0;
    animation:
        pm-pop-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s forwards,
        welcome-bounce 2.5s ease-in-out 0.6s infinite;
}

.welcome-btn {
    animation: pm-pop-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    opacity: 0;
}
.welcome-btn:nth-child(1) { animation-delay: 0.40s; }
.welcome-btn:nth-child(2) { animation-delay: 0.50s; }

.welcome-feature {
    animation: pm-fade-up 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    opacity: 0;
}
.welcome-feature:nth-child(1) { animation-delay: 0.62s; }
.welcome-feature:nth-child(2) { animation-delay: 0.70s; }
.welcome-feature:nth-child(3) { animation-delay: 0.78s; }
.welcome-feature:nth-child(4) { animation-delay: 0.86s; }

/* 欢迎图标悬停时的发光环（图标已有弹跳循环）。 */
.welcome-icon {
    transition: filter 0.25s ease, transform 0.25s ease;
}
.welcome-container:hover .welcome-icon {
    filter: drop-shadow(0 0 12px rgba(88,166,255,0.45));
}

/* ---------- H1 标签下划线指示器滑动 + 按下反馈 ---------- */
.h1-tab {
    position: relative;
    overflow: hidden;
}
.h1-tab::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #1f6feb;
    transform: translateX(-50%);
    transition: width 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.h1-tab:hover::after { width: 60%; }
.h1-tab.active::after { width: 100%; }
.h1-tab:active { transform: translateY(1px); }

/* 标签激活时的一次性高亮（JS 添加的类）。 */
.h1-tab.just-activated {
    animation: pm-tab-glow 0.6s ease-out;
}

/* ---------- 按钮：悬停浮起、按压反馈、主按钮脉冲 ---------- */
.btn {
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.btn:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
.btn:active {
    transform: translateY(1px) scale(0.97);
}
.btn-primary:hover {
    box-shadow: 0 3px 12px rgba(46, 160, 67, 0.32);
}

/* 欢迎按钮获得更丰富的悬停效果。 */
.welcome-btn:hover {
    box-shadow: 0 8px 22px rgba(31, 111, 235, 0.22);
}
.welcome-btn.primary:hover {
    box-shadow: 0 8px 22px rgba(63, 185, 80, 0.30);
}
.welcome-btn:active {
    transform: translateY(-1px) scale(0.985);
}

/* ---------- 模态框入场：背景淡入 + 模态框缩放入场 ---------- */
.modal-overlay.is-open {
    animation: pm-backdrop-in 0.2s ease both;
}
.modal-overlay.is-open .modal {
    animation: pm-modal-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.modal-overlay.is-open .new-model-dialog {
    animation: pm-fade-in 0.25s ease both;
}

/* 图片预览以全屏打开，渐入并弹出图片。
   toolbar / body 类保留作为遗留钩子，让任何进行中的动画仍能播放；
   新行为是灯箱风格。 */
.img-preview-overlay.is-open {
    animation: pm-backdrop-in 0.25s ease both;
}
.img-preview-overlay.is-open .img-preview-toolbar {
    animation: pm-fade-down 0.3s ease 0.05s both;
}
.img-preview-overlay.is-open .img-preview-body img {
    animation: pm-pop-in 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both;
}

/* 资源包编辑器中使用的灯箱（画廊风格）图片预览。
   重用 index.html 画廊灯箱的相同外观。 */
.lightbox.is-open .lightbox-image-wrap {
    animation: anim-pop-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1.2) both;
}
.lightbox.is-open {
    animation: pm-backdrop-in 0.22s ease both;
}

/* 灯箱缩放/适应/下载操作固定在底部栏，
   让核心"查看完整大小预览"体验匹配着陆页画廊，
   但编辑器保持可用。 */
.lightbox-zoom-display {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    min-width: 64px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    border: none;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.12s ease;
    z-index: 2002;
}
.lightbox-zoom-display:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-zoom-display:active { transform: translateX(-50%) scale(0.96); }
.lightbox-action {
    position: fixed;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, transform 0.12s ease;
    z-index: 2002;
}
.lightbox-action:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-action:active { transform: scale(0.92); }
.lightbox-action.zoom-out { left: calc(50% - 120px); }
.lightbox-action.zoom-in  { left: calc(50% + 76px); }
.lightbox-action.download { right: calc(50% - 80px); }

/* 新灯箱重用的加载 + 错误状态。 */
.lightbox-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}
.lightbox-loading .spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.85);
    animation: pm-spin 0.9s linear infinite;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }
.lightbox-error {
    color: #f85149;
    font-size: 14px;
    text-align: center;
}
.lightbox-error-icon { font-size: 32px; margin-bottom: 8px; }

/* 文本编辑器覆盖层以快速滑出（如纸片）打开。 */
.text-editor-overlay.is-open {
    animation: pm-fade-in 0.22s ease both;
}
.text-editor-overlay.is-open .text-editor-toolbar {
    animation: pm-fade-down 0.3s ease 0.05s both;
}

/* 新建模型向导步骤转换：激活时步骤点脉冲。 */
.nm-step.active .nm-step-num {
    animation: pm-ring-soft 0.6s ease-out;
}
.nm-step.done .nm-step-num {
    animation: pm-pop-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 通过 body.mode-* 类切换主视图时的 body 过渡。 */
body.mode-transitioning .overlay-editor,
body.mode-transitioning .welcome-screen,
body.mode-transitioning .models-view,
body.mode-transitioning .pack-settings-view,
body.mode-transitioning .explorer-view {
    animation: pm-fade-in 0.28s ease both;
}

/* JS 添加的视图淡入类，用于标签切换时的一次性入场。 */
.view-fade-in {
    animation: pm-fade-up 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* ---------- Toast 增强：从角落弹入 ---------- */
.toast {
    transform: translateY(20px) scale(0.94);
    opacity: 0;
}
.toast.show {
    animation: pm-pop-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

/* ---------- Pack-badge：出现 "loaded" 类时柔和脉冲 ---------- */
.pack-badge.loaded {
    animation: pm-pulse-soft 1.4s ease-out 1;
}

/* ---------- H2 侧边栏项：悬停时图标轻推、计数徽章滑动 ---------- */
.h2-item .h2-icon {
    transition: transform 0.2s ease;
}
.h2-item:hover .h2-icon {
    transform: translateX(2px) rotate(-6deg);
}
.h2-item .h2-count {
    transition: background-color 0.15s ease, color 0.15s ease;
}
.h2-item.active .h2-count {
    background-color: #1f6feb44;
    color: #79c0ff;
}

/* H2 侧边栏列表交错：首次页面加载时应用，让每行滑入。
   后续渲染保持流畅。 */
body:not(.mode-welcome) .h2-list > .h2-item {
    animation: pm-fade-up 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(1) { animation-delay: 0.30s; }
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(2) { animation-delay: 0.34s; }
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(3) { animation-delay: 0.38s; }
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(4) { animation-delay: 0.42s; }
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(5) { animation-delay: 0.46s; }
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(6) { animation-delay: 0.50s; }
body:not(.mode-welcome) .h2-list > .h2-item:nth-child(n + 7) { animation-delay: 0.54s; }

/* ---------- H3 卡片：添加 .cards-anim-in 类时交错。
   DOM 结构为 #h3SectionsArea > #h3CardsList > .h3-card，
   我们用后代选择器定位孙元素（以及用于安全的兄弟列表变体）。 ---------- */
.h3-sections-area.cards-anim-in .h3-card,
#h3CardsList.cards-anim-in > .h3-card {
    animation: pm-fade-up 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.h3-sections-area.cards-anim-in .h3-card:nth-child(1),
#h3CardsList.cards-anim-in > .h3-card:nth-child(1) { animation-delay: 0.04s; }
.h3-sections-area.cards-anim-in .h3-card:nth-child(2),
#h3CardsList.cards-anim-in > .h3-card:nth-child(2) { animation-delay: 0.08s; }
.h3-sections-area.cards-anim-in .h3-card:nth-child(3),
#h3CardsList.cards-anim-in > .h3-card:nth-child(3) { animation-delay: 0.12s; }
.h3-sections-area.cards-anim-in .h3-card:nth-child(4),
#h3CardsList.cards-anim-in > .h3-card:nth-child(4) { animation-delay: 0.16s; }
.h3-sections-area.cards-anim-in .h3-card:nth-child(5),
#h3CardsList.cards-anim-in > .h3-card:nth-child(5) { animation-delay: 0.20s; }
.h3-sections-area.cards-anim-in .h3-card:nth-child(n + 6),
#h3CardsList.cards-anim-in > .h3-card:nth-child(n + 6) { animation-delay: 0.24s; }

/* H3 卡片悬停获得更深的阴影；展开/收拢保持流畅。 */
.h3-card {
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.h3-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}
.h3-card-header {
    transition: background-color 0.15s ease;
}

/* ---------- 图片缩略图：入场时柔和弹出，悬停时缩放。 ---------- */
.image-grid:not(.no-stagger) > .image-thumb {
    animation: pm-pop-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.image-grid:not(.no-stagger) > .image-thumb:nth-child(1) { animation-delay: 0.02s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(2) { animation-delay: 0.04s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(3) { animation-delay: 0.06s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(4) { animation-delay: 0.08s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(5) { animation-delay: 0.10s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(6) { animation-delay: 0.12s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(7) { animation-delay: 0.14s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(8) { animation-delay: 0.16s; }
.image-grid:not(.no-stagger) > .image-thumb:nth-child(n + 9) { animation-delay: 0.18s; }

.image-thumb {
    transition: border-color 0.15s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.image-thumb:hover {
    box-shadow: 0 4px 14px rgba(31, 111, 235, 0.22);
}
.image-thumb:active {
    transform: scale(0.96);
}
.image-thumb.selected {
    animation: pm-ring-soft 0.5s ease-out;
}

/* 过滤模式切换按钮激活时小幅弹跳。 */
.img-filter-btn.active,
.font-filter-btn.active {
    animation: pm-pop-in 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 资源管理器项（列表/网格）：首次渲染时交错。
   网格 DOM 为 #explorerContent > .explorer-grid > .explorer-item；
   列表 DOM 为 #explorerContent > table > tr。
   后代选择器同时定位两种形状。 ---------- */
.explorer-content.items-anim-in .explorer-item,
.explorer-list.items-anim-in tr,
#explorerContent.items-anim-in .explorer-grid > .explorer-item,
#explorerContent.items-anim-in .explorer-list tr {
    animation: pm-fade-up 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.explorer-content.items-anim-in .explorer-item:nth-child(1),
.explorer-list.items-anim-in tr:nth-child(1),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(1),
#explorerContent.items-anim-in .explorer-list tr:nth-child(1) { animation-delay: 0.02s; }
.explorer-content.items-anim-in .explorer-item:nth-child(2),
.explorer-list.items-anim-in tr:nth-child(2),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(2),
#explorerContent.items-anim-in .explorer-list tr:nth-child(2) { animation-delay: 0.04s; }
.explorer-content.items-anim-in .explorer-item:nth-child(3),
.explorer-list.items-anim-in tr:nth-child(3),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(3),
#explorerContent.items-anim-in .explorer-list tr:nth-child(3) { animation-delay: 0.06s; }
.explorer-content.items-anim-in .explorer-item:nth-child(4),
.explorer-list.items-anim-in tr:nth-child(4),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(4),
#explorerContent.items-anim-in .explorer-list tr:nth-child(4) { animation-delay: 0.08s; }
.explorer-content.items-anim-in .explorer-item:nth-child(5),
.explorer-list.items-anim-in tr:nth-child(5),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(5),
#explorerContent.items-anim-in .explorer-list tr:nth-child(5) { animation-delay: 0.10s; }
.explorer-content.items-anim-in .explorer-item:nth-child(6),
.explorer-list.items-anim-in tr:nth-child(6),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(6),
#explorerContent.items-anim-in .explorer-list tr:nth-child(6) { animation-delay: 0.12s; }
.explorer-content.items-anim-in .explorer-item:nth-child(n + 7),
.explorer-list.items-anim-in tr:nth-child(n + 7),
#explorerContent.items-anim-in .explorer-grid > .explorer-item:nth-child(n + 7),
#explorerContent.items-anim-in .explorer-list tr:nth-child(n + 7) { animation-delay: 0.14s; }

/* 资源管理器项悬停已在上方定义；添加浮起。 */
.explorer-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.explorer-item:active {
    transform: scale(0.98);
}

/* 资源管理器列表行获得微妙的悬停浮起。 */
.explorer-list tr {
    transition: background-color 0.15s ease;
}

/* ---------- 文件树项：悬停时缩进偏移 ---------- */
.tree-item .tree-icon {
    transition: transform 0.2s ease;
}
.tree-item:hover .tree-icon {
    transform: scale(1.18);
}

/* ---------- 子文件夹标签：悬停浮起 ---------- */
.subfolder-chip,
.add-sf-chip {
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.subfolder-chip:hover,
.add-sf-chip:hover {
    transform: translateY(-1px);
}
.subfolder-chip:active,
.add-sf-chip:active {
    transform: scale(0.96);
}

/* ---------- 表单输入框：聚焦时发光环 ---------- */
.form-input,
.ps-input,
.ps-select,
.card-form-row input,
.card-form-row select,
.card-form-row textarea,
.nm-form-input,
.nm-tex-ns-in,
.nm-tex-path-in,
.font-row-input,
.fj-input,
.fj-type-select,
.h3-main-hint-input {
    transition: border-color 0.15s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.form-input:focus,
.ps-input:focus,
.ps-select:focus,
.card-form-row input:focus,
.card-form-row select:focus,
.card-form-row textarea:focus,
.nm-form-input:focus,
.nm-tex-ns-in:focus,
.nm-tex-path-in:focus,
.font-row-input:focus,
.fj-input:focus,
.fj-type-select:focus,
.h3-main-hint-input:focus {
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.20);
}

/* ---------- 上传区域：拖拽悬停时柔和脉冲 ---------- */
.upload-zone,
.nm-upload-zone {
    transition: border-color 0.2s ease, background-color 0.2s ease,
                transform 0.2s ease, box-shadow 0.2s ease;
}
.upload-zone.drag-over,
.nm-upload-zone.drag-over {
    animation: pm-ring-soft 0.9s ease-out infinite;
}

/* ---------- 提示开关：更流畅的旋钮 + 强调色 ---------- */
.h3-main-hint-toggle {
    transition: background-color 0.18s ease, color 0.18s ease,
                border-color 0.18s ease, transform 0.12s ease;
}
.h3-main-hint-toggle:active {
    transform: scale(0.97);
}

/* ---------- 右侧面板展开/收拢动画 ---------- */
.right-panel {
    transition: width 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 标签列表项入场弹出 ---------- */
.chip {
    animation: pm-fade-up 0.25s ease both;
}
.chip:nth-child(1) { animation-delay: 0.02s; }
.chip:nth-child(2) { animation-delay: 0.05s; }
.chip:nth-child(3) { animation-delay: 0.08s; }
.chip:nth-child(n + 4) { animation-delay: 0.10s; }

/* ---------- Pack-settings 标题：进入 pack-settings 视图时淡入 ---------- */
body.mode-pack-settings .ps-header {
    animation: pm-fade-down 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body.mode-pack-settings .ps-section {
    animation: pm-fade-up 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body.mode-pack-settings .ps-section:nth-child(1) { animation-delay: 0.05s; }
body.mode-pack-settings .ps-section:nth-child(2) { animation-delay: 0.12s; }
body.mode-pack-settings .ps-section:nth-child(3) { animation-delay: 0.19s; }

/* ---------- Models-view 标题入场 ---------- */
body.mode-models .models-header-bar {
    animation: pm-fade-down 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body.mode-models .models-list-table tbody tr {
    animation: pm-fade-up 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
body.mode-models .models-list-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
body.mode-models .models-list-table tbody tr:nth-child(2) { animation-delay: 0.08s; }
body.mode-models .models-list-table tbody tr:nth-child(3) { animation-delay: 0.11s; }
body.mode-models .models-list-table tbody tr:nth-child(n + 4) { animation-delay: 0.14s; }

/* ---------- Toast 状态强调 ---------- */
.toast.success {
    animation: pm-pop-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) forwards,
               pm-pulse-soft 1.4s ease-out 0.32s 1;
}
.toast.error {
    animation: pm-shake-x 0.5s ease, pm-pop-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Exp-btn（资源管理器工具栏）按下反馈 ---------- */
.exp-btn,
.exp-op-btn {
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, transform 0.12s ease;
}
.exp-btn:active,
.exp-op-btn:not(:disabled):active {
    transform: scale(0.94);
}

/* ---------- 警告横幅关闭：点击时微妙收缩 ---------- */
.warning-close {
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.warning-close:active {
    transform: scale(0.9);
}

/* ---------- 树形切换 chevron 更流畅旋转 ---------- */
.tree-toggle,
.explorer-hint > summary::before {
    transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 模态框关闭（X）按下反馈 ---------- */
.modal-close {
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.modal-close:active {
    transform: scale(0.9);
}

/* ---------- 标签指示器微滑动（添加 just-activated 类时） ---------- */

/* ---------- Models 标题 / pack-settings：标签切换时保持稳定 ---------- */

/* ================================================================
   减少动效：取消所有非必要动效。
   允许短于 0.01s 的纯淡入淡出，让 JS 驱动的显示/隐藏仍能工作，
   但任何可感知的内容都被禁用。
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .welcome-icon { animation: none !important; }
    .h1-tab::after { transition: none !important; }
}
