/**
 * AI 任务历史：全屏「时空门」过渡（nova_video / nova_image_video / nova_outfit_studio / product_image_video 等共用）
 * v20260511
 */
.nova-hist-portal[hidden] {
    display: none !important;
}

.nova-hist-portal:not([hidden]) {
    display: flex !important;
}

.nova-hist-portal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.nova-hist-portal.is-on {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.28s ease, visibility 0s;
}

.nova-hist-portal__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 85% 65% at 50% 42%, rgba(56, 189, 248, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(26, 54, 93, 0.45) 0%, transparent 50%),
        linear-gradient(165deg, #070b12 0%, #0f172a 38%, #0a1628 100%);
}

.nova-hist-portal__stars {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.9) 50%, transparent 51%),
        radial-gradient(1px 1px at 73% 14%, rgba(255, 255, 255, 0.75) 50%, transparent 51%),
        radial-gradient(1px 1px at 44% 68%, rgba(255, 255, 255, 0.65) 50%, transparent 51%),
        radial-gradient(1px 1px at 88% 82%, rgba(255, 255, 255, 0.55) 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 91%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 56% 38%, rgba(147, 197, 253, 0.95) 50%, transparent 51%);
    background-size: 100% 100%;
    animation: novaHistPortalStars 14s ease-in-out infinite alternate;
}

@keyframes novaHistPortalStars {
    from { transform: translateY(0) scale(1); opacity: 0.45; }
    to { transform: translateY(-8px) scale(1.02); opacity: 0.7; }
}

.nova-hist-portal__grid {
    position: absolute;
    inset: -40% -20%;
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.28) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: perspective(420px) rotateX(68deg);
    transform-origin: 50% 0%;
    animation: novaHistPortalGrid 10s linear infinite;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 78%, transparent 100%);
}

@keyframes novaHistPortalGrid {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 96px, 96px 0; }
}

.nova-hist-portal__scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 28%;
    top: -28%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(56, 189, 248, 0.06),
        rgba(165, 243, 252, 0.12),
        rgba(56, 189, 248, 0.06),
        transparent
    );
    animation: novaHistPortalScan 2.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes novaHistPortalScan {
    0% { transform: translateY(0); opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { transform: translateY(420%); opacity: 0; }
}

.nova-hist-portal__hex {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%2394c5fd' d='M14 0l12 7v14l-12 7L2 21V7z'/%3E%3C/svg%3E");
    background-size: 28px 49px;
    animation: novaHistPortalHex 18s linear infinite;
}

@keyframes novaHistPortalHex {
    from { background-position: 0 0; }
    to { background-position: 0 196px; }
}

.nova-hist-portal__core {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px 20px;
    max-width: 92vw;
}

.nova-hist-portal__orbit {
    position: relative;
    width: 112px;
    height: 112px;
    margin: 0 auto 22px;
}

.nova-hist-portal__orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.25);
    border-top-color: rgba(34, 211, 238, 0.95);
    border-right-color: rgba(56, 189, 248, 0.45);
    animation: novaHistPortalSpin 1.05s linear infinite;
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.5) inset,
        0 0 40px rgba(34, 211, 238, 0.22);
}

.nova-hist-portal__orbit-ring--inner {
    inset: 14px;
    border-top-color: rgba(129, 140, 248, 0.85);
    border-right-color: rgba(99, 102, 241, 0.35);
    animation-direction: reverse;
    animation-duration: 1.55s;
    opacity: 0.9;
}

.nova-hist-portal__orbit-glow {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(186, 230, 253, 0.35) 35%, transparent 70%);
    filter: blur(0.5px);
    animation: novaHistPortalPulse 1.4s ease-in-out infinite;
}

/** 全屏过渡 · 神秘转笔（穿搭提交等） */
.nova-hist-portal__pen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    perspective: 220px;
    animation: novaHistPortalPenFlip 1.65s cubic-bezier(0.45, 0.05, 0.35, 1) infinite;
    z-index: 3;
    pointer-events: none;
}

.nova-hist-portal__pen-stick,
.nova-hist-portal__pen-nib,
.nova-hist-portal__pen-trail {
    position: absolute;
    display: block;
    transform-origin: 50% 92%;
}

.nova-hist-portal__pen-stick {
    width: 5px;
    height: 44px;
    border-radius: 3px;
    background: linear-gradient(180deg, #0f172a 0%, #334155 38%, #94a3b8 72%, #e2e8f0 100%);
    box-shadow:
        0 0 14px rgba(56, 189, 248, 0.42),
        inset 0 -6px 10px rgba(15, 23, 42, 0.35);
    transform: rotate(-24deg) translateY(-8px);
}

.nova-hist-portal__pen-nib {
    width: 0;
    height: 0;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-top: 15px solid #22d3ee;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.95));
    transform: rotate(-24deg) translateY(20px);
}

.nova-hist-portal__pen-trail {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1.5px dashed rgba(129, 140, 248, 0.45);
    opacity: 0.55;
    animation: novaHistPortalPenTrail 1.65s linear infinite;
}

@keyframes novaHistPortalPenFlip {
    0% { transform: rotateZ(0deg) rotateY(-18deg) rotateX(8deg); }
    20% { transform: rotateZ(72deg) rotateY(28deg) rotateX(-12deg); }
    40% { transform: rotateZ(144deg) rotateY(-8deg) rotateX(16deg); }
    60% { transform: rotateZ(216deg) rotateY(32deg) rotateX(-8deg); }
    80% { transform: rotateZ(288deg) rotateY(-22deg) rotateX(10deg); }
    100% { transform: rotateZ(360deg) rotateY(-18deg) rotateX(8deg); }
}

@keyframes novaHistPortalPenTrail {
    to { transform: rotate(360deg); }
}

@keyframes novaHistPortalSpin {
    to { transform: rotate(360deg); }
}

@keyframes novaHistPortalPulse {
    0%, 100% { transform: scale(0.92); opacity: 0.75; }
    50% { transform: scale(1.06); opacity: 1; }
}

.nova-hist-portal__kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.38em;
    color: rgba(148, 196, 255, 0.85);
    text-indent: 0.38em;
}

.nova-hist-portal__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.25;
    background: linear-gradient(105deg, #f8fafc 0%, #bae6fd 28%, #e0e7ff 52%, #f8fafc 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: novaHistPortalShimmer 2.4s ease-in-out infinite;
}

.nova-hist-portal__title--ok {
    background: linear-gradient(105deg, #ecfdf5 0%, #6ee7b7 32%, #a7f3d0 55%, #ecfdf5 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nova-hist-portal__kicker--ok {
    color: rgba(167, 243, 208, 0.92);
}

@keyframes novaHistPortalShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nova-hist-portal__sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(203, 213, 225, 0.88);
}

.nova-hist-portal__bar {
    margin: 22px auto 0;
    width: min(220px, 70vw);
    height: 3px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.9);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
}

.nova-hist-portal__bar > i {
    display: block;
    height: 100%;
    width: 38%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22d3ee, #818cf8, #22d3ee);
    background-size: 200% 100%;
    animation: novaHistPortalBar 1.1s ease-in-out infinite;
}

@keyframes novaHistPortalBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}

.nova-hist-portal.is-out {
    opacity: 0;
    transition: opacity 0.45s ease;
}

.nova-history-section.nova-hist-reveal,
.i2v-history-section.nova-hist-reveal {
    animation: novaHistPageReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes novaHistPageReveal {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.988);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* 提交态：中心对勾（与旧 i2v 动效兼容） */
.nova-hist-portal__check {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
}

.nova-hist-portal__check svg {
    width: 72px;
    height: 72px;
    display: block;
}

.nova-hist-portal__check-circle {
    fill: none;
    stroke: #34d399;
    stroke-width: 2.5;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    transform-origin: 50% 50%;
    animation: novaHistCheckCircle 0.55s ease forwards 0.08s;
}

.nova-hist-portal__check-path {
    fill: none;
    stroke: #34d399;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: novaHistCheckPath 0.45s ease forwards 0.48s;
}

@keyframes novaHistCheckCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes novaHistCheckPath {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .nova-hist-portal,
    .nova-hist-portal__stars,
    .nova-hist-portal__grid,
    .nova-hist-portal__hex,
    .nova-hist-portal__scan,
    .nova-hist-portal__orbit-ring,
    .nova-hist-portal__orbit-glow,
    .nova-hist-portal__pen,
    .nova-hist-portal__pen-trail,
    .nova-hist-portal__title,
    .nova-hist-portal__bar > i,
    .nova-history-section.nova-hist-reveal,
    .i2v-history-section.nova-hist-reveal {
        animation: none !important;
        transition: none !important;
    }
    .nova-hist-portal__orbit-ring {
        animation: none !important;
        transform: none !important;
    }
}

/** 历史卡片 · 全屏查看成片（nova_video / nova_image_video 等） */
.nova-vid-viewer[hidden] {
    display: none !important;
}

.nova-vid-viewer {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.nova-vid-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.nova-vid-viewer__box {
    position: relative;
    z-index: 1;
    width: min(100%, 540px);
    max-height: calc(100vh - 48px);
    margin: 0 12px;
}

.nova-vid-viewer__close {
    position: absolute;
    top: -40px;
    right: 0;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.nova-vid-viewer__vid {
    display: block;
    width: 100%;
    max-height: calc(100vh - 120px);
    background: #000;
    border-radius: 12px;
    object-fit: contain;
}

.nova-vid-viewer__foot {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.nova-vid-viewer__dl {
    flex: 1;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nova-vid-viewer__dl:active { opacity: 0.92; transform: scale(0.98); }
.nova-vid-viewer__dl.is-dl-busy { opacity: 0.7; pointer-events: none; }

.nova-hist-card-top--play {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nova-hist-card-top--play .nova-hist-preview__veil {
    pointer-events: auto;
    cursor: pointer;
}

.nova-hist-card-top--play:active {
    opacity: 0.92;
}

/** 历史卡片 · 进行中 AI 动效（nova_video / nova_image_video 等） */
.nova-hist-card-top--busy,
.nova-hist-card-top--queue {
    position: relative;
    overflow: hidden;
    min-height: 152px;
    background: #050810;
    isolation: isolate;
}

.nova-hist-card-top--busy::before,
.nova-hist-card-top--queue::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 85% 65% at 50% 28%, rgba(56, 189, 248, 0.2) 0%, transparent 58%),
        radial-gradient(ellipse 60% 45% at 85% 85%, rgba(139, 92, 246, 0.16) 0%, transparent 55%),
        linear-gradient(168deg, #030712 0%, #0a1628 42%, #0f172a 100%);
    pointer-events: none;
    z-index: 0;
}

.nova-hist-card-top--queue::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(251, 191, 36, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.nova-hist-ai-stage {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 2px 0 6px;
    z-index: 1;
    flex-shrink: 0;
}

.nova-hist-ai-grid {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background:
        repeating-linear-gradient(0deg, rgba(125, 211, 252, 0.06) 0 1px, transparent 1px 8px),
        repeating-linear-gradient(90deg, rgba(125, 211, 252, 0.06) 0 1px, transparent 1px 8px);
    mask-image: radial-gradient(circle, #000 42%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 72%);
    animation: novaHistAiGrid 6s linear infinite;
    opacity: 0.85;
}

.nova-hist-ai-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid transparent;
}

.nova-hist-ai-ring--a {
    border-top-color: rgba(56, 189, 248, 0.9);
    border-right-color: rgba(56, 189, 248, 0.15);
    animation: novaHistAiSpin 2.6s linear infinite;
}

.nova-hist-ai-ring--b {
    inset: 9px;
    border-bottom-color: rgba(167, 139, 250, 0.85);
    border-left-color: rgba(167, 139, 250, 0.12);
    animation: novaHistAiSpin 1.9s linear infinite reverse;
}

.nova-hist-ai-ring--c {
    inset: 18px;
    border-top-color: rgba(45, 212, 191, 0.55);
    border-right-color: rgba(45, 212, 191, 0.08);
    animation: novaHistAiSpin 3.2s linear infinite;
}

.nova-hist-ai-core {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #f0f9ff 0%, #38bdf8 38%, #6366f1 72%, #1e1b4b 100%);
    box-shadow:
        0 0 20px rgba(56, 189, 248, 0.55),
        0 0 40px rgba(99, 102, 241, 0.35),
        inset 0 0 12px rgba(255, 255, 255, 0.35);
    animation: novaHistAiCore 2.4s ease-in-out infinite;
}

.nova-hist-ai-scan {
    position: absolute;
    left: 6%;
    right: 6%;
    height: 2px;
    top: 50%;
    margin-top: -1px;
    background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.95), transparent);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
    animation: novaHistAiScan 2.6s ease-in-out infinite;
    opacity: 0.75;
    z-index: 2;
    pointer-events: none;
}

.nova-hist-card-top--busy .nova-hist-busy-title,
.nova-hist-card-top--queue .nova-hist-busy-title {
    position: relative;
    z-index: 1;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nova-hist-card-top--busy .nova-hist-busy-note,
.nova-hist-card-top--queue .nova-hist-busy-note {
    position: relative;
    z-index: 1;
    max-width: 260px;
    color: rgba(226, 232, 240, 0.92);
}

@keyframes novaHistAiSpin {
    to { transform: rotate(360deg); }
}

@keyframes novaHistAiCore {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.92; }
}

@keyframes novaHistAiScan {
    0%, 100% { transform: translateY(-22px); opacity: 0; }
    15% { opacity: 0.85; }
    50% { transform: translateY(22px); opacity: 0.85; }
    85% { opacity: 0; }
}

@keyframes novaHistAiGrid {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .nova-hist-ai-ring,
    .nova-hist-ai-core,
    .nova-hist-ai-scan,
    .nova-hist-ai-grid {
        animation: none !important;
    }
}

/** AI 穿搭历史 · 进行中卡片媒体区（ofs-hist-cell） */
.ofs-hist-cell__media--busy,
.ofs-hist-cell__media--wait {
    position: relative;
    overflow: hidden;
    background: #050810;
    color: rgba(255, 255, 255, 0.95);
    padding: 14px 10px;
    gap: 6px;
    isolation: isolate;
}

.ofs-hist-cell__media--busy::before,
.ofs-hist-cell__media--wait::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 85% 65% at 50% 28%, rgba(56, 189, 248, 0.2) 0%, transparent 58%),
        radial-gradient(ellipse 60% 45% at 85% 85%, rgba(139, 92, 246, 0.16) 0%, transparent 55%),
        linear-gradient(168deg, #030712 0%, #0a1628 42%, #0f172a 100%);
    pointer-events: none;
    z-index: 0;
}

.ofs-hist-cell__media--wait::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(251, 191, 36, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.ofs-hist-cell__media--busy .nova-hist-ai-stage,
.ofs-hist-cell__media--wait .nova-hist-ai-stage {
    width: 84px;
    height: 84px;
    margin: 4px 0 2px;
}

.ofs-hist-cell__media__title {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.ofs-hist-cell__media__note {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.92);
    max-width: 94%;
}

.ofs-hist-foot-hint {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    text-align: left;
    max-width: min(100%, 560px);
    margin: 12px auto 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(238, 244, 255, 0.95);
    border: 1px solid rgba(47, 91, 255, 0.22);
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
}

.ofs-hist-foot-hint b {
    font-weight: 700;
    color: #123B9A;
}

/* 进行中同步胶囊 + 删除按钮（图生视频 / 快创等） */
.nova-hist-sync-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 10px;
    padding: 8px 10px 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(47, 91, 255, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}
.nova-hist-sync-pill[hidden] { display: none !important; }
.nova-hist-sync-pill__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2F5BFF;
    box-shadow: 0 0 0 0 rgba(47, 91, 255, 0.45);
    animation: novaHistSyncPulse 2s ease-out infinite;
    flex-shrink: 0;
}
@keyframes novaHistSyncPulse {
    0% { box-shadow: 0 0 0 0 rgba(47, 91, 255, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(47, 91, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 91, 255, 0); }
}
.nova-hist-sync-pill__txt {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nova-hist-sync-pill__time {
    flex: 0 0 auto;
    font-size: 10px;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.nova-hist-sync-pill__time:empty { display: none; }
.nova-hist-sync-pill__btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #07111F 0%, #123B9A 55%, #2F5BFF 100%);
    box-shadow: 0 2px 8px rgba(29, 79, 255, 0.22);
    -webkit-tap-highlight-color: transparent;
}
.nova-hist-sync-pill__btn:active { transform: scale(0.96); opacity: 0.92; }
.nova-hist-sync-pill__btn:disabled { opacity: 0.55; cursor: wait; }
.nova-hist-toolbar-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    -webkit-tap-highlight-color: transparent;
}
.nova-hist-toolbar-refresh:active { transform: scale(0.96); opacity: 0.92; }
.nova-hist-toolbar-refresh:disabled { opacity: 0.55; cursor: wait; }
.i2v-hist-toolbar,
.nova-hist-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.nova-hist-act-btn--danger {
    background: #fff !important;
    color: #b91c1c !important;
    border-color: rgba(185, 28, 28, 0.22) !important;
}
.nova-hist-card-actions--delete {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed rgba(15, 23, 42, 0.08);
}
.nova-hist-card-actions--delete .nova-hist-act-btn {
    flex: 1 1 100%;
    min-width: 0;
}
.ofs-hist-cell__acts {
    padding: 0 10px 10px;
}
.ofs-hist-cell__acts .nova-hist-act-btn {
    width: 100%;
}
/* 穿搭式双列历史卡（AI视频快创 / 图生视频共用） */
.nova-hist-grid.nova-hist-grid--ofs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: min(100%, 680px);
    margin: 0 auto;
    align-items: start;
    flex-direction: unset;
}
@media (min-width: 480px) {
    .nova-hist-grid--ofs { gap: 12px; }
}
.ofs-hist-cell__tap {
    display: block;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}
.ofs-hist-cell__tap:active { opacity: 0.96; }
.ofs-hist-cell {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.ofs-hist-cell__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.ofs-hist-cell__badge--run {
    background: #EEF4FF;
    color: #123B9A;
    border: 1px solid rgba(47, 91, 255, 0.35);
}
.ofs-hist-cell__badge--done {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid rgba(52, 211, 153, 0.45);
}
.ofs-hist-cell__badge--fail {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.45);
}
.ofs-hist-cell__badge--muted {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.4);
}
.ofs-hist-cell__media--muted {
    background: #f8fafc;
    color: #94a3b8;
}
.ofs-hist-cell__media {
    aspect-ratio: 3 / 4;
    min-height: 168px;
    background: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 10px;
}
.ofs-hist-cell__media--thumb { padding: 0; }
.ofs-hist-cell__media--thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ofs-hist-cell__media--thumb,
.ofs-hist-cell__media--vid,
.ofs-hist-cell__media--poster {
    position: relative;
    padding: 0;
}
.ofs-hist-cell__media--thumb img,
.ofs-hist-cell__media--vid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}
.ofs-hist-cell__media--poster {
    background: linear-gradient(145deg, #dbeafe 0%, #e0e7ff 42%, #ecfeff 100%);
}
.ofs-hist-cell__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: #123B9A;
    font-size: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    pointer-events: none;
    padding-left: 2px;
}
.ofs-hist-cell__poster-tag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.04em;
}
.ofs-hist-cell__spec {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}
.ofs-hist-cell__media--fail {
    background: #f8fafc;
    color: #94a3b8;
    font-size: 20px;
}
.ofs-hist-cell__meta {
    padding: 8px 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ofs-hist-cell__hint {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin: 4px 0 2px;
    line-height: 1.35;
}
.ofs-hist-cell__sub {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ofs-hist-cell__time { font-size: 11px; color: #94a3b8; }
.ofs-hist-cell__bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 10px 12px;
}
.ofs-hist-cell__mini {
    min-width: 0;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ofs-hist-cell__mini--lead {
    background: linear-gradient(135deg, #07111F 0%, #123B9A 55%, #2F5BFF 100%);
    color: #fff;
    border-color: transparent;
}
.ofs-hist-cell__mini--dl {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    border-color: transparent;
}
.ofs-hist-cell__mini:active { opacity: 0.92; transform: scale(0.98); }
.piv-hist-del {
    display: block;
    width: calc(100% - 8px);
    margin: 8px 4px 0;
}
